From b7b5cee314a0f60d9e8b8e0faf001bff33f90931 Mon Sep 17 00:00:00 2001 From: Madhav Bhargava Date: Thu, 23 Nov 2023 14:58:40 +0530 Subject: [PATCH 1/4] combined resource graph queries into a single query, adapted impl, fixed os disk name, added predicate for update vm --- pkg/azure/access/helpers/vm.go | 112 +------- pkg/azure/provider/helpers/driver.go | 260 ++++++++++++++---- .../helpers/resourcegraphprocessor.go | 123 +++++++++ pkg/azure/provider/provider.go | 2 +- pkg/azure/provider/provider_test.go | 13 +- pkg/azure/testhelp/errors.go | 13 +- pkg/azure/testhelp/fakes/behavior.go | 34 +-- pkg/azure/testhelp/fakes/clusterstate.go | 4 +- pkg/azure/testhelp/fakes/diskaccess.go | 2 +- pkg/azure/testhelp/fakes/imageaccess.go | 3 +- .../fakes/marketplaceagreementaccess.go | 7 +- pkg/azure/testhelp/fakes/nicaccess.go | 2 +- .../testhelp/fakes/resourcegraphaccess.go | 16 +- pkg/azure/testhelp/fakes/subnetaccess.go | 3 +- pkg/azure/testhelp/fakes/vmaccess.go | 5 + pkg/azure/utils/names.go | 28 +- pkg/azure/utils/names_test.go | 62 +++++ pkg/azure/utils/resourcetype.go | 20 ++ pkg/azure/utils/vm.go | 16 ++ 19 files changed, 497 insertions(+), 228 deletions(-) create mode 100644 pkg/azure/provider/helpers/resourcegraphprocessor.go create mode 100644 pkg/azure/utils/names_test.go create mode 100644 pkg/azure/utils/resourcetype.go create mode 100644 pkg/azure/utils/vm.go diff --git a/pkg/azure/access/helpers/vm.go b/pkg/azure/access/helpers/vm.go index 70d47f814..fcc3c168a 100644 --- a/pkg/azure/access/helpers/vm.go +++ b/pkg/azure/access/helpers/vm.go @@ -18,13 +18,9 @@ import ( "context" "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5" - "k8s.io/klog/v2" - "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/access/errors" "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/instrument" - "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/utils" ) // labels used for recording prometheus metrics @@ -104,119 +100,19 @@ func CreateVirtualMachine(ctx context.Context, vmAccess *armcompute.VirtualMachi // SetCascadeDeleteForNICsAndDisks sets cascade deletion for NICs and Disks (OSDisk and DataDisks) associated to passed virtual machine. // NOTE: All calls to this Azure API are instrumented as prometheus metric. -func SetCascadeDeleteForNICsAndDisks(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, resourceGroup string, vm *armcompute.VirtualMachine) (err error) { +func SetCascadeDeleteForNICsAndDisks(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, resourceGroup string, vmName string, vmUpdateParams *armcompute.VirtualMachineUpdate) (err error) { defer instrument.RecordAzAPIMetric(err, vmUpdateServiceLabel, time.Now()) - vmUpdateDesc := createVirtualMachineUpdateDescription(vm) // TODO: Rename this method it returns a VM not "params" - if vmUpdateDesc == nil { - klog.Infof("All configured NICs, OSDisk and DataDisks have cascade delete already set. Skipping update of VM: [ResourceGroup: %s, Name: %s]", resourceGroup, *vm.Name) - return - } updCtx, cancelFn := context.WithTimeout(ctx, defaultUpdateVMTimeout) defer cancelFn() - poller, err := vmClient.BeginUpdate(updCtx, resourceGroup, *vm.Name, *vmUpdateDesc, nil) + poller, err := vmClient.BeginUpdate(updCtx, resourceGroup, vmName, *vmUpdateParams, nil) if err != nil { - errors.LogAzAPIError(err, "Failed to trigger update of VM [ResourceGroup: %s, VMName: %s]", resourceGroup, *vm.Name) + errors.LogAzAPIError(err, "Failed to trigger update of VM [ResourceGroup: %s, VMName: %s]", resourceGroup, vmName) return } _, err = poller.PollUntilDone(updCtx, nil) if err != nil { - errors.LogAzAPIError(err, "Polling failed while waiting for update of VM: %s for ResourceGroup: %s", *vm.Name, resourceGroup) + errors.LogAzAPIError(err, "Polling failed while waiting for update of VM: %s for ResourceGroup: %s", vmName, resourceGroup) return } - return } - -// createVirtualMachineUpdateDescription creates armcompute.VirtualMachineUpdate with delta changes to -// delete option for associated NICs and Disks of a given virtual machine. -func createVirtualMachineUpdateDescription(vm *armcompute.VirtualMachine) *armcompute.VirtualMachineUpdate { - var ( - vmUpdateParams = armcompute.VirtualMachineUpdate{Properties: &armcompute.VirtualMachineProperties{}} - cascadeDeleteChangesPending bool - ) - - updatedNicRefs := getNetworkInterfaceReferencesToUpdate(vm.Properties.NetworkProfile) - if !utils.IsSliceNilOrEmpty(updatedNicRefs) { - cascadeDeleteChangesPending = true - vmUpdateParams.Properties.NetworkProfile = &armcompute.NetworkProfile{ - NetworkInterfaces: updatedNicRefs, - } - } - - vmUpdateParams.Properties.StorageProfile = &armcompute.StorageProfile{} - updatedOSDisk := getOSDiskToUpdate(vm.Properties.StorageProfile) - if updatedOSDisk != nil { - cascadeDeleteChangesPending = true - vmUpdateParams.Properties.StorageProfile.OSDisk = updatedOSDisk - } - - updatedDataDisks := getDataDisksToUpdate(vm.Properties.StorageProfile) - if !utils.IsSliceNilOrEmpty(updatedDataDisks) { - cascadeDeleteChangesPending = true - vmUpdateParams.Properties.StorageProfile.DataDisks = updatedDataDisks - } - - if !cascadeDeleteChangesPending { - return nil - } - return &vmUpdateParams -} - -func getNetworkInterfaceReferencesToUpdate(networkProfile *armcompute.NetworkProfile) []*armcompute.NetworkInterfaceReference { - if networkProfile == nil || utils.IsSliceNilOrEmpty(networkProfile.NetworkInterfaces) { - return nil - } - updatedNicRefs := make([]*armcompute.NetworkInterfaceReference, 0, len(networkProfile.NetworkInterfaces)) - for _, nicRef := range networkProfile.NetworkInterfaces { - updatedNicRef := &armcompute.NetworkInterfaceReference{ID: nicRef.ID} - if !isNicCascadeDeleteSet(nicRef) { - if updatedNicRef.Properties == nil { - updatedNicRef.Properties = &armcompute.NetworkInterfaceReferenceProperties{} - } - updatedNicRef.Properties.DeleteOption = to.Ptr(armcompute.DeleteOptionsDelete) - updatedNicRefs = append(updatedNicRefs, updatedNicRef) - } - } - return updatedNicRefs -} - -func isNicCascadeDeleteSet(nicRef *armcompute.NetworkInterfaceReference) bool { - if nicRef.Properties == nil { - return false - } - deleteOption := nicRef.Properties.DeleteOption - return deleteOption != nil && *deleteOption == armcompute.DeleteOptionsDelete -} - -func getOSDiskToUpdate(storageProfile *armcompute.StorageProfile) *armcompute.OSDisk { - var updatedOSDisk *armcompute.OSDisk - if storageProfile != nil && storageProfile.OSDisk != nil { - existingOSDisk := storageProfile.OSDisk - existingDeleteOption := existingOSDisk.DeleteOption - if existingDeleteOption == nil || *existingDeleteOption != armcompute.DiskDeleteOptionTypesDelete { - updatedOSDisk = &armcompute.OSDisk{ - Name: existingOSDisk.Name, - DeleteOption: to.Ptr(armcompute.DiskDeleteOptionTypesDelete), - } - } - } - return updatedOSDisk -} - -func getDataDisksToUpdate(storageProfile *armcompute.StorageProfile) []*armcompute.DataDisk { - var updatedDataDisks []*armcompute.DataDisk - if storageProfile != nil && !utils.IsSliceNilOrEmpty(storageProfile.DataDisks) { - updatedDataDisks = make([]*armcompute.DataDisk, 0, len(storageProfile.DataDisks)) - for _, dataDisk := range storageProfile.DataDisks { - if dataDisk.DeleteOption == nil || *dataDisk.DeleteOption != armcompute.DiskDeleteOptionTypesDelete { - updatedDataDisk := &armcompute.DataDisk{ - Lun: dataDisk.Lun, - DeleteOption: to.Ptr(armcompute.DiskDeleteOptionTypesDelete), - Name: dataDisk.Name, - } - updatedDataDisks = append(updatedDataDisks, updatedDataDisk) - } - } - } - return updatedDataDisks -} diff --git a/pkg/azure/provider/helpers/driver.go b/pkg/azure/provider/helpers/driver.go index 7a3c587c2..d9778d3e2 100644 --- a/pkg/azure/provider/helpers/driver.go +++ b/pkg/azure/provider/helpers/driver.go @@ -29,7 +29,6 @@ import ( accesserrors "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/access/errors" "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/api/validation" "golang.org/x/crypto/ssh" - "k8s.io/apimachinery/pkg/util/sets" "k8s.io/utils/pointer" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" @@ -126,65 +125,75 @@ const ( | project name ` + listDisksQueryTemplate = ` + Resources + | where type =~ 'microsoft.network/disks' + | where resourceGroup =~ '%s' + | extend tagKeys = bag_keys(tags) + | where tagKeys has '%s' and tagKeys has '%s' + | project name + ` + nicSuffix = "-nic" ) // ExtractVMNamesFromVirtualMachinesAndNICs extracts VM names from virtual machines and NIC names and returns a slice of unique vm names. // This method uses azure resource graph client which in turn uses KUSTO as their query language. // For additional information on KUSTO start here: [https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/] -func ExtractVMNamesFromVirtualMachinesAndNICs(ctx context.Context, factory access.Factory, connectConfig access.ConnectConfig, resourceGroup string, providerSpecTags map[string]string) ([]string, error) { - rgAccess, err := factory.GetResourceGraphAccess(connectConfig) - if err != nil { - return nil, err - } - vmNames := sets.New[string]() - - queryTemplateArgs := prepareQueryTemplateArgs(resourceGroup, providerSpecTags) - vmNamesFromVirtualMachines, err := accesshelpers.QueryAndMap[string](ctx, rgAccess, connectConfig.SubscriptionID, createVMNameMapperFn(nil), listVMsQueryTemplate, queryTemplateArgs...) - if err != nil { - return nil, status.WrapError(codes.Internal, fmt.Sprintf("failed to get VM names from VirtualMachines for resourceGroup :%s: error: %v", resourceGroup, err), err) - } - vmNames.Insert(vmNamesFromVirtualMachines...) - - // extract VM Names from existing NICs. Why is this required? - // A Machine in MCM terminology is a collective entity consisting of but not limited to VM, NIC(s), Disk(s). - // MCM orphan collection needs to track resources which have a separate lifecycle and are orphaned. Currently in case of azure it is VM's and NICs. - // Disks (OS and Data) are created and deleted along with the VM. - // In order to get any orphaned VM or NIC, its currently essential that a machine name(collective entity) should be collected - // by introspecting VMs and NICs. - vmNamesFromNICs, err := accesshelpers.QueryAndMap[string](ctx, rgAccess, connectConfig.SubscriptionID, createVMNameMapperFn(to.Ptr(nicSuffix)), listNICsQueryTemplate, queryTemplateArgs...) - if err != nil { - return nil, status.WrapError(codes.Internal, fmt.Sprintf("failed to get VM names from NICs for resourceGroup :%s: error: %v", resourceGroup, err), err) - } - vmNames.Insert(vmNamesFromNICs...) - return vmNames.UnsortedList(), nil -} - -func prepareQueryTemplateArgs(resourceGroup string, providerSpecTags map[string]string) []any { - // NOTE: length is 3 because in the query we have a max of 3 parameter substitutions. This should be changed if the number of parameters change to prevent unnecessary resizing. - templateArgs := make([]any, 0, 3) - // NOTE: preserve the same order as these are ordered parameters which will be used for substitution. - templateArgs = append(templateArgs, resourceGroup) - for k := range providerSpecTags { - if strings.HasPrefix(k, utils.ClusterTagPrefix) || strings.HasPrefix(k, utils.RoleTagPrefix) { - templateArgs = append(templateArgs, k) - } - } - return templateArgs -} - -func createVMNameMapperFn(suffix *string) accesshelpers.MapperFn[string] { - return func(r map[string]interface{}) *string { - if resourceNameVal, keyFound := r["name"]; keyFound { - resourceName := resourceNameVal.(string) - if suffix != nil && strings.HasSuffix(resourceName, *suffix) { - return to.Ptr(resourceName[:len(resourceName)-len(*suffix)]) - } - return to.Ptr(resourceName) - } - return nil - } -} +//func ExtractVMNamesFromVirtualMachinesAndNICs(ctx context.Context, factory access.Factory, connectConfig access.ConnectConfig, resourceGroup string, providerSpecTags map[string]string) ([]string, error) { +// rgAccess, err := factory.GetResourceGraphAccess(connectConfig) +// if err != nil { +// return nil, err +// } +// vmNames := sets.New[string]() +// +// queryTemplateArgs := prepareQueryTemplateArgs(resourceGroup, providerSpecTags) +// vmNamesFromVirtualMachines, err := accesshelpers.QueryAndMap[string](ctx, rgAccess, connectConfig.SubscriptionID, createVMNameMapperFn(nil), listVMsQueryTemplate, queryTemplateArgs...) +// if err != nil { +// return nil, status.WrapError(codes.Internal, fmt.Sprintf("failed to get VM names from VirtualMachines for resourceGroup :%s: error: %v", resourceGroup, err), err) +// } +// vmNames.Insert(vmNamesFromVirtualMachines...) +// +// // extract VM Names from existing NICs. Why is this required? +// // A Machine in MCM terminology is a collective entity consisting of but not limited to VM, NIC(s), Disk(s). +// // MCM orphan collection needs to track resources which have a separate lifecycle and are orphaned. Currently in case of azure it is VM's and NICs. +// // Disks (OS and Data) are created and deleted along with the VM. +// // In order to get any orphaned VM or NIC, its currently essential that a machine name(collective entity) should be collected +// // by introspecting VMs and NICs. +// vmNamesFromNICs, err := accesshelpers.QueryAndMap[string](ctx, rgAccess, connectConfig.SubscriptionID, createVMNameMapperFn(to.Ptr(nicSuffix)), listNICsQueryTemplate, queryTemplateArgs...) +// if err != nil { +// return nil, status.WrapError(codes.Internal, fmt.Sprintf("failed to get VM names from NICs for resourceGroup :%s: error: %v", resourceGroup, err), err) +// } +// vmNames.Insert(vmNamesFromNICs...) +// +// return vmNames.UnsortedList(), nil +//} + +//func prepareQueryTemplateArgs(resourceGroup string, providerSpecTags map[string]string) []any { +// // NOTE: length is 3 because in the query we have a max of 3 parameter substitutions. This should be changed if the number of parameters change to prevent unnecessary resizing. +// templateArgs := make([]any, 0, 3) +// // NOTE: preserve the same order as these are ordered parameters which will be used for substitution. +// templateArgs = append(templateArgs, resourceGroup) +// for k := range providerSpecTags { +// if strings.HasPrefix(k, utils.ClusterTagPrefix) || strings.HasPrefix(k, utils.RoleTagPrefix) { +// templateArgs = append(templateArgs, k) +// } +// } +// return templateArgs +//} + +//func createVMNameMapperFn(suffix *string) accesshelpers.MapperFn[string] { +// return func(r map[string]interface{}) *string { +// if resourceNameVal, keyFound := r["name"]; keyFound { +// resourceName := resourceNameVal.(string) +// if suffix != nil && strings.HasSuffix(resourceName, *suffix) { +// return to.Ptr(resourceName[:len(resourceName)-len(*suffix)]) +// } +// return to.Ptr(resourceName) +// } +// return nil +// } +//} // Helper functions used for driver.DeleteMachine // --------------------------------------------------------------------------------------------------------------------- @@ -248,19 +257,152 @@ func CheckAndDeleteLeftoverNICsAndDisks(ctx context.Context, factory access.Fact // UpdateCascadeDeleteOptionsAndDeleteVM updates the VirtualMachine properties and sets cascade delete options for NIC's and DISK's if it is not already set. // Once that is set then it deletes the VM. This will ensure that no separate calls to delete each NIC and DISK are made as they will get deleted along with the VM in one single atomic call. func UpdateCascadeDeleteOptionsAndDeleteVM(ctx context.Context, vmAccess *armcompute.VirtualMachinesClient, resourceGroup string, vm *armcompute.VirtualMachine) error { - // update the VM and set cascade delete on NIC and Disks (OSDisk and DataDisks) if not already set and then trigger VM deletion. vmName := *vm.Name - err := accesshelpers.SetCascadeDeleteForNICsAndDisks(ctx, vmAccess, resourceGroup, vm) - if err != nil { - return status.WrapError(codes.Internal, fmt.Sprintf("Failed to update cascade delete of associated resources for VM: [ResourceGroup: %s, Name: %s], Err: %v", resourceGroup, vmName, err), err) + vmUpdateParams := computeDeleteOptionUpdatesForNICsAndDisksIfRequired(resourceGroup, vm) + if vmUpdateParams != nil { + if canUpdateVirtualMachine(vm) { + // update the VM and set cascade delete on NIC and Disks (OSDisk and DataDisks) if not already set and then trigger VM deletion. + err := accesshelpers.SetCascadeDeleteForNICsAndDisks(ctx, vmAccess, resourceGroup, vmName, vmUpdateParams) + if err != nil { + return status.WrapError(codes.Internal, fmt.Sprintf("Failed to update cascade delete of associated resources for VM: [ResourceGroup: %s, Name: %s], Err: %v", resourceGroup, vmName, err), err) + } + } else { + return status.New(codes.Internal, fmt.Sprintf("Cannot update VM: [ResourceGroup: %s, Name: %s]. Either the VM is in terminal state or there are one or more data disks that are marked for detachment", resourceGroup, vmName)) + } } - err = accesshelpers.DeleteVirtualMachine(ctx, vmAccess, resourceGroup, vmName) + err := accesshelpers.DeleteVirtualMachine(ctx, vmAccess, resourceGroup, vmName) if err != nil { return status.WrapError(codes.Internal, fmt.Sprintf("Failed to delete VM: [ResourceGroup: %s, Name: %s], Err: %v", resourceGroup, vmName, err), err) } return nil } +// canUpdateVirtualMachine checks if it is safe to update VirtualMachine. +// Virtual machine update will fail if DataDisk has ToBeDetached set to true indicating that the data disk detachment is currently in progress. +func canUpdateVirtualMachine(vm *armcompute.VirtualMachine) bool { + // If the VM is in terminal state then any call to update the VM will be rejected by Azure with `OperationNotAllowed` error code. + // The check here will prevent such calls to be made when we know that it will surely fail thus also alleviating the chance of throttling of client API requests. + vmInTerminalState := vm.Properties.ProvisioningState != nil && *vm.Properties.ProvisioningState == "Failed" + return !utils.DataDisksMarkedForDetachment(vm) && !vmInTerminalState +} + +// computeDeleteOptionUpdatesForNICsAndDisksIfRequired computes changes required to set cascade delete options for NICs, OSDisk and DataDisks. +// If there are no changes then a nil is returned. If there are changes then delta changes are captured in armcompute.VirtualMachineUpdate +func computeDeleteOptionUpdatesForNICsAndDisksIfRequired(resourceGroup string, vm *armcompute.VirtualMachine) *armcompute.VirtualMachineUpdate { + var ( + vmUpdateParams *armcompute.VirtualMachineUpdate + updatedNicReferences []*armcompute.NetworkInterfaceReference + updatedDataDisks []*armcompute.DataDisk + updatedOSDisk *armcompute.OSDisk + vmName = *vm.Name + ) + + // Return early if VM does not have any properties set. This should ideally never happen. + if vm.Properties == nil { + klog.Errorf("Weird, but it seems that the VM: [ResourceGroup: %s, Name: %s] does not have Properties set, skipping computing cascade delete update computation for this VM", resourceGroup, vmName) + return vmUpdateParams + } + + updatedNicReferences = getNetworkInterfaceReferencesToUpdate(vm.Properties.NetworkProfile) + updatedOSDisk = getOSDiskToUpdate(vm.Properties.StorageProfile) + updatedDataDisks = getDataDisksToUpdate(vm.Properties.StorageProfile) + + // If there are no updates on NIC(s), OSDisk and DataDisk(s) then just return early. + if utils.IsSliceNilOrEmpty(updatedNicReferences) && updatedOSDisk == nil && utils.IsSliceNilOrEmpty(updatedDataDisks) { + klog.Infof("All configured NICs, OSDisk and DataDisks have cascade delete already set for VM: [ResourceGroup: %s, Name: %s]", resourceGroup, vmName) + return vmUpdateParams + } + + vmUpdateParams = &armcompute.VirtualMachineUpdate{ + Properties: &armcompute.VirtualMachineProperties{ + StorageProfile: &armcompute.StorageProfile{}, + }, + } + + if !utils.IsSliceNilOrEmpty(updatedNicReferences) { + klog.Infof("Identified #%d NICs requiring DeleteOption updates for VM: [ResourceGroup: %s, Name: %s]", len(updatedNicReferences), resourceGroup, vmName) + vmUpdateParams.Properties.NetworkProfile = &armcompute.NetworkProfile{ + NetworkInterfaces: updatedNicReferences, + } + } + if updatedOSDisk != nil { + klog.Infof("Identified OSDisk: %s requiring DeleteOption update for VM: [ResourceGroup: %s, Name: %s]", updatedOSDisk.Name, resourceGroup, vmName) + vmUpdateParams.Properties.StorageProfile.OSDisk = updatedOSDisk + } + if !utils.IsSliceNilOrEmpty(updatedDataDisks) { + vmUpdateParams.Properties.StorageProfile.DataDisks = updatedDataDisks + } + + return vmUpdateParams +} + +// getNetworkInterfaceReferencesToUpdate checks if there are still NICs which do not have cascade delete set. These are captured and changed +// NetworkInterfaceReference's are then returned with cascade delete option set. +func getNetworkInterfaceReferencesToUpdate(networkProfile *armcompute.NetworkProfile) []*armcompute.NetworkInterfaceReference { + if networkProfile == nil || utils.IsSliceNilOrEmpty(networkProfile.NetworkInterfaces) { + return nil + } + updatedNicRefs := make([]*armcompute.NetworkInterfaceReference, 0, len(networkProfile.NetworkInterfaces)) + for _, nicRef := range networkProfile.NetworkInterfaces { + updatedNicRef := &armcompute.NetworkInterfaceReference{ID: nicRef.ID} + if !isNicCascadeDeleteSet(nicRef) { + if updatedNicRef.Properties == nil { + updatedNicRef.Properties = &armcompute.NetworkInterfaceReferenceProperties{} + } + updatedNicRef.Properties.DeleteOption = to.Ptr(armcompute.DeleteOptionsDelete) + updatedNicRefs = append(updatedNicRefs, updatedNicRef) + } + } + return updatedNicRefs +} + +// isNicCascadeDeleteSet checks if for a given NIC, cascade deletion option is set. +func isNicCascadeDeleteSet(nicRef *armcompute.NetworkInterfaceReference) bool { + if nicRef.Properties == nil { + return false + } + deleteOption := nicRef.Properties.DeleteOption + return deleteOption != nil && *deleteOption == armcompute.DeleteOptionsDelete +} + +// getOSDiskToUpdate checks if cascade delete option is set on OSDisk, if it is not then it will set it and return the +// updated OSDisk else it will return nil. +func getOSDiskToUpdate(storageProfile *armcompute.StorageProfile) *armcompute.OSDisk { + var updatedOSDisk *armcompute.OSDisk + if storageProfile != nil && storageProfile.OSDisk != nil { + existingOSDisk := storageProfile.OSDisk + existingDeleteOption := existingOSDisk.DeleteOption + if existingDeleteOption == nil || *existingDeleteOption != armcompute.DiskDeleteOptionTypesDelete { + updatedOSDisk = &armcompute.OSDisk{ + Name: existingOSDisk.Name, + DeleteOption: to.Ptr(armcompute.DiskDeleteOptionTypesDelete), + } + } + } + return updatedOSDisk +} + +// getDataDisksToUpdate checks if cascade delete option set for all DataDisks attached to the Virtual machine. +// All data disks that do not have that set, it will set the appropriate DeleteOption and return the updated +// DataDisks else it will return nil +func getDataDisksToUpdate(storageProfile *armcompute.StorageProfile) []*armcompute.DataDisk { + var updatedDataDisks []*armcompute.DataDisk + if storageProfile != nil && !utils.IsSliceNilOrEmpty(storageProfile.DataDisks) { + updatedDataDisks = make([]*armcompute.DataDisk, 0, len(storageProfile.DataDisks)) + for _, dataDisk := range storageProfile.DataDisks { + if dataDisk.DeleteOption == nil || *dataDisk.DeleteOption != armcompute.DiskDeleteOptionTypesDelete { + updatedDataDisk := &armcompute.DataDisk{ + Lun: dataDisk.Lun, + DeleteOption: to.Ptr(armcompute.DiskDeleteOptionTypesDelete), + Name: dataDisk.Name, + } + updatedDataDisks = append(updatedDataDisks, updatedDataDisk) + } + } + } + return updatedDataDisks +} + func createNICDeleteTask(resourceGroup, nicName string, nicAccess *armnetwork.InterfacesClient) utils.Task { return utils.Task{ Name: fmt.Sprintf("delete-nic-[resourceGroup: %s name: %s]", resourceGroup, nicName), diff --git a/pkg/azure/provider/helpers/resourcegraphprocessor.go b/pkg/azure/provider/helpers/resourcegraphprocessor.go new file mode 100644 index 000000000..918e8b944 --- /dev/null +++ b/pkg/azure/provider/helpers/resourcegraphprocessor.go @@ -0,0 +1,123 @@ +package helpers + +import ( + "context" + "fmt" + "strings" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/access" + accesshelpers "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/access/helpers" + "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/api" + "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/utils" + "github.com/gardener/machine-controller-manager/pkg/util/provider/machinecodes/codes" + "github.com/gardener/machine-controller-manager/pkg/util/provider/machinecodes/status" + "k8s.io/apimachinery/pkg/util/sets" +) + +const ( + listVmsNICsAndDisksQueryTemplate = ` + Resources + | where type =~ 'microsoft.network/virtualMachines' or type =~ 'microsoft.network/networkinterfaces' or type =~ 'microsoft.compute/disks' + | where resourceGroup =~ '%s' + | extend tagKeys = bag_keys(tags) + | where tagKeys has '%s' and tagKeys has '%s' + | project type, name + ` +) + +// ExtractVMNamesFromVMsNICsDisks leverages resource graph to extract names from VMs, NICs and Disks (OS and Data disks). +func ExtractVMNamesFromVMsNICsDisks(ctx context.Context, factory access.Factory, connectConfig access.ConnectConfig, resourceGroup string, providerSpec api.AzureProviderSpec) ([]string, error) { + rgAccess, err := factory.GetResourceGraphAccess(connectConfig) + if err != nil { + return nil, err + } + vmNames := sets.New[string]() + + queryTemplateArgs := prepareQueryTemplateArgs(resourceGroup, providerSpec.Tags) + resultEntries, err := accesshelpers.QueryAndMap[resultEntry](ctx, rgAccess, connectConfig.SubscriptionID, createVMNameMapperFn(), listVmsNICsAndDisksQueryTemplate, queryTemplateArgs...) + if err != nil { + return nil, status.WrapError(codes.Internal, fmt.Sprintf("failed to get VM names from VMs, NICs and Disks for resourceGroup :%s: error: %v", resourceGroup, err), err) + } + + if resultEntries != nil { + dataDiskNameSuffixes := getDataDiskNameSuffixes(providerSpec) + for _, re := range resultEntries { + vmName := re.extractVMName(dataDiskNameSuffixes) + if !utils.IsEmptyString(vmName) { + vmNames.Insert(vmName) + } + } + } + return vmNames.UnsortedList(), nil +} + +func prepareQueryTemplateArgs(resourceGroup string, providerSpecTags map[string]string) []any { + // NOTE: length is 3 because in the query we have a max of 3 parameter substitutions. This should be changed if the number of parameters change to prevent unnecessary resizing. + templateArgs := make([]any, 0, 3) + // NOTE: preserve the same order as these are ordered parameters which will be used for substitution. + templateArgs = append(templateArgs, resourceGroup) + for k := range providerSpecTags { + if strings.HasPrefix(k, utils.ClusterTagPrefix) || strings.HasPrefix(k, utils.RoleTagPrefix) { + templateArgs = append(templateArgs, k) + } + } + return templateArgs +} + +func createVMNameMapperFn() accesshelpers.MapperFn[resultEntry] { + return func(m map[string]interface{}) *resultEntry { + resourceName, nameKeyFound := m["name"] + resourceType, typeKeyFound := m["type"] + if nameKeyFound && typeKeyFound { + return to.Ptr(resultEntry{ + resourceType: resourceType.(utils.ResourceType), + name: resourceName.(string), + }) + } + return nil + } +} + +type resultEntry struct { + resourceType utils.ResourceType + name string +} + +func (r resultEntry) extractVMName(dataDiskNameSuffixes sets.Set[string]) string { + switch r.resourceType { + case utils.VirtualMachinesResourceType: + return r.name + case utils.NetworkInterfacesResourceType: + return utils.ExtractVMNameFromNICName(r.name) + case utils.DiskResourceType: + if strings.HasSuffix(r.name, utils.OSDiskSuffix) { + return utils.ExtractVMNameFromOSDiskName(r.name) + } else if strings.HasSuffix(r.name, utils.DataDiskSuffix) { + if suffix, found := findMatchingDataDiskNameSuffix(r.name, dataDiskNameSuffixes); found { + return r.name[:len(r.name)-len(suffix)] + } + } + } + return "" +} + +func findMatchingDataDiskNameSuffix(dataDiskName string, dataDiskNameSuffixes sets.Set[string]) (string, bool) { + for _, suffix := range dataDiskNameSuffixes.UnsortedList() { + if strings.HasSuffix(dataDiskName, suffix) { + return suffix, true + } + } + return "", false +} + +func getDataDiskNameSuffixes(providerSpec api.AzureProviderSpec) sets.Set[string] { + dataDiskNameSuffixes := sets.New[string]() + dataDisks := providerSpec.Properties.StorageProfile.DataDisks + if dataDisks != nil { + for _, dataDisk := range dataDisks { + dataDiskNameSuffixes.Insert(utils.GetDataDiskNameSuffix(dataDisk)) + } + } + return dataDiskNameSuffixes +} diff --git a/pkg/azure/provider/provider.go b/pkg/azure/provider/provider.go index 464cc100c..683c4298a 100644 --- a/pkg/azure/provider/provider.go +++ b/pkg/azure/provider/provider.go @@ -58,7 +58,7 @@ func (d defaultDriver) ListMachines(ctx context.Context, req *driver.ListMachine if err != nil { return } - vmNames, err := helpers.ExtractVMNamesFromVirtualMachinesAndNICs(ctx, d.factory, connectConfig, providerSpec.ResourceGroup, providerSpec.Tags) + vmNames, err := helpers.ExtractVMNamesFromVMsNICsDisks(ctx, d.factory, connectConfig, providerSpec.ResourceGroup, providerSpec) if err != nil { return } diff --git a/pkg/azure/provider/provider_test.go b/pkg/azure/provider/provider_test.go index 24e997d4c..69d36023e 100644 --- a/pkg/azure/provider/provider_test.go +++ b/pkg/azure/provider/provider_test.go @@ -100,6 +100,7 @@ func TestDeleteMachineWhenVMExists(t *testing.T) { checkClusterStateAndGetMachineResources(g, ctx, factory, vmName, false, false, false, dataDiskNames, false, true) }, }, + {}, { "should skip delete if the resource group is not found", testResourceGroupName, @@ -606,11 +607,11 @@ func TestListMachineWithInducedErrors(t *testing.T) { }{ { "should fail listing machines when resource-graph query for VM resource type returns error", - fakes.NewAPIBehaviorSpec().AddErrorResourceTypeReaction(fakes.VirtualMachinesResourceType, testhelp.AccessMethodResources, testInternalServerError), + fakes.NewAPIBehaviorSpec().AddErrorResourceTypeReaction(utils.VirtualMachinesResourceType, testhelp.AccessMethodResources, testInternalServerError), }, { "should fail listing machines when resource-graph query for NIC resource type returns error", - fakes.NewAPIBehaviorSpec().AddErrorResourceTypeReaction(fakes.NetworkInterfacesResourceType, testhelp.AccessMethodResources, testInternalServerError), + fakes.NewAPIBehaviorSpec().AddErrorResourceTypeReaction(utils.NetworkInterfacesResourceType, testhelp.AccessMethodResources, testInternalServerError), }, } @@ -744,7 +745,7 @@ func TestCreateMachineWhenPrerequisitesFail(t *testing.T) { { "should fail machine creation when subnet GET fails, no resources should be created", subnetName, vnetName, nil, nil, true, true, true, true, - nil, fakes.NewAPIBehaviorSpec().AddErrorResourceTypeReaction(fakes.SubnetResourceType, testhelp.AccessMethodGet, internalServerErr), nil, nil, + nil, fakes.NewAPIBehaviorSpec().AddErrorResourceTypeReaction(utils.SubnetResourceType, testhelp.AccessMethodGet, internalServerErr), nil, nil, func(g *WithT, clusterState *fakes.ClusterState, err error) { azRespErr := checkAndGetWrapperAzResponseError(g, err, codes.Internal) g.Expect(azRespErr.StatusCode).To(Equal(http.StatusInternalServerError)) @@ -788,7 +789,7 @@ func TestCreateMachineWhenPrerequisitesFail(t *testing.T) { { "should fail machine creation when VM Image GET fails, no resources should be created", subnetName, vnetName, nil, nil, true, true, true, true, - nil, nil, fakes.NewAPIBehaviorSpec().AddErrorResourceTypeReaction(fakes.VMImageResourceType, testhelp.AccessMethodGet, internalServerErr), nil, + nil, nil, fakes.NewAPIBehaviorSpec().AddErrorResourceTypeReaction(utils.VMImageResourceType, testhelp.AccessMethodGet, internalServerErr), nil, func(g *WithT, clusterState *fakes.ClusterState, err error) { azRespErr := checkAndGetWrapperAzResponseError(g, err, codes.Internal) g.Expect(azRespErr.StatusCode).To(Equal(http.StatusInternalServerError)) @@ -810,7 +811,7 @@ func TestCreateMachineWhenPrerequisitesFail(t *testing.T) { func(g *WithT, _ *fakes.ClusterState, err error) { azRespErr := checkAndGetWrapperAzResponseError(g, err, codes.NotFound) g.Expect(azRespErr.StatusCode).To(Equal(http.StatusBadRequest)) - g.Expect(azRespErr.ErrorCode).To(Equal(testhelp.ErrorBadRequest)) + g.Expect(azRespErr.ErrorCode).To(Equal(testhelp.ErrorCodeBadRequest)) g.Expect(azRespErr.RawResponse.Request.Method).To(Equal(http.MethodGet)) publisher, offer, sku, version := fakes.GetDefaultVMImageParts() g.Expect(fakes.IsMktPlaceAgreementURIPath(azRespErr.RawResponse.Request.URL.Path, testhelp.SubscriptionID, fakes.VMImageSpec{ @@ -824,7 +825,7 @@ func TestCreateMachineWhenPrerequisitesFail(t *testing.T) { { "should fail machine creation when update of agreement for VM Image fails, no resources should be created", subnetName, vnetName, nil, nil, true, true, true, false, - nil, nil, nil, fakes.NewAPIBehaviorSpec().AddErrorResourceTypeReaction(fakes.MarketPlaceOrderingOfferType, testhelp.AccessMethodCreate, testhelp.InternalServerError("test-error-code")), + nil, nil, nil, fakes.NewAPIBehaviorSpec().AddErrorResourceTypeReaction(utils.MarketPlaceOrderingOfferType, testhelp.AccessMethodCreate, testhelp.InternalServerError("test-error-code")), func(g *WithT, _ *fakes.ClusterState, err error) { azRespErr := checkAndGetWrapperAzResponseError(g, err, codes.Internal) g.Expect(azRespErr.StatusCode).To(Equal(http.StatusInternalServerError)) diff --git a/pkg/azure/testhelp/errors.go b/pkg/azure/testhelp/errors.go index 4e59ec85e..fdeab9c3b 100644 --- a/pkg/azure/testhelp/errors.go +++ b/pkg/azure/testhelp/errors.go @@ -31,10 +31,10 @@ const ( ErrorCodeResourceNotFound = "ResourceNotFound" // ErrorCodeResourceGroupNotFound is the error code returned in Azure response header when resource group is not found. ErrorCodeResourceGroupNotFound = "ResourceGroupNotFound" - // ErrorOperationNotAllowed is the error code returned in Azure response if an operation is not allowed on a resource. - ErrorOperationNotAllowed = "OperationNotAllowed" - // ErrorBadRequest is the error code returned in Azure response if the request is not as per the spec. In some cases this code is returned in place of not found. - ErrorBadRequest = "BadRequest" + // ErrorCodeOperationNotAllowed is the error code returned in Azure response if an operation is not allowed on a resource. + ErrorCodeOperationNotAllowed = "OperationNotAllowed" + // ErrorCodeBadRequest is the error code returned in Azure response if the request is not as per the spec. In some cases this code is returned in place of not found. + ErrorCodeBadRequest = "BadRequest" // ErrorCodeVMImageNotFound is the error code returned in Azure response if the VM Image is not found. // We have created 2 different constants for not found error because Azure is not consistent. For certain resources it returns // ResourceNotFound while for others it just returns NotFound. @@ -43,9 +43,12 @@ const ( // We have created 2 different constants for not found error because Azure is not consistent. For certain resources it returns // ResourceNotFound while for others it just returns NotFound. ErrorCodeSubnetNotFound = "NotFound" - // ErrorCodeReferencedResourceNotFound is the error code returned in Azure response if a referenced resource + // ErrorCodeReferencedResourceNotFound is the error code returned in Azure response if a referenced resource // is not found to exist. ErrorCodeReferencedResourceNotFound = "NotFound" + // ErrorCodeAttachDiskWhileBeingDetached is the error code returned in Azure response if there is an attempt to update the DeleteOptions for + // associated Disks when the Disk is currently getting detached. + ErrorCodeAttachDiskWhileBeingDetached = "AttachDiskWhileBeingDetached" ) // ContextTimeoutError creates an error mimicking timeout of a context. diff --git a/pkg/azure/testhelp/fakes/behavior.go b/pkg/azure/testhelp/fakes/behavior.go index 8db99aed2..748723786 100644 --- a/pkg/azure/testhelp/fakes/behavior.go +++ b/pkg/azure/testhelp/fakes/behavior.go @@ -20,32 +20,16 @@ import ( "time" "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/testhelp" + "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/utils" "k8s.io/klog/v2" ) -// ResourceType is an enum type representing type different resource types supported by Azure. -type ResourceType string - -const ( - // VirtualMachinesResourceType is a type used by Azure to represent virtual machine resources. - VirtualMachinesResourceType ResourceType = "Microsoft.Compute/virtualMachines" - // NetworkInterfacesResourceType is a type used by Azure to represent network interfaces resources. - NetworkInterfacesResourceType ResourceType = "microsoft.network/networkinterfaces" //as defined in azure - // VMImageResourceType is a type used by Azure to represent VM Image resources. - // This is not defined in azure, however we have created this to allow defining API behavior for VM Images. - VMImageResourceType ResourceType = "Microsoft.Compute/VMImage" - // MarketPlaceOrderingOfferType is a type used by Azure to represent marketplace ordering offer types. - MarketPlaceOrderingOfferType ResourceType = "Microsoft.MarketplaceOrdering/offertypes" - // SubnetResourceType is a type used by Azure to represent subnet resources. - SubnetResourceType ResourceType = "Microsoft.Network/virtualNetworks/subnets" -) - // APIBehaviorSpec allows tests to define custom behavior either for a specific resource or a resource type. type APIBehaviorSpec struct { resourceReactionsByName map[string]map[string]ResourceReaction // This is primarily going to be used for resource graph behavior specifications // If the query is for a specific type then this map should be populated and used. - resourceReactionsByType map[ResourceType]map[string]ResourceReaction + resourceReactionsByType map[utils.ResourceType]map[string]ResourceReaction } // ResourceReaction captures reaction for a resource. @@ -60,7 +44,7 @@ type ResourceReaction struct { func NewAPIBehaviorSpec() *APIBehaviorSpec { return &APIBehaviorSpec{ resourceReactionsByName: make(map[string]map[string]ResourceReaction), - resourceReactionsByType: make(map[ResourceType]map[string]ResourceReaction), + resourceReactionsByType: make(map[utils.ResourceType]map[string]ResourceReaction), } } @@ -88,14 +72,14 @@ func (s *APIBehaviorSpec) AddErrorResourceReaction(resourceName, method string, // AddContextTimeoutResourceTypeReaction adds a context timeout reaction for all resources of the given resourceType. // Context timeout is simulated after the given timeoutAfter duration when the given method on the resource client is invoked. -func (s *APIBehaviorSpec) AddContextTimeoutResourceTypeReaction(resourceType ResourceType, method string, timeoutAfter time.Duration) *APIBehaviorSpec { +func (s *APIBehaviorSpec) AddContextTimeoutResourceTypeReaction(resourceType utils.ResourceType, method string, timeoutAfter time.Duration) *APIBehaviorSpec { s.initializeResourceTypeReactionMapForResource(resourceType) s.resourceReactionsByType[resourceType][method] = ResourceReaction{timeoutAfter: &timeoutAfter} return s } // AddPanicResourceTypeReaction adds a panic reaction for all resources of a given resourceType when a given method on the resource client is invoked. -func (s *APIBehaviorSpec) AddPanicResourceTypeReaction(resourceType ResourceType, method string) *APIBehaviorSpec { +func (s *APIBehaviorSpec) AddPanicResourceTypeReaction(resourceType utils.ResourceType, method string) *APIBehaviorSpec { s.initializeResourceTypeReactionMapForResource(resourceType) s.resourceReactionsByType[resourceType][method] = ResourceReaction{panic: true} return s @@ -103,7 +87,7 @@ func (s *APIBehaviorSpec) AddPanicResourceTypeReaction(resourceType ResourceType // AddErrorResourceTypeReaction adds an error reaction for all resources of a given resourceType. The give error is returned // when the given method is invoked on the respective resource client. -func (s *APIBehaviorSpec) AddErrorResourceTypeReaction(resourceType ResourceType, method string, err error) *APIBehaviorSpec { +func (s *APIBehaviorSpec) AddErrorResourceTypeReaction(resourceType utils.ResourceType, method string, err error) *APIBehaviorSpec { s.initializeResourceTypeReactionMapForResource(resourceType) s.resourceReactionsByType[resourceType][method] = ResourceReaction{err: err} return s @@ -115,14 +99,14 @@ func (s *APIBehaviorSpec) initializeResourceReactionMapForResource(resourceName } } -func (s *APIBehaviorSpec) initializeResourceTypeReactionMapForResource(resourceType ResourceType) { +func (s *APIBehaviorSpec) initializeResourceTypeReactionMapForResource(resourceType utils.ResourceType) { if _, ok := s.resourceReactionsByType[resourceType]; !ok { s.resourceReactionsByType[resourceType] = make(map[string]ResourceReaction) } } // SimulateForResourceType runs the simulation for a resourceType and method combination using any configured reactions. -func (s *APIBehaviorSpec) SimulateForResourceType(ctx context.Context, resourceGroup string, resourceType *ResourceType, method string) error { +func (s *APIBehaviorSpec) SimulateForResourceType(ctx context.Context, resourceGroup string, resourceType *utils.ResourceType, method string) error { resTypeReaction := s.getResourceTypeReaction(resourceType, method) return doSimulate(ctx, resTypeReaction, fmt.Sprintf("Panicking for ResourceType -> [resourceGroup: %s, type: %s]", resourceGroup, *resourceType)) } @@ -158,7 +142,7 @@ func (s *APIBehaviorSpec) getResourceReaction(resourceName, method string) *Reso return &reaction } -func (s *APIBehaviorSpec) getResourceTypeReaction(resourceType *ResourceType, method string) *ResourceReaction { +func (s *APIBehaviorSpec) getResourceTypeReaction(resourceType *utils.ResourceType, method string) *ResourceReaction { // This will result in a search across all resource types, first reaction matching method will be returned if resourceType == nil { klog.Infof("(getResourceTypeReaction) resourceType passed is nil, will return the first set reaction for the method: %s", method) diff --git a/pkg/azure/testhelp/fakes/clusterstate.go b/pkg/azure/testhelp/fakes/clusterstate.go index 8d57f13fc..63e28846f 100644 --- a/pkg/azure/testhelp/fakes/clusterstate.go +++ b/pkg/azure/testhelp/fakes/clusterstate.go @@ -143,7 +143,7 @@ func (c *ClusterState) WithAgreementTerms(accepted bool) *ClusterState { }, ID: &id, Name: to.Ptr(c.VMImageSpec.SKU), - Type: to.Ptr(string(MarketPlaceOrderingOfferType)), + Type: to.Ptr(string(utils.MarketPlaceOrderingOfferType)), } return c } @@ -231,7 +231,7 @@ func (c *ClusterState) GetSubnet(resourceGroup, subnetName, vnetName string) *ar PrivateLinkServiceNetworkPolicies: to.Ptr(armnetwork.VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded), }, - Type: to.Ptr(string(SubnetResourceType)), + Type: to.Ptr(string(utils.SubnetResourceType)), } } return nil diff --git a/pkg/azure/testhelp/fakes/diskaccess.go b/pkg/azure/testhelp/fakes/diskaccess.go index b63c4cc5c..9e56dc0a9 100644 --- a/pkg/azure/testhelp/fakes/diskaccess.go +++ b/pkg/azure/testhelp/fakes/diskaccess.go @@ -90,7 +90,7 @@ func (b *DiskAccessBuilder) withBeginDelete() *DiskAccessBuilder { // Azure API Disk deletion does not fail if the Disk does not exist. It still returns 200 Ok. disk := b.clusterState.GetDisk(diskName) if disk != nil && !utils.IsNilOrEmptyStringPtr(disk.ManagedBy) { - errResp.SetError(testhelp.ConflictErr(testhelp.ErrorOperationNotAllowed)) + errResp.SetError(testhelp.ConflictErr(testhelp.ErrorCodeOperationNotAllowed)) return } b.clusterState.DeleteDisk(diskName) diff --git a/pkg/azure/testhelp/fakes/imageaccess.go b/pkg/azure/testhelp/fakes/imageaccess.go index 1b6c3d699..9764e09a0 100644 --- a/pkg/azure/testhelp/fakes/imageaccess.go +++ b/pkg/azure/testhelp/fakes/imageaccess.go @@ -25,6 +25,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5" fakecompute "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/fake" "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/testhelp" + "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/utils" ) // ImageAccessBuilder is a builder for VM images access. @@ -50,7 +51,7 @@ func (b *ImageAccessBuilder) WithAPIBehaviorSpec(apiBehaviorSpec *APIBehaviorSpe func (b *ImageAccessBuilder) withGet() *ImageAccessBuilder { b.server.Get = func(ctx context.Context, location string, publisherName string, offer string, skus string, version string, options *armcompute.VirtualMachineImagesClientGetOptions) (resp azfake.Responder[armcompute.VirtualMachineImagesClientGetResponse], errResp azfake.ErrorResponder) { if b.apiBehaviorSpec != nil { - err := b.apiBehaviorSpec.SimulateForResourceType(ctx, b.clusterState.ProviderSpec.ResourceGroup, to.Ptr(VMImageResourceType), testhelp.AccessMethodGet) + err := b.apiBehaviorSpec.SimulateForResourceType(ctx, b.clusterState.ProviderSpec.ResourceGroup, to.Ptr(utils.VMImageResourceType), testhelp.AccessMethodGet) if err != nil { errResp.SetError(err) return diff --git a/pkg/azure/testhelp/fakes/marketplaceagreementaccess.go b/pkg/azure/testhelp/fakes/marketplaceagreementaccess.go index 1b10cfe9b..d1f255a68 100644 --- a/pkg/azure/testhelp/fakes/marketplaceagreementaccess.go +++ b/pkg/azure/testhelp/fakes/marketplaceagreementaccess.go @@ -25,6 +25,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering" fakemktplaceordering "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake" "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/testhelp" + "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/utils" ) // MarketPlaceAgreementAccessBuilder is a builder for MarketPlace Agreement access. @@ -50,7 +51,7 @@ func (b *MarketPlaceAgreementAccessBuilder) WithAPIBehaviorSpec(apiBehaviorSpec func (b *MarketPlaceAgreementAccessBuilder) withGet() *MarketPlaceAgreementAccessBuilder { b.server.Get = func(ctx context.Context, offerType armmarketplaceordering.OfferType, publisherID string, offerID string, planID string, options *armmarketplaceordering.MarketplaceAgreementsClientGetOptions) (resp azfake.Responder[armmarketplaceordering.MarketplaceAgreementsClientGetResponse], errResp azfake.ErrorResponder) { if b.apiBehaviorSpec != nil { - err := b.apiBehaviorSpec.SimulateForResourceType(ctx, b.clusterState.ProviderSpec.ResourceGroup, to.Ptr(MarketPlaceOrderingOfferType), testhelp.AccessMethodGet) + err := b.apiBehaviorSpec.SimulateForResourceType(ctx, b.clusterState.ProviderSpec.ResourceGroup, to.Ptr(utils.MarketPlaceOrderingOfferType), testhelp.AccessMethodGet) if err != nil { errResp.SetError(err) return @@ -60,7 +61,7 @@ func (b *MarketPlaceAgreementAccessBuilder) withGet() *MarketPlaceAgreementAcces agreementTerms := b.clusterState.GetAgreementTerms(offerType, publisherID, offerID) if agreementTerms == nil { // Instead of returning 404 the client returns 400 bad request. See https://github.com/Azure/azure-sdk-for-go/issues/21286 - errResp.SetError(testhelp.BadRequestError(testhelp.ErrorBadRequest)) + errResp.SetError(testhelp.BadRequestError(testhelp.ErrorCodeBadRequest)) return } resp.SetResponse(http.StatusOK, armmarketplaceordering.MarketplaceAgreementsClientGetResponse{AgreementTerms: *agreementTerms}, nil) @@ -74,7 +75,7 @@ func (b *MarketPlaceAgreementAccessBuilder) withGet() *MarketPlaceAgreementAcces func (b *MarketPlaceAgreementAccessBuilder) withCreate() *MarketPlaceAgreementAccessBuilder { b.server.Create = func(ctx context.Context, offerType armmarketplaceordering.OfferType, publisherID string, offerID string, planID string, parameters armmarketplaceordering.AgreementTerms, options *armmarketplaceordering.MarketplaceAgreementsClientCreateOptions) (resp azfake.Responder[armmarketplaceordering.MarketplaceAgreementsClientCreateResponse], errResp azfake.ErrorResponder) { if b.apiBehaviorSpec != nil { - err := b.apiBehaviorSpec.SimulateForResourceType(ctx, b.clusterState.ProviderSpec.ResourceGroup, to.Ptr(MarketPlaceOrderingOfferType), testhelp.AccessMethodCreate) + err := b.apiBehaviorSpec.SimulateForResourceType(ctx, b.clusterState.ProviderSpec.ResourceGroup, to.Ptr(utils.MarketPlaceOrderingOfferType), testhelp.AccessMethodCreate) if err != nil { errResp.SetError(err) return diff --git a/pkg/azure/testhelp/fakes/nicaccess.go b/pkg/azure/testhelp/fakes/nicaccess.go index c83e1d296..4a53d4d3a 100644 --- a/pkg/azure/testhelp/fakes/nicaccess.go +++ b/pkg/azure/testhelp/fakes/nicaccess.go @@ -89,7 +89,7 @@ func (b *NICAccessBuilder) withBeginDelete() *NICAccessBuilder { // Azure API NIC deletion does not fail if the NIC does not exist. It still returns 200 Ok. nic := b.clusterState.GetNIC(nicName) if nic != nil && nic.Properties.VirtualMachine != nil && !utils.IsNilOrEmptyStringPtr(nic.Properties.VirtualMachine.ID) { - errResp.SetError(testhelp.ConflictErr(testhelp.ErrorOperationNotAllowed)) + errResp.SetError(testhelp.ConflictErr(testhelp.ErrorCodeOperationNotAllowed)) return } b.clusterState.DeleteNIC(nicName) diff --git a/pkg/azure/testhelp/fakes/resourcegraphaccess.go b/pkg/azure/testhelp/fakes/resourcegraphaccess.go index 92ebeaf43..1ba46606a 100644 --- a/pkg/azure/testhelp/fakes/resourcegraphaccess.go +++ b/pkg/azure/testhelp/fakes/resourcegraphaccess.go @@ -53,7 +53,7 @@ func (b *ResourceGraphAccessBuilder) WithAPIBehaviorSpec(apiBehaviorSpec *APIBeh // to only test queries that are specified in `helpers.resourcegraph` package. If new queries are added then this implementation should be updated. func (b *ResourceGraphAccessBuilder) withResources() *ResourceGraphAccessBuilder { b.server.Resources = func(ctx context.Context, query armresourcegraph.QueryRequest, options *armresourcegraph.ClientResourcesOptions) (resp azfake.Responder[armresourcegraph.ClientResourcesResponse], errResp azfake.ErrorResponder) { - var resType *ResourceType + var resType *utils.ResourceType if query.Query != nil { resType = getResourceType(*query.Query) } @@ -73,9 +73,9 @@ func (b *ResourceGraphAccessBuilder) withResources() *ResourceGraphAccessBuilder tagsToMatch := b.getProviderSpecTagKeysToMatch() if resType != nil { switch *resType { - case VirtualMachinesResourceType: + case utils.VirtualMachinesResourceType: vmNames = b.clusterState.GetVMsMatchingTagKeys(tagsToMatch) - case NetworkInterfacesResourceType: + case utils.NetworkInterfacesResourceType: vmNames = b.clusterState.ExtractVMNamesFromNICsMatchingTagKeys(tagsToMatch) } } else { @@ -95,12 +95,12 @@ func (b *ResourceGraphAccessBuilder) withResources() *ResourceGraphAccessBuilder // getResourceType tries to find the table name from the query string. Resource graph defines one table per resource type. // Unfortunately I could not find a way to parse the KUSTO Query string to extract the table name and therefore string matching is used here. We can change it if we find a better way -func getResourceType(query string) *ResourceType { +func getResourceType(query string) *utils.ResourceType { switch { - case strings.Contains(query, string(VirtualMachinesResourceType)): - return to.Ptr(VirtualMachinesResourceType) - case strings.Contains(query, string(NetworkInterfacesResourceType)): - return to.Ptr(NetworkInterfacesResourceType) + case strings.Contains(query, string(utils.VirtualMachinesResourceType)): + return to.Ptr(utils.VirtualMachinesResourceType) + case strings.Contains(query, string(utils.NetworkInterfacesResourceType)): + return to.Ptr(utils.NetworkInterfacesResourceType) default: return nil } diff --git a/pkg/azure/testhelp/fakes/subnetaccess.go b/pkg/azure/testhelp/fakes/subnetaccess.go index ac52b953f..721dd52c8 100644 --- a/pkg/azure/testhelp/fakes/subnetaccess.go +++ b/pkg/azure/testhelp/fakes/subnetaccess.go @@ -25,6 +25,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" fakenetwork "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake" "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/testhelp" + "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/utils" ) // SubnetAccessBuilder is a builder for Subnet access. @@ -50,7 +51,7 @@ func (b *SubnetAccessBuilder) WithAPIBehaviorSpec(apiBehaviorSpec *APIBehaviorSp func (b *SubnetAccessBuilder) withGet() *SubnetAccessBuilder { b.server.Get = func(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *armnetwork.SubnetsClientGetOptions) (resp azfake.Responder[armnetwork.SubnetsClientGetResponse], errResp azfake.ErrorResponder) { if b.apiBehaviorSpec != nil { - err := b.apiBehaviorSpec.SimulateForResourceType(ctx, b.clusterState.ProviderSpec.ResourceGroup, to.Ptr(SubnetResourceType), testhelp.AccessMethodGet) + err := b.apiBehaviorSpec.SimulateForResourceType(ctx, b.clusterState.ProviderSpec.ResourceGroup, to.Ptr(utils.SubnetResourceType), testhelp.AccessMethodGet) if err != nil { errResp.SetError(err) return diff --git a/pkg/azure/testhelp/fakes/vmaccess.go b/pkg/azure/testhelp/fakes/vmaccess.go index 99eaed833..e997c658b 100644 --- a/pkg/azure/testhelp/fakes/vmaccess.go +++ b/pkg/azure/testhelp/fakes/vmaccess.go @@ -141,6 +141,11 @@ func (b *VMAccessBuilder) withBeginUpdate() *VMAccessBuilder { return } + if utils.DataDisksMarkedForDetachment(machineResources.VM) { + errResp.SetError(testhelp.ConflictErr(testhelp.ErrorCodeAttachDiskWhileBeingDetached)) + return + } + // NOTE: Currently we are only using update API to set cascade delete option for NIC and Disks. // So to avoid complexity, we will restrict it to only updating cascade delete options only. // If in future the usage changes then changes should also be done here to reflect that. diff --git a/pkg/azure/utils/names.go b/pkg/azure/utils/names.go index 9f641c7aa..4835470c5 100644 --- a/pkg/azure/utils/names.go +++ b/pkg/azure/utils/names.go @@ -21,33 +21,47 @@ import ( ) const ( - nicSuffix = "-nic" - osDiskSuffix = "-os-disk" - dataDiskSuffix = "-data-disk" + // NICSuffix is the suffix for NIC names. + NICSuffix = "-nic" + // OSDiskSuffix is the suffix for OSDisk names. + OSDiskSuffix = "-os-disk" + //DataDiskSuffix is the suffix for Data disk names. + DataDiskSuffix = "-data-disk" // AzureCSIDriverName is the name of the CSI driver name for Azure provider AzureCSIDriverName = "disk.csi.azure.com" ) // CreateNICName creates a NIC name given a VM name func CreateNICName(vmName string) string { - return fmt.Sprintf("%s%s", vmName, nicSuffix) + return fmt.Sprintf("%s%s", vmName, NICSuffix) } // ExtractVMNameFromNICName extracts VM Name from NIC name func ExtractVMNameFromNICName(nicName string) string { - return nicName[:len(nicName)-len(nicSuffix)] + return nicName[:len(nicName)-len(NICSuffix)] +} + +// ExtractVMNameFromOSDiskName extracts VM name from OSDisk name +func ExtractVMNameFromOSDiskName(osDiskName string) string { + return osDiskName[:len(osDiskName)-len(OSDiskSuffix)] } // CreateOSDiskName creates OSDisk name from VM name func CreateOSDiskName(vmName string) string { - return fmt.Sprintf("%s-%s", vmName, osDiskSuffix) + return fmt.Sprintf("%s%s", vmName, OSDiskSuffix) } // CreateDataDiskName creates a name for a DataDisk using VM name and data disk name specified in the provider Spec func CreateDataDiskName(vmName string, dataDisk api.AzureDataDisk) string { prefix := vmName + suffix := GetDataDiskNameSuffix(dataDisk) + return fmt.Sprintf("%s-%s", prefix, suffix) +} + +// GetDataDiskNameSuffix creates the suffix based on an optional data disk name and required lun fields. +func GetDataDiskNameSuffix(dataDisk api.AzureDataDisk) string { infix := getDataDiskInfix(dataDisk) - return fmt.Sprintf("%s-%s%s", prefix, infix, dataDiskSuffix) + return fmt.Sprintf("%s%s", infix, DataDiskSuffix) } func getDataDiskInfix(dataDisk api.AzureDataDisk) string { diff --git a/pkg/azure/utils/names_test.go b/pkg/azure/utils/names_test.go new file mode 100644 index 000000000..1f42e3290 --- /dev/null +++ b/pkg/azure/utils/names_test.go @@ -0,0 +1,62 @@ +package utils + +import ( + "fmt" + "testing" + + "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/api" + . "github.com/onsi/gomega" + "k8s.io/utils/pointer" +) + +const vmName = "shoot--test-project-z1-4567c-xj5sq" + +func TestCreateOSDiskName(t *testing.T) { + g := NewWithT(t) + g.Expect(CreateOSDiskName(vmName)).To(Equal(fmt.Sprintf("%s-os-disk", vmName))) +} + +func TestCreateNICName(t *testing.T) { + g := NewWithT(t) + g.Expect(CreateNICName(vmName)).To(Equal(fmt.Sprintf("%s-nic", vmName))) +} + +func TestCreateDataDiskName(t *testing.T) { + table := []struct { + description string + vmName string + dataDiskName string + lun int32 + expectedDataDiskName string + }{ + { + "should include vmName, data disk name and lun, when data disk name is not empty", vmName, "dd1", 1, fmt.Sprintf("%s-dd1-1-data-disk", vmName), + }, + { + "should exclude data disk name but include vmName and lun, when data disk name is empty", vmName, "", 1, fmt.Sprintf("%s-1-data-disk", vmName), + }, + } + g := NewWithT(t) + for _, entry := range table { + t.Run(entry.description, func(t *testing.T) { + dataDisk := api.AzureDataDisk{ + Name: entry.dataDiskName, + Lun: pointer.Int32(entry.lun), + DiskSizeGB: 10, + } + g.Expect(CreateDataDiskName(vmName, dataDisk)).To(Equal(entry.expectedDataDiskName)) + }) + } +} + +func TestExtractVMNameFromNICName(t *testing.T) { + const nicName = "shoot--test-project-z1-4567c-xj5sq-nic" + g := NewWithT(t) + g.Expect(ExtractVMNameFromNICName(nicName)).To(Equal(vmName)) +} + +func TestExtractVMNameFromOSDiskName(t *testing.T) { + const nicName = "shoot--test-project-z1-4567c-xj5sq-os-disk" + g := NewWithT(t) + g.Expect(ExtractVMNameFromOSDiskName(nicName)).To(Equal(vmName)) +} diff --git a/pkg/azure/utils/resourcetype.go b/pkg/azure/utils/resourcetype.go new file mode 100644 index 000000000..b02d54d03 --- /dev/null +++ b/pkg/azure/utils/resourcetype.go @@ -0,0 +1,20 @@ +package utils + +// ResourceType is an enum type representing type different resource types supported by Azure. +type ResourceType string + +const ( + // VirtualMachinesResourceType is a type used by Azure to represent virtual machine resources. + VirtualMachinesResourceType ResourceType = "microsoft.compute/virtualmachines" + // NetworkInterfacesResourceType is a type used by Azure to represent network interfaces resources. + NetworkInterfacesResourceType ResourceType = "microsoft.network/networkinterfaces" //as defined in azure + // DiskResourceType is a type used by Azure to represent disks (both OS and Data disks) + DiskResourceType ResourceType = "microsoft.network/disks" + // VMImageResourceType is a type used by Azure to represent VM Image resources. + // This is not defined in azure, however we have created this to allow defining API behavior for VM Images. + VMImageResourceType ResourceType = "microsoft.compute/vmimage" + // MarketPlaceOrderingOfferType is a type used by Azure to represent marketplace ordering offer types. + MarketPlaceOrderingOfferType ResourceType = "microsoft.marketplaceordering/offertypes" + // SubnetResourceType is a type used by Azure to represent subnet resources. + SubnetResourceType ResourceType = "microsoft.network/virtualnetworks/subnets" +) diff --git a/pkg/azure/utils/vm.go b/pkg/azure/utils/vm.go new file mode 100644 index 000000000..478f7ea33 --- /dev/null +++ b/pkg/azure/utils/vm.go @@ -0,0 +1,16 @@ +package utils + +import "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5" + +// DataDisksMarkedForDetachment checks if there is at least DataDisk that is marked for detachment. +// If there are no DataDisk(s) configured then it will return false. +func DataDisksMarkedForDetachment(vm *armcompute.VirtualMachine) bool { + if vm.Properties != nil && !IsSliceNilOrEmpty(vm.Properties.StorageProfile.DataDisks) { + for _, dataDisk := range vm.Properties.StorageProfile.DataDisks { + if dataDisk.ToBeDetached != nil && *dataDisk.ToBeDetached { + return true + } + } + } + return false +} From d34e36d56f8520d4d53e827ebc57cdc24927aaa4 Mon Sep 17 00:00:00 2001 From: Madhav Bhargava Date: Mon, 27 Nov 2023 10:40:21 +0530 Subject: [PATCH 2/4] moved to GA support for fakes in azure packages, added handling of VM in terminal state and data disk in detachment --- go.mod | 8 +- go.sum | 20 +- pkg/azure/access/helpers/vm.go | 8 +- pkg/azure/provider/helpers/driver.go | 126 +-- .../helpers/resourcegraphprocessor.go | 10 +- pkg/azure/provider/provider_test.go | 134 ++- pkg/azure/testhelp/fakes/clusterstate.go | 78 +- .../testhelp/fakes/resourcegraphaccess.go | 99 +- pkg/azure/utils/resourcetype.go | 2 +- pkg/azure/utils/vm.go | 5 + .../compute/armcompute/v5/CHANGELOG.md | 6 + .../compute/armcompute/v5/README.md | 33 +- .../compute/armcompute/v5/autorest.md | 5 +- .../armcompute/v5/availabilitysets_client.go | 2 +- .../compute/armcompute/v5/build.go | 2 +- .../v5/capacityreservationgroups_client.go | 2 +- .../v5/capacityreservations_client.go | 26 +- .../compute/armcompute/v5/client_factory.go | 51 +- .../v5/cloudserviceoperatingsystems_client.go | 2 +- .../v5/cloudserviceroleinstances_client.go | 34 +- .../armcompute/v5/cloudserviceroles_client.go | 2 +- .../armcompute/v5/cloudservices_client.go | 74 +- .../v5/cloudservicesupdatedomain_client.go | 10 +- .../v5/communitygalleries_client.go | 2 +- .../v5/communitygalleryimages_client.go | 2 +- .../communitygalleryimageversions_client.go | 2 +- .../compute/armcompute/v5/constants.go | 4 +- .../v5/dedicatedhostgroups_client.go | 2 +- .../armcompute/v5/dedicatedhosts_client.go | 34 +- .../armcompute/v5/diskaccesses_client.go | 42 +- .../v5/diskencryptionsets_client.go | 26 +- .../armcompute/v5/diskrestorepoint_client.go | 12 +- .../compute/armcompute/v5/disks_client.go | 36 +- .../armcompute/v5/fake/server_factory.go | 395 ++++++++ .../compute/armcompute/v5/galleries_client.go | 26 +- .../v5/galleryapplications_client.go | 26 +- .../v5/galleryapplicationversions_client.go | 26 +- .../armcompute/v5/galleryimages_client.go | 26 +- .../v5/galleryimageversions_client.go | 26 +- .../v5/gallerysharingprofile_client.go | 10 +- .../compute/armcompute/v5/images_client.go | 26 +- .../armcompute/v5/loganalytics_client.go | 12 +- .../armcompute/v5/operations_client.go | 2 +- .../v5/proximityplacementgroups_client.go | 2 +- .../armcompute/v5/resourceskus_client.go | 2 +- .../v5/restorepointcollections_client.go | 10 +- .../armcompute/v5/restorepoints_client.go | 18 +- .../armcompute/v5/sharedgalleries_client.go | 2 +- .../v5/sharedgalleryimages_client.go | 2 +- .../v5/sharedgalleryimageversions_client.go | 2 +- .../compute/armcompute/v5/snapshots_client.go | 36 +- .../armcompute/v5/sshpublickeys_client.go | 2 +- .../compute/armcompute/v5/usage_client.go | 2 +- .../virtualmachineextensionimages_client.go | 2 +- .../v5/virtualmachineextensions_client.go | 26 +- .../v5/virtualmachineimages_client.go | 2 +- .../v5/virtualmachineimagesedgezone_client.go | 2 +- .../v5/virtualmachineruncommands_client.go | 26 +- .../armcompute/v5/virtualmachines_client.go | 118 ++- ...virtualmachinescalesetextensions_client.go | 26 +- ...almachinescalesetrollingupgrades_client.go | 26 +- .../v5/virtualmachinescalesets_client.go | 119 ++- ...rtualmachinescalesetvmextensions_client.go | 26 +- ...tualmachinescalesetvmruncommands_client.go | 26 +- .../v5/virtualmachinescalesetvms_client.go | 87 +- .../v5/virtualmachinesizes_client.go | 2 +- .../armmarketplaceordering/CHANGELOG.md | 6 + .../armmarketplaceordering/README.md | 28 +- .../armmarketplaceordering/autorest.md | 6 +- .../armmarketplaceordering/build.go | 2 +- .../armmarketplaceordering/client_factory.go | 4 +- .../armmarketplaceordering/constants.go | 4 +- .../armmarketplaceordering/fake/internal.go | 71 +- .../fake/marketplaceagreements_server.go | 68 +- .../fake/server_factory.go | 82 ++ .../fake/time_rfc3339.go | 40 +- .../marketplaceagreements_client.go | 2 +- .../armmarketplaceordering/models_serde.go | 12 +- .../operations_client.go | 21 +- .../armmarketplaceordering/time_rfc3339.go | 40 +- .../network/armnetwork/v4/CHANGELOG.md | 6 + .../network/armnetwork/v4/README.md | 28 +- .../v4/adminrulecollections_client.go | 26 +- .../armnetwork/v4/adminrules_client.go | 26 +- ...atewayprivateendpointconnections_client.go | 31 +- ...ationgatewayprivatelinkresources_client.go | 21 +- .../v4/applicationgateways_client.go | 89 +- ...cationgatewaywafdynamicmanifests_client.go | 21 +- ...atewaywafdynamicmanifestsdefault_client.go | 2 +- .../v4/applicationsecuritygroups_client.go | 50 +- .../network/armnetwork/v4/autorest.md | 5 +- .../v4/availabledelegations_client.go | 21 +- .../v4/availableendpointservices_client.go | 21 +- .../availableprivateendpointtypes_client.go | 40 +- ...vailableresourcegroupdelegations_client.go | 21 +- .../v4/availableservicealiases_client.go | 40 +- .../v4/azurefirewallfqdntags_client.go | 21 +- .../armnetwork/v4/azurefirewalls_client.go | 65 +- .../armnetwork/v4/bastionhosts_client.go | 55 +- .../v4/bgpservicecommunities_client.go | 21 +- .../network/armnetwork/v4/build.go | 2 +- .../network/armnetwork/v4/client_factory.go | 135 ++- .../v4/configurationpolicygroups_client.go | 31 +- .../v4/connectionmonitors_client.go | 27 +- .../v4/connectivityconfigurations_client.go | 26 +- .../network/armnetwork/v4/constants.go | 4 +- .../armnetwork/v4/customipprefixes_client.go | 50 +- .../v4/ddoscustompolicies_client.go | 12 +- .../v4/ddosprotectionplans_client.go | 50 +- .../v4/defaultsecurityrules_client.go | 21 +- .../armnetwork/v4/dscpconfiguration_client.go | 50 +- ...xpressroutecircuitauthorizations_client.go | 31 +- .../expressroutecircuitconnections_client.go | 31 +- .../v4/expressroutecircuitpeerings_client.go | 31 +- .../v4/expressroutecircuits_client.go | 65 +- .../v4/expressrouteconnections_client.go | 12 +- ...ressroutecrossconnectionpeerings_client.go | 31 +- .../v4/expressroutecrossconnections_client.go | 60 +- .../v4/expressroutegateways_client.go | 17 +- .../armnetwork/v4/expressroutelinks_client.go | 21 +- .../expressrouteportauthorizations_client.go | 31 +- .../armnetwork/v4/expressrouteports_client.go | 50 +- .../v4/expressrouteportslocations_client.go | 21 +- ...xpressrouteproviderportslocation_client.go | 2 +- .../v4/expressrouteserviceproviders_client.go | 21 +- .../v4/fake/adminrulecollections_server.go | 46 +- .../armnetwork/v4/fake/adminrules_server.go | 54 +- ...atewayprivateendpointconnections_server.go | 38 +- ...ationgatewayprivatelinkresources_server.go | 8 +- .../v4/fake/applicationgateways_server.go | 90 +- ...cationgatewaywafdynamicmanifests_server.go | 6 +- ...atewaywafdynamicmanifestsdefault_server.go | 6 +- .../fake/applicationsecuritygroups_server.go | 40 +- .../v4/fake/availabledelegations_server.go | 6 +- .../fake/availableendpointservices_server.go | 6 +- .../availableprivateendpointtypes_server.go | 14 +- ...vailableresourcegroupdelegations_server.go | 8 +- .../v4/fake/availableservicealiases_server.go | 14 +- .../v4/fake/azurefirewallfqdntags_server.go | 2 +- .../v4/fake/azurefirewalls_server.go | 56 +- .../armnetwork/v4/fake/bastionhosts_server.go | 40 +- .../v4/fake/bgpservicecommunities_server.go | 2 +- .../fake/configurationpolicygroups_server.go | 38 +- .../v4/fake/connectionmonitors_server.go | 78 +- .../fake/connectivityconfigurations_server.go | 38 +- .../v4/fake/customipprefixes_server.go | 40 +- .../v4/fake/ddoscustompolicies_server.go | 32 +- .../v4/fake/ddosprotectionplans_server.go | 40 +- .../v4/fake/defaultsecurityrules_server.go | 18 +- .../v4/fake/dscpconfiguration_server.go | 32 +- ...xpressroutecircuitauthorizations_server.go | 38 +- .../expressroutecircuitconnections_server.go | 46 +- .../expressroutecircuitpeerings_server.go | 38 +- .../v4/fake/expressroutecircuits_server.go | 94 +- .../v4/fake/expressrouteconnections_server.go | 38 +- ...ressroutecrossconnectionpeerings_server.go | 38 +- .../expressroutecrossconnections_server.go | 68 +- .../v4/fake/expressroutegateways_server.go | 40 +- .../v4/fake/expressroutelinks_server.go | 18 +- .../expressrouteportauthorizations_server.go | 38 +- .../v4/fake/expressrouteports_server.go | 48 +- .../fake/expressrouteportslocations_server.go | 8 +- ...xpressrouteproviderportslocation_server.go | 2 +- .../expressrouteserviceproviders_server.go | 2 +- .../v4/fake/firewallpolicies_server.go | 40 +- .../firewallpolicyidpssignatures_server.go | 8 +- ...policyidpssignaturesfiltervalues_server.go | 8 +- ...allpolicyidpssignaturesoverrides_server.go | 32 +- ...rewallpolicyrulecollectiongroups_server.go | 38 +- .../armnetwork/v4/fake/flowlogs_server.go | 48 +- .../armnetwork/v4/fake/groups_server.go | 38 +- .../v4/fake/hubroutetables_server.go | 38 +- .../hubvirtualnetworkconnections_server.go | 38 +- .../v4/fake/inboundnatrules_server.go | 38 +- .../v4/fake/inboundsecurityrule_server.go | 10 +- .../fake/interfaceipconfigurations_server.go | 18 +- .../v4/fake/interfaceloadbalancers_server.go | 8 +- .../armnetwork/v4/fake/interfaces_server.go | 142 +-- .../fake/interfacetapconfigurations_server.go | 38 +- .../network/armnetwork/v4/fake/internal.go | 53 +- .../v4/fake/ipallocations_server.go | 40 +- .../armnetwork/v4/fake/ipgroups_server.go | 40 +- .../loadbalancerbackendaddresspools_server.go | 38 +- ...balancerfrontendipconfigurations_server.go | 18 +- .../loadbalancerloadbalancingrules_server.go | 18 +- .../loadbalancernetworkinterfaces_server.go | 8 +- .../fake/loadbalanceroutboundrules_server.go | 18 +- .../v4/fake/loadbalancerprobes_server.go | 18 +- .../v4/fake/loadbalancers_server.go | 64 +- .../v4/fake/localnetworkgateways_server.go | 38 +- .../armnetwork/v4/fake/management_server.go | 102 +- ...ntgroupnetworkmanagerconnections_server.go | 30 +- .../v4/fake/managercommits_server.go | 8 +- .../v4/fake/managerdeploymentstatus_server.go | 8 +- .../armnetwork/v4/fake/managers_server.go | 40 +- .../armnetwork/v4/fake/natgateways_server.go | 40 +- .../armnetwork/v4/fake/natrules_server.go | 38 +- .../v4/fake/p2svpngateways_server.go | 80 +- .../v4/fake/packetcaptures_server.go | 58 +- ...erexpressroutecircuitconnections_server.go | 22 +- .../armnetwork/v4/fake/polymorphic_helpers.go | 189 ---- .../v4/fake/privatednszonegroups_server.go | 38 +- .../v4/fake/privateendpoints_server.go | 32 +- .../v4/fake/privatelinkservices_server.go | 98 +- .../armnetwork/v4/fake/profiles_server.go | 40 +- .../v4/fake/publicipaddresses_server.go | 124 +-- .../v4/fake/publicipprefixes_server.go | 40 +- .../v4/fake/resourcenavigationlinks_server.go | 10 +- .../v4/fake/routefilterrules_server.go | 38 +- .../armnetwork/v4/fake/routefilters_server.go | 40 +- .../armnetwork/v4/fake/routemaps_server.go | 38 +- .../armnetwork/v4/fake/routes_server.go | 38 +- .../armnetwork/v4/fake/routetables_server.go | 40 +- .../v4/fake/routingintent_server.go | 38 +- .../v4/fake/scopeconnections_server.go | 38 +- .../securityadminconfigurations_server.go | 38 +- .../v4/fake/securitygroups_server.go | 40 +- .../fake/securitypartnerproviders_server.go | 40 +- .../v4/fake/securityrules_server.go | 38 +- .../armnetwork/v4/fake/server_factory.go | 949 ++++++++++++++++++ .../v4/fake/serviceassociationlinks_server.go | 10 +- .../v4/fake/serviceendpointpolicies_server.go | 40 +- ...serviceendpointpolicydefinitions_server.go | 38 +- .../v4/fake/servicetaginformation_server.go | 6 +- .../armnetwork/v4/fake/servicetags_server.go | 6 +- .../v4/fake/staticmembers_server.go | 46 +- .../armnetwork/v4/fake/subnets_server.go | 58 +- ...riptionnetworkmanagerconnections_server.go | 20 +- .../armnetwork/v4/fake/time_rfc3339.go | 40 +- .../armnetwork/v4/fake/usages_server.go | 6 +- .../armnetwork/v4/fake/vipswap_server.go | 28 +- .../virtualapplianceconnections_server.go | 38 +- .../v4/fake/virtualappliances_server.go | 40 +- .../v4/fake/virtualappliancesites_server.go | 38 +- .../v4/fake/virtualapplianceskus_server.go | 8 +- .../v4/fake/virtualhubbgpconnection_server.go | 30 +- .../fake/virtualhubbgpconnections_server.go | 28 +- .../fake/virtualhubipconfiguration_server.go | 38 +- .../v4/fake/virtualhubroutetablev2s_server.go | 38 +- .../armnetwork/v4/fake/virtualhubs_server.go | 64 +- ...virtualnetworkgatewayconnections_server.go | 94 +- .../virtualnetworkgatewaynatrules_server.go | 38 +- .../v4/fake/virtualnetworkgateways_server.go | 176 ++-- .../v4/fake/virtualnetworkpeerings_server.go | 38 +- .../v4/fake/virtualnetworks_server.go | 66 +- .../v4/fake/virtualnetworktaps_server.go | 40 +- .../v4/fake/virtualrouterpeerings_server.go | 38 +- .../v4/fake/virtualrouters_server.go | 32 +- .../armnetwork/v4/fake/virtualwans_server.go | 40 +- .../v4/fake/vpnconnections_server.go | 58 +- .../armnetwork/v4/fake/vpngateways_server.go | 64 +- .../v4/fake/vpnlinkconnections_server.go | 34 +- .../v4/fake/vpnserverconfigurations_server.go | 40 +- ...urationsassociatedwithvirtualwan_server.go | 8 +- .../v4/fake/vpnsitelinkconnections_server.go | 12 +- .../armnetwork/v4/fake/vpnsitelinks_server.go | 18 +- .../armnetwork/v4/fake/vpnsites_server.go | 40 +- .../v4/fake/vpnsitesconfiguration_server.go | 8 +- .../armnetwork/v4/fake/watchers_server.go | 136 +-- .../webapplicationfirewallpolicies_server.go | 32 +- .../v4/fake/webcategories_server.go | 8 +- .../armnetwork/v4/firewallpolicies_client.go | 50 +- .../v4/firewallpolicyidpssignatures_client.go | 2 +- ...policyidpssignaturesfiltervalues_client.go | 2 +- ...allpolicyidpssignaturesoverrides_client.go | 2 +- ...rewallpolicyrulecollectiongroups_client.go | 31 +- .../network/armnetwork/v4/flowlogs_client.go | 31 +- .../network/armnetwork/v4/groups_client.go | 26 +- .../armnetwork/v4/hubroutetables_client.go | 31 +- .../v4/hubvirtualnetworkconnections_client.go | 31 +- .../armnetwork/v4/inboundnatrules_client.go | 31 +- .../v4/inboundsecurityrule_client.go | 7 +- .../v4/interfaceipconfigurations_client.go | 21 +- .../v4/interfaceloadbalancers_client.go | 21 +- .../armnetwork/v4/interfaces_client.go | 155 ++- .../v4/interfacetapconfigurations_client.go | 31 +- .../armnetwork/v4/ipallocations_client.go | 50 +- .../network/armnetwork/v4/ipgroups_client.go | 50 +- .../loadbalancerbackendaddresspools_client.go | 31 +- ...balancerfrontendipconfigurations_client.go | 21 +- .../loadbalancerloadbalancingrules_client.go | 21 +- .../loadbalancernetworkinterfaces_client.go | 21 +- .../v4/loadbalanceroutboundrules_client.go | 21 +- .../v4/loadbalancerprobes_client.go | 21 +- .../armnetwork/v4/loadbalancers_client.go | 60 +- .../v4/localnetworkgateways_client.go | 31 +- .../armnetwork/v4/management_client.go | 76 +- ...ntgroupnetworkmanagerconnections_client.go | 21 +- .../armnetwork/v4/managercommits_client.go | 7 +- .../v4/managerdeploymentstatus_client.go | 2 +- .../network/armnetwork/v4/managers_client.go | 45 +- .../network/armnetwork/v4/models_serde.go | 72 +- .../armnetwork/v4/natgateways_client.go | 50 +- .../network/armnetwork/v4/natrules_client.go | 31 +- .../armnetwork/v4/operations_client.go | 21 +- .../armnetwork/v4/p2svpngateways_client.go | 80 +- .../armnetwork/v4/packetcaptures_client.go | 22 +- ...erexpressroutecircuitconnections_client.go | 21 +- .../v4/privatednszonegroups_client.go | 31 +- .../armnetwork/v4/privateendpoints_client.go | 50 +- .../v4/privatelinkservices_client.go | 122 +-- .../network/armnetwork/v4/profiles_client.go | 45 +- .../armnetwork/v4/publicipaddresses_client.go | 131 +-- .../armnetwork/v4/publicipprefixes_client.go | 50 +- .../v4/resourcenavigationlinks_client.go | 2 +- .../armnetwork/v4/routefilterrules_client.go | 31 +- .../armnetwork/v4/routefilters_client.go | 50 +- .../network/armnetwork/v4/routemaps_client.go | 31 +- .../network/armnetwork/v4/routes_client.go | 31 +- .../armnetwork/v4/routetables_client.go | 50 +- .../armnetwork/v4/routingintent_client.go | 31 +- .../armnetwork/v4/scopeconnections_client.go | 21 +- .../v4/securityadminconfigurations_client.go | 26 +- .../armnetwork/v4/securitygroups_client.go | 50 +- .../v4/securitypartnerproviders_client.go | 50 +- .../armnetwork/v4/securityrules_client.go | 31 +- .../v4/serviceassociationlinks_client.go | 2 +- .../v4/serviceendpointpolicies_client.go | 50 +- ...serviceendpointpolicydefinitions_client.go | 31 +- .../v4/servicetaginformation_client.go | 21 +- .../armnetwork/v4/servicetags_client.go | 2 +- .../armnetwork/v4/staticmembers_client.go | 21 +- .../network/armnetwork/v4/subnets_client.go | 41 +- ...riptionnetworkmanagerconnections_client.go | 21 +- .../network/armnetwork/v4/time_rfc3339.go | 40 +- .../network/armnetwork/v4/usages_client.go | 21 +- .../network/armnetwork/v4/vipswap_client.go | 10 +- .../v4/virtualapplianceconnections_client.go | 31 +- .../armnetwork/v4/virtualappliances_client.go | 50 +- .../v4/virtualappliancesites_client.go | 31 +- .../v4/virtualapplianceskus_client.go | 21 +- .../v4/virtualhubbgpconnection_client.go | 12 +- .../v4/virtualhubbgpconnections_client.go | 31 +- .../v4/virtualhubipconfiguration_client.go | 31 +- .../v4/virtualhubroutetablev2s_client.go | 31 +- .../armnetwork/v4/virtualhubs_client.go | 65 +- ...virtualnetworkgatewayconnections_client.go | 66 +- .../virtualnetworkgatewaynatrules_client.go | 31 +- .../v4/virtualnetworkgateways_client.go | 125 ++- .../v4/virtualnetworkpeerings_client.go | 31 +- .../armnetwork/v4/virtualnetworks_client.go | 82 +- .../v4/virtualnetworktaps_client.go | 50 +- .../v4/virtualrouterpeerings_client.go | 31 +- .../armnetwork/v4/virtualrouters_client.go | 50 +- .../armnetwork/v4/virtualwans_client.go | 50 +- .../armnetwork/v4/vpnconnections_client.go | 41 +- .../armnetwork/v4/vpngateways_client.go | 70 +- .../v4/vpnlinkconnections_client.go | 31 +- .../v4/vpnserverconfigurations_client.go | 50 +- ...urationsassociatedwithvirtualwan_client.go | 7 +- .../v4/vpnsitelinkconnections_client.go | 2 +- .../armnetwork/v4/vpnsitelinks_client.go | 21 +- .../network/armnetwork/v4/vpnsites_client.go | 50 +- .../v4/vpnsitesconfiguration_client.go | 7 +- .../network/armnetwork/v4/watchers_client.go | 62 +- .../webapplicationfirewallpolicies_client.go | 45 +- .../armnetwork/v4/webcategories_client.go | 21 +- .../resources/armresources/CHANGELOG.md | 6 + .../resources/armresources/README.md | 28 +- .../resources/armresources/autorest.md | 6 +- .../resources/armresources/build.go | 2 +- .../resources/armresources/client.go | 104 +- .../resources/armresources/client_factory.go | 10 +- .../resources/armresources/constants.go | 4 +- .../deploymentoperations_client.go | 97 +- .../armresources/deployments_client.go | 237 +++-- .../fake/deploymentoperations_server.go | 78 +- .../armresources/fake/deployments_server.go | 300 +++--- .../resources/armresources/fake/internal.go | 66 +- .../fake/providerresourcetypes_server.go | 4 +- .../armresources/fake/providers_server.go | 28 +- .../fake/resourcegroups_server.go | 24 +- .../resources/armresources/fake/server.go | 112 +-- .../armresources/fake/server_factory.go | 116 +++ .../armresources/fake/tags_server.go | 44 +- .../armresources/fake/time_rfc3339.go | 40 +- .../resources/armresources/models_serde.go | 16 +- .../armresources/operations_client.go | 21 +- .../providerresourcetypes_client.go | 2 +- .../armresources/providers_client.go | 40 +- .../armresources/resourcegroups_client.go | 34 +- .../resources/armresources/tags_client.go | 21 +- .../resources/armresources/time_rfc3339.go | 40 +- vendor/modules.txt | 8 +- 384 files changed, 8305 insertions(+), 6794 deletions(-) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/fake/server_factory.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake/server_factory.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/server_factory.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/server_factory.go diff --git a/go.mod b/go.mod index ef6e7de17..7d9765e58 100644 --- a/go.mod +++ b/go.mod @@ -5,11 +5,11 @@ go 1.21 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.0-beta.2 - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.3.0-beta.2 - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering v1.2.0-beta.3 - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0-beta.1 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.3.0 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering v1.2.0 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.8.2 - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0-beta.3 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 github.com/gardener/machine-controller-manager v0.50.1 github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.27.4 diff --git a/go.sum b/go.sum index 9ca033500..d76431d02 100644 --- a/go.sum +++ b/go.sum @@ -39,20 +39,20 @@ github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.2.0 h1:xZaKaIde2fNBQ6c github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.2.0/go.mod h1:veBEHsnzafwWVNkJ71OdC2tqipKKauNabOxdoi05Mhk= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0 h1:d81/ng9rET2YqdVkVwkb6EXeRrLJIwyGnJcAlAWKwhs= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0/go.mod h1:s4kgfzA0covAXNicZHDMN58jExvcng2mC/DepXiF1EI= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.3.0-beta.2 h1:RBfZY7RzRdkxUkjjKPT25FmqAp/oSFRb9V/57q9wqNw= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.3.0-beta.2/go.mod h1:lnOBBuKriNkBc3Bybhmcnszj/qBliLx+7Oisguurg9I= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2/go.mod h1:FbdwsQ2EzwvXxOPcMFYO8ogEc9uMMIj3YkmCdXdAFmk= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.3.0 h1:qgs/VAMSR+9qFhwTw4OwF2NbVuw+2m83pVZJjqkKQMw= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.3.0/go.mod h1:uYt4CfhkJA9o0FN7jfE5minm/i4nUE4MjGUJkzB6Zs8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0 h1:PTFGRSlMKCQelWwxUyYVEUqseBJVemLyqWJjvMyt0do= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0/go.mod h1:LRr2FzBTQlONPPa5HREE5+RjSCTXl7BwOvYOaWTqCaI= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups v1.0.0 h1:pPvTJ1dY0sA35JOeFq6TsY2xj6Z85Yo23Pj4wCCvu4o= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups v1.0.0/go.mod h1:mLfWfj8v3jfWKsL9G4eoBoXVcsqcIUTapmdKy7uGOp0= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering v1.2.0-beta.3 h1:Ck4bBDdwvw09rctYAIFjsNdGPBvH2J65CtCdEKC/AiM= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering v1.2.0-beta.3/go.mod h1:C/6PihoAZ9Jihn1VCOJzVnC7sqonTFeOnJsrFsoxRB0= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0-beta.1 h1:z6AuIOPwm8xSIaoJ3nE5ysZ0hfbDP+uHpFvX6VvGv5E= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0-beta.1/go.mod h1:6mvQPUvc5ySNuk0etF/MV1f76u2Ja5Eb/Q8KjdxG63U= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering v1.2.0 h1:GdgOqiWT+9hidDxPqrugVKp0D7urLYs3/yvgYPvvSBQ= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering v1.2.0/go.mod h1:HfaiNTisneFxZGjRZOUk18BgHc23ccL4/cV7k+31tVw= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 h1:bXwSugBiSbgtz7rOtbfGf+woewp4f06orW9OP5BjHLA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0/go.mod h1:Y/HgrePTmGy9HjdSGTqZNa+apUpTVIEVKXJyARP2lrk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.8.2 h1:f9lam+D19V0TDn17+aFhrVhWPpfsF5zaGHeqDGJZAVc= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.8.2/go.mod h1:29c9+gYpdWhyC4TPANZBPlgoWllMDhguL2AIByPYQtk= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0-beta.3 h1:C2ok9YgfllIRAJt1DteTWAnEXi1cywc6tBFP8OwiCTg= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0-beta.3/go.mod h1:tN8Aon9i+H4GMuEF2LAr8F2nMgFLev0gsrzi9hM5vEA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 h1:Dd+RhdJn0OTtVGaeDLZpcumkIVCtA/3/Fo42+eoYvVM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0/go.mod h1:5kakwfW5CjC9KK+Q4wjXAg+ShuIm2mBMua0ZFj2C8PE= github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM= github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE= github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk= diff --git a/pkg/azure/access/helpers/vm.go b/pkg/azure/access/helpers/vm.go index fcc3c168a..f8656eb7a 100644 --- a/pkg/azure/access/helpers/vm.go +++ b/pkg/azure/access/helpers/vm.go @@ -60,11 +60,15 @@ func GetVirtualMachine(ctx context.Context, vmClient *armcompute.VirtualMachines // DeleteVirtualMachine deletes the Virtual Machine with the give name and belonging to the passed in resource group. // If cascade delete is set for associated NICs and Disks then these resources will also be deleted along with the VM. // NOTE: All calls to this Azure API are instrumented as prometheus metric. -func DeleteVirtualMachine(ctx context.Context, vmAccess *armcompute.VirtualMachinesClient, resourceGroup, vmName string) (err error) { +func DeleteVirtualMachine(ctx context.Context, vmAccess *armcompute.VirtualMachinesClient, resourceGroup, vmName string, forceDelete bool) (err error) { defer instrument.RecordAzAPIMetric(err, vmDeleteServiceLabel, time.Now()) delCtx, cancelFn := context.WithTimeout(ctx, defaultDeleteVMTimeout) defer cancelFn() - poller, err := vmAccess.BeginDelete(delCtx, resourceGroup, vmName, nil) + deleteOptions := armcompute.VirtualMachinesClientBeginDeleteOptions{} + if forceDelete { + deleteOptions.ForceDeletion = &forceDelete + } + poller, err := vmAccess.BeginDelete(delCtx, resourceGroup, vmName, &deleteOptions) if err != nil { errors.LogAzAPIError(err, "Failed to trigger delete of VM [ResourceGroup: %s, VMName: %s]", resourceGroup, vmName) return diff --git a/pkg/azure/provider/helpers/driver.go b/pkg/azure/provider/helpers/driver.go index d9778d3e2..0e1e32321 100644 --- a/pkg/azure/provider/helpers/driver.go +++ b/pkg/azure/provider/helpers/driver.go @@ -104,97 +104,6 @@ func DeriveInstanceID(location, vmName string) string { return fmt.Sprintf("azure:///%s/%s", location, vmName) } -// Helper functions used for driver.ListMachines -// --------------------------------------------------------------------------------------------------------------------- - -const ( - listVMsQueryTemplate = ` - Resources - | where type =~ 'Microsoft.Compute/virtualMachines' - | where resourceGroup =~ '%s' - | extend tagKeys = bag_keys(tags) - | where tagKeys has '%s' and tagKeys has '%s' - | project name - ` - listNICsQueryTemplate = ` - Resources - | where type =~ 'microsoft.network/networkinterfaces' - | where resourceGroup =~ '%s' - | extend tagKeys = bag_keys(tags) - | where tagKeys has '%s' and tagKeys has '%s' - | project name - ` - - listDisksQueryTemplate = ` - Resources - | where type =~ 'microsoft.network/disks' - | where resourceGroup =~ '%s' - | extend tagKeys = bag_keys(tags) - | where tagKeys has '%s' and tagKeys has '%s' - | project name - ` - - nicSuffix = "-nic" -) - -// ExtractVMNamesFromVirtualMachinesAndNICs extracts VM names from virtual machines and NIC names and returns a slice of unique vm names. -// This method uses azure resource graph client which in turn uses KUSTO as their query language. -// For additional information on KUSTO start here: [https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/] -//func ExtractVMNamesFromVirtualMachinesAndNICs(ctx context.Context, factory access.Factory, connectConfig access.ConnectConfig, resourceGroup string, providerSpecTags map[string]string) ([]string, error) { -// rgAccess, err := factory.GetResourceGraphAccess(connectConfig) -// if err != nil { -// return nil, err -// } -// vmNames := sets.New[string]() -// -// queryTemplateArgs := prepareQueryTemplateArgs(resourceGroup, providerSpecTags) -// vmNamesFromVirtualMachines, err := accesshelpers.QueryAndMap[string](ctx, rgAccess, connectConfig.SubscriptionID, createVMNameMapperFn(nil), listVMsQueryTemplate, queryTemplateArgs...) -// if err != nil { -// return nil, status.WrapError(codes.Internal, fmt.Sprintf("failed to get VM names from VirtualMachines for resourceGroup :%s: error: %v", resourceGroup, err), err) -// } -// vmNames.Insert(vmNamesFromVirtualMachines...) -// -// // extract VM Names from existing NICs. Why is this required? -// // A Machine in MCM terminology is a collective entity consisting of but not limited to VM, NIC(s), Disk(s). -// // MCM orphan collection needs to track resources which have a separate lifecycle and are orphaned. Currently in case of azure it is VM's and NICs. -// // Disks (OS and Data) are created and deleted along with the VM. -// // In order to get any orphaned VM or NIC, its currently essential that a machine name(collective entity) should be collected -// // by introspecting VMs and NICs. -// vmNamesFromNICs, err := accesshelpers.QueryAndMap[string](ctx, rgAccess, connectConfig.SubscriptionID, createVMNameMapperFn(to.Ptr(nicSuffix)), listNICsQueryTemplate, queryTemplateArgs...) -// if err != nil { -// return nil, status.WrapError(codes.Internal, fmt.Sprintf("failed to get VM names from NICs for resourceGroup :%s: error: %v", resourceGroup, err), err) -// } -// vmNames.Insert(vmNamesFromNICs...) -// -// return vmNames.UnsortedList(), nil -//} - -//func prepareQueryTemplateArgs(resourceGroup string, providerSpecTags map[string]string) []any { -// // NOTE: length is 3 because in the query we have a max of 3 parameter substitutions. This should be changed if the number of parameters change to prevent unnecessary resizing. -// templateArgs := make([]any, 0, 3) -// // NOTE: preserve the same order as these are ordered parameters which will be used for substitution. -// templateArgs = append(templateArgs, resourceGroup) -// for k := range providerSpecTags { -// if strings.HasPrefix(k, utils.ClusterTagPrefix) || strings.HasPrefix(k, utils.RoleTagPrefix) { -// templateArgs = append(templateArgs, k) -// } -// } -// return templateArgs -//} - -//func createVMNameMapperFn(suffix *string) accesshelpers.MapperFn[string] { -// return func(r map[string]interface{}) *string { -// if resourceNameVal, keyFound := r["name"]; keyFound { -// resourceName := resourceNameVal.(string) -// if suffix != nil && strings.HasSuffix(resourceName, *suffix) { -// return to.Ptr(resourceName[:len(resourceName)-len(*suffix)]) -// } -// return to.Ptr(resourceName) -// } -// return nil -// } -//} - // Helper functions used for driver.DeleteMachine // --------------------------------------------------------------------------------------------------------------------- @@ -258,32 +167,35 @@ func CheckAndDeleteLeftoverNICsAndDisks(ctx context.Context, factory access.Fact // Once that is set then it deletes the VM. This will ensure that no separate calls to delete each NIC and DISK are made as they will get deleted along with the VM in one single atomic call. func UpdateCascadeDeleteOptionsAndDeleteVM(ctx context.Context, vmAccess *armcompute.VirtualMachinesClient, resourceGroup string, vm *armcompute.VirtualMachine) error { vmName := *vm.Name + if isVirtualMachineInTerminalState(vm) { + klog.Infof("VM: [ResourceGroup: %s, Name: %s] is stuck in terminal state, force deleting the VM", resourceGroup, vmName) + if err := accesshelpers.DeleteVirtualMachine(ctx, vmAccess, resourceGroup, vmName, true); err != nil { + return status.WrapError(codes.Internal, fmt.Sprintf("Failed to delete VM: [ResourceGroup: %s, Name: %s], Err: %v", resourceGroup, vmName, err), err) + } + return nil + } + vmUpdateParams := computeDeleteOptionUpdatesForNICsAndDisksIfRequired(resourceGroup, vm) if vmUpdateParams != nil { - if canUpdateVirtualMachine(vm) { - // update the VM and set cascade delete on NIC and Disks (OSDisk and DataDisks) if not already set and then trigger VM deletion. - err := accesshelpers.SetCascadeDeleteForNICsAndDisks(ctx, vmAccess, resourceGroup, vmName, vmUpdateParams) - if err != nil { - return status.WrapError(codes.Internal, fmt.Sprintf("Failed to update cascade delete of associated resources for VM: [ResourceGroup: %s, Name: %s], Err: %v", resourceGroup, vmName, err), err) - } - } else { - return status.New(codes.Internal, fmt.Sprintf("Cannot update VM: [ResourceGroup: %s, Name: %s]. Either the VM is in terminal state or there are one or more data disks that are marked for detachment", resourceGroup, vmName)) + if utils.DataDisksMarkedForDetachment(vm) { + return status.New(codes.Internal, fmt.Sprintf("Cannot update VM: [ResourceGroup: %s, Name: %s]. There are one or more data disks that are marked for detachment, update to this VM will fail.", resourceGroup, vmName)) + } + // update the VM and set cascade delete on NIC and Disks (OSDisk and DataDisks) if not already set and then trigger VM deletion. + klog.V(4).Infof("Updating cascade deletion options for VM: [ResourceGroup: %s, Name: %s] resources", resourceGroup, vmName) + err := accesshelpers.SetCascadeDeleteForNICsAndDisks(ctx, vmAccess, resourceGroup, vmName, vmUpdateParams) + if err != nil { + return status.WrapError(codes.Internal, fmt.Sprintf("Failed to update cascade delete of associated resources for VM: [ResourceGroup: %s, Name: %s], Err: %v", resourceGroup, vmName, err), err) } } - err := accesshelpers.DeleteVirtualMachine(ctx, vmAccess, resourceGroup, vmName) + err := accesshelpers.DeleteVirtualMachine(ctx, vmAccess, resourceGroup, vmName, false) if err != nil { return status.WrapError(codes.Internal, fmt.Sprintf("Failed to delete VM: [ResourceGroup: %s, Name: %s], Err: %v", resourceGroup, vmName, err), err) } return nil } -// canUpdateVirtualMachine checks if it is safe to update VirtualMachine. -// Virtual machine update will fail if DataDisk has ToBeDetached set to true indicating that the data disk detachment is currently in progress. -func canUpdateVirtualMachine(vm *armcompute.VirtualMachine) bool { - // If the VM is in terminal state then any call to update the VM will be rejected by Azure with `OperationNotAllowed` error code. - // The check here will prevent such calls to be made when we know that it will surely fail thus also alleviating the chance of throttling of client API requests. - vmInTerminalState := vm.Properties.ProvisioningState != nil && *vm.Properties.ProvisioningState == "Failed" - return !utils.DataDisksMarkedForDetachment(vm) && !vmInTerminalState +func isVirtualMachineInTerminalState(vm *armcompute.VirtualMachine) bool { + return vm.Properties != nil && vm.Properties.ProvisioningState != nil && strings.ToLower(*vm.Properties.ProvisioningState) == "failed" } // computeDeleteOptionUpdatesForNICsAndDisksIfRequired computes changes required to set cascade delete options for NICs, OSDisk and DataDisks. diff --git a/pkg/azure/provider/helpers/resourcegraphprocessor.go b/pkg/azure/provider/helpers/resourcegraphprocessor.go index 918e8b944..533a2d614 100644 --- a/pkg/azure/provider/helpers/resourcegraphprocessor.go +++ b/pkg/azure/provider/helpers/resourcegraphprocessor.go @@ -18,7 +18,7 @@ import ( const ( listVmsNICsAndDisksQueryTemplate = ` Resources - | where type =~ 'microsoft.network/virtualMachines' or type =~ 'microsoft.network/networkinterfaces' or type =~ 'microsoft.compute/disks' + | where type =~ 'microsoft.compute/virtualmachines' or type =~ 'microsoft.network/networkinterfaces' or type =~ 'microsoft.compute/disks' | where resourceGroup =~ '%s' | extend tagKeys = bag_keys(tags) | where tagKeys has '%s' and tagKeys has '%s' @@ -67,12 +67,12 @@ func prepareQueryTemplateArgs(resourceGroup string, providerSpecTags map[string] func createVMNameMapperFn() accesshelpers.MapperFn[resultEntry] { return func(m map[string]interface{}) *resultEntry { - resourceName, nameKeyFound := m["name"] - resourceType, typeKeyFound := m["type"] + resourceName, nameKeyFound := m["name"].(string) + resourceType, typeKeyFound := m["type"].(string) if nameKeyFound && typeKeyFound { return to.Ptr(resultEntry{ - resourceType: resourceType.(utils.ResourceType), - name: resourceName.(string), + resourceType: utils.ResourceType(resourceType), + name: resourceName, }) } return nil diff --git a/pkg/azure/provider/provider_test.go b/pkg/azure/provider/provider_test.go index 69d36023e..63debf947 100644 --- a/pkg/azure/provider/provider_test.go +++ b/pkg/azure/provider/provider_test.go @@ -100,7 +100,6 @@ func TestDeleteMachineWhenVMExists(t *testing.T) { checkClusterStateAndGetMachineResources(g, ctx, factory, vmName, false, false, false, dataDiskNames, false, true) }, }, - {}, { "should skip delete if the resource group is not found", testResourceGroupName, @@ -258,6 +257,106 @@ func TestDeleteMachineWhenVMDoesNotExist(t *testing.T) { } } +//func TestForceDeleteVMInTerminalState(t *testing.T) { +// const vmName = "test-vm-0" +// +// table := []struct { +// description string +// cascadeDeleteOpts fakes.CascadeDeleteOpts +// numDataDisks int +// checkClusterStateFn func(g *WithT, ctx context.Context, factory fakes.Factory, vmName string, dataDiskNames []string) +// }{ +// { +// "should only delete the VM since no cascade delete is set for NIC and Disks", +// fakes.CascadeDeleteOpts{}, 1, +// func(g *WithT, ctx context.Context, factory fakes.Factory, vmName string, dataDiskNames []string) { +// checkClusterStateAndGetMachineResources(g, ctx, factory, vmName, false, true, true, dataDiskNames, true, true) +// }, +// }, +// { +// "should delete the VM and all its associated resources when cascade delete is set", +// fakes.CascadeDeleteAllResources, 1, +// func(g *WithT, ctx context.Context, factory fakes.Factory, vmName string, dataDiskNames []string) { +// checkClusterStateAndGetMachineResources(g, ctx, factory, vmName, false, false, false, dataDiskNames, false, false) +// }, +// }, +// } +// +// g := NewWithT(t) +// for _, entry := range table { +// t.Run(entry.description, func(t *testing.T) { +// ctx := context.Background() +// // create provider spec +// providerSpecBuilder := testhelp.NewProviderSpecBuilder(testResourceGroupName, testShootNs, testWorkerPool0Name).WithDefaultValues() +// if entry.numDataDisks > 0 { +// //Add data disks +// providerSpecBuilder.WithDataDisks(testDataDiskName, entry.numDataDisks) +// } +// providerSpec := providerSpecBuilder.Build() +// // create cluster state +// clusterState := fakes.NewClusterState(providerSpec) +// clusterState.AddMachineResources(fakes.NewMachineResourcesBuilder(providerSpec, vmName).WithCascadeDeleteOptions(entry.cascadeDeleteOpts).BuildWith(true, true, true, true, nil)) +// clusterState.MarkVirtualMachineInTerminalState(vmName) +// +// // create fake factory +// fakeFactory := createDefaultFakeFactoryForDeleteMachine(g, providerSpec.ResourceGroup, clusterState) +// +// // Create machine and machine class to be used to create DeleteMachineRequest +// machineClass, err := fakes.CreateMachineClass(providerSpec, to.Ptr(testResourceGroupName)) +// g.Expect(err).To(BeNil()) +// machine := &v1alpha1.Machine{ +// ObjectMeta: fakes.NewMachineObjectMeta(testShootNs, vmName), +// } +// +// // Test +// //---------------------------------------------------------------------------- +// testDriver := NewDefaultDriver(fakeFactory) +// _, err = testDriver.DeleteMachine(ctx, &driver.DeleteMachineRequest{ +// Machine: machine, +// MachineClass: machineClass, +// Secret: fakes.CreateProviderSecret(), +// }) +// g.Expect(err).To(BeNil()) +// dataDiskNames := testhelp.CreateDataDiskNames(vmName, providerSpec) +// entry.checkClusterStateFn(g, ctx, *fakeFactory, vmName, dataDiskNames) +// }) +// } +//} + +func TestDeleteExistingVMWithDataDisksInDetachment(t *testing.T) { + const vmName = "test-vm-0" + g := NewWithT(t) + ctx := context.Background() + // create provider spec + providerSpec := testhelp.NewProviderSpecBuilder(testResourceGroupName, testShootNs, testWorkerPool0Name).WithDefaultValues().WithDataDisks(testDataDiskName, 2).Build() + // create cluster state + clusterState := fakes.NewClusterState(providerSpec) + clusterState.AddMachineResources(fakes.NewMachineResourcesBuilder(providerSpec, vmName).WithCascadeDeleteOptions(fakes.CascadeDeleteOpts{}).BuildWith(true, true, true, true, nil)) + g.Expect(clusterState.MarkAllDataDisksInDetachment(vmName)).To(BeTrue()) + + // create fake factory + fakeFactory := createDefaultFakeFactoryForDeleteMachine(g, providerSpec.ResourceGroup, clusterState) + + // Create machine and machine class to be used to create DeleteMachineRequest + machineClass, err := fakes.CreateMachineClass(providerSpec, to.Ptr(testResourceGroupName)) + g.Expect(err).To(BeNil()) + machine := &v1alpha1.Machine{ + ObjectMeta: fakes.NewMachineObjectMeta(testShootNs, vmName), + } + // Test + //---------------------------------------------------------------------------- + testDriver := NewDefaultDriver(fakeFactory) + _, err = testDriver.DeleteMachine(ctx, &driver.DeleteMachineRequest{ + Machine: machine, + MachineClass: machineClass, + Secret: fakes.CreateProviderSecret(), + }) + g.Expect(err).ToNot(BeNil()) + var statusErr *status.Status + g.Expect(errors.As(err, &statusErr)).To(BeTrue()) + g.Expect(statusErr.Code()).To(Equal(codes.Internal)) +} + func TestDeleteMachineWithInducedErrors(t *testing.T) { const ( testErrorCode = "test-error-code" @@ -500,6 +599,8 @@ func TestListMachines(t *testing.T) { vmTags map[string]string // if present this will overwrite the tags that are borrowed from provider spec for this machine resource NIC. Only specify this when nicPresent is true else it will never reflect. nicTags map[string]string + // if present this will overwrite the tags that are borrowed from provider spec for this machine resource OSDisk. Only specify this when nicPresent is true else it will never reflect. + osDiskTags map[string]string } const nonMatchingShootNs = "non-matching-shoot-ns" @@ -522,25 +623,32 @@ func TestListMachines(t *testing.T) { { "should return all vm names where vms exist", []machineResourcesTestSpec{ - {"vm-0", true, true, true, nil, nil}, - {"vm-1", true, true, true, nil, nil}, + {"vm-0", true, true, true, nil, nil, nil}, + {"vm-1", true, true, true, nil, nil, nil}, }, nil, []string{"vm-0", "vm-1"}, false, }, { "should return vm names only for vms where vm does not exist but a nic exists", []machineResourcesTestSpec{ - {"vm-0", false, false, false, nil, nil}, - {"vm-1", false, false, true, nil, nil}, + {"vm-0", false, false, false, nil, nil, nil}, + {"vm-1", false, false, true, nil, nil, nil}, + }, nil, []string{"vm-1"}, false, + }, + { + "should return vm names only for vms where vm does not exist but an osdisk exists", + []machineResourcesTestSpec{ + {"vm-0", false, false, false, nil, nil, nil}, + {"vm-1", false, true, false, nil, nil, nil}, }, nil, []string{"vm-1"}, false, }, { "should only return vms matching mandatory provider spec tags", []machineResourcesTestSpec{ - {"vm-0", true, true, true, nonMatchingTags, nonMatchingTags}, - {"vm-1", true, true, true, nil, nil}, - {"vm-2", true, true, true, nonMatchingTags, nonMatchingTags}, - {"vm-3", true, true, true, nil, nil}, - {"vm-4", true, true, true, nonMatchingTags, nil}, + {"vm-0", true, true, true, nonMatchingTags, nonMatchingTags, nonMatchingTags}, + {"vm-1", true, true, true, nil, nil, nil}, + {"vm-2", true, true, true, nonMatchingTags, nonMatchingTags, nonMatchingTags}, + {"vm-3", true, true, true, nil, nil, nil}, + {"vm-4", true, true, true, nonMatchingTags, nil, nonMatchingTags}, }, nil, []string{"vm-1", "vm-3", "vm-4"}, false, }, } @@ -570,6 +678,9 @@ func TestListMachines(t *testing.T) { if mrTestSpec.nicPresent && mrTestSpec.nicTags != nil { mr.NIC.Tags = utils.CreateResourceTags(mrTestSpec.nicTags) } + if mrTestSpec.osDiskPresent && mrTestSpec.osDiskTags != nil { + mr.OSDisk.Tags = utils.CreateResourceTags(mrTestSpec.osDiskTags) + } clusterState.AddMachineResources(mr) } } @@ -589,7 +700,8 @@ func TestListMachines(t *testing.T) { Secret: fakes.CreateProviderSecret(), }) g.Expect(err != nil).To(Equal(entry.expectedErr)) - g.Expect(fakes.ActualSliceEqualsExpectedSlice(getVMNamesFromListMachineResponse(listMachinesResp), entry.expectedResult)).To(BeTrue()) + actualVMNames := getVMNamesFromListMachineResponse(listMachinesResp) + g.Expect(fakes.ActualSliceEqualsExpectedSlice(actualVMNames, entry.expectedResult)).To(BeTrue()) }) } } diff --git a/pkg/azure/testhelp/fakes/clusterstate.go b/pkg/azure/testhelp/fakes/clusterstate.go index 63e28846f..c62d69b3b 100644 --- a/pkg/azure/testhelp/fakes/clusterstate.go +++ b/pkg/azure/testhelp/fakes/clusterstate.go @@ -26,7 +26,6 @@ import ( "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/api" "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/testhelp" "github.com/gardener/machine-controller-manager-provider-azure/pkg/azure/utils" - "golang.org/x/exp/slices" ) @@ -237,6 +236,37 @@ func (c *ClusterState) GetSubnet(resourceGroup, subnetName, vnetName string) *ar return nil } +// MarkVirtualMachineInTerminalState marks the virtual machine in terminal state. +func (c *ClusterState) MarkVirtualMachineInTerminalState(vmName string) bool { + if machineResources, ok := c.MachineResourcesMap[vmName]; ok { + if machineResources.VM == nil || machineResources.VM.Properties == nil { + // There is no VM present, skipping marking the VM in terminal state + return false + } + machineResources.VM.Properties.ProvisioningState = to.Ptr(utils.ProvisioningStateFailed) + } + // There is no VM with the given vmName + return false +} + +// MarkAllDataDisksInDetachment marks all data disks that are captured as part of VirtualMachine.Properties.StorageProfile.DataDisks as currently being detached. +func (c *ClusterState) MarkAllDataDisksInDetachment(vmName string) bool { + if machineResources, ok := c.MachineResourcesMap[vmName]; ok { + if machineResources.VM == nil || + machineResources.VM.Properties == nil || + machineResources.VM.Properties.StorageProfile == nil || + utils.IsSliceNilOrEmpty(machineResources.VM.Properties.StorageProfile.DataDisks) { + return false + } + for _, dataDisk := range machineResources.VM.Properties.StorageProfile.DataDisks { + dataDisk.ToBeDetached = to.Ptr(true) + } + return true + } + // There is no VM with the given vmName + return false +} + // GetVM returns an armcompute.VirtualMachine having the same name as the passed in vmName. func (c *ClusterState) GetVM(vmName string) *armcompute.VirtualMachine { if machineResources, ok := c.MachineResourcesMap[vmName]; ok { @@ -372,32 +402,52 @@ func (c *ClusterState) DeleteDisk(diskName string) { } } -// ExtractVMNamesFromNICsMatchingTagKeys extracts VM names from all configured NICs in the ClusterState that has all tagKeys. -func (c *ClusterState) ExtractVMNamesFromNICsMatchingTagKeys(tagKeys []string) []string { +// GetVMsMatchingTagKeys returns VM names for all configured VMs in the ClusterState that has all tagKeys. +func (c *ClusterState) GetVMsMatchingTagKeys(tagKeys []string) []string { vmNames := make([]string, 0, len(c.MachineResourcesMap)) for vmName, mr := range c.MachineResourcesMap { + if mr.VM != nil { + // check if all tag keys are present for this VM + if containsAllTagKeys(mr.VM.Tags, tagKeys) { + vmNames = append(vmNames, vmName) + } + } + } + return vmNames +} + +// GetNICNamesMatchingTagKeys returns NIC names in ClusterState that has all tagKeys. +func (c *ClusterState) GetNICNamesMatchingTagKeys(tagKeys []string) []string { + nicNames := make([]string, 0, len(c.MachineResourcesMap)) + for _, mr := range c.MachineResourcesMap { if mr.NIC != nil { // check if all tag keys are present for this NIC if containsAllTagKeys(mr.NIC.Tags, tagKeys) { - vmNames = append(vmNames, vmName) + nicNames = append(nicNames, *mr.NIC.Name) } } } - return vmNames + return nicNames } -// GetVMsMatchingTagKeys returns VM names for all configured VMs in the ClusterState that has all tagKeys. -func (c *ClusterState) GetVMsMatchingTagKeys(tagKeys []string) []string { - vmNames := make([]string, 0, len(c.MachineResourcesMap)) - for vmName, mr := range c.MachineResourcesMap { - if mr.VM != nil { - // check if all tag keys are present for this VM - if containsAllTagKeys(mr.VM.Tags, tagKeys) { - vmNames = append(vmNames, vmName) +// GetDiskNamesMatchingTagKeys returns Disk (OS and Data disk) names in ClusterState that has all tagKeys. +func (c *ClusterState) GetDiskNamesMatchingTagKeys(tagKeys []string) []string { + var diskNames []string + for _, mr := range c.MachineResourcesMap { + if mr.OSDisk != nil { + if containsAllTagKeys(mr.OSDisk.Tags, tagKeys) { + diskNames = append(diskNames, *mr.OSDisk.Name) + } + } + if mr.DataDisks != nil { + for _, disk := range mr.DataDisks { + if containsAllTagKeys(disk.Tags, tagKeys) { + diskNames = append(diskNames, *disk.Name) + } } } } - return vmNames + return diskNames } func containsAllTagKeys(resourceTags map[string]*string, tagKeys []string) bool { diff --git a/pkg/azure/testhelp/fakes/resourcegraphaccess.go b/pkg/azure/testhelp/fakes/resourcegraphaccess.go index 1ba46606a..fc8ff956d 100644 --- a/pkg/azure/testhelp/fakes/resourcegraphaccess.go +++ b/pkg/azure/testhelp/fakes/resourcegraphaccess.go @@ -50,60 +50,74 @@ func (b *ResourceGraphAccessBuilder) WithAPIBehaviorSpec(apiBehaviorSpec *APIBeh } // withResources sets the implementation for `Resources` method. The implementation is not generic and currently only assumes that user will use this fake server method -// to only test queries that are specified in `helpers.resourcegraph` package. If new queries are added then this implementation should be updated. +// to only test queries that are specified in `helpers.ExtractVMNamesFromVMsNICsDisks` function. If new queries are added then this implementation should be updated. func (b *ResourceGraphAccessBuilder) withResources() *ResourceGraphAccessBuilder { b.server.Resources = func(ctx context.Context, query armresourcegraph.QueryRequest, options *armresourcegraph.ClientResourcesOptions) (resp azfake.Responder[armresourcegraph.ClientResourcesResponse], errResp azfake.ErrorResponder) { - var resType *utils.ResourceType - if query.Query != nil { - resType = getResourceType(*query.Query) - } - if b.apiBehaviorSpec != nil { - err := b.apiBehaviorSpec.SimulateForResourceType(ctx, b.clusterState.ProviderSpec.ResourceGroup, resType, testhelp.AccessMethodResources) - if err != nil { - errResp.SetError(err) - return + + foundResourceTypes := getResourceTypes(query) + + if b.apiBehaviorSpec != nil && !utils.IsSliceNilOrEmpty(foundResourceTypes) { + for _, resType := range foundResourceTypes { + err := b.apiBehaviorSpec.SimulateForResourceType(ctx, b.clusterState.ProviderSpec.ResourceGroup, &resType, testhelp.AccessMethodResources) + if err != nil { + errResp.SetError(err) + return + } } } // ------------------------------- NOTE -------------------------------- // When a non-existent resource group is passed in the resource graph query // then it does not error out instead it returns 0 results. //----------------------------------------------------------------------- - var vmNames []string + resTypeToVMNames := make(map[string][]string) if query.Query != nil { tagsToMatch := b.getProviderSpecTagKeysToMatch() - if resType != nil { - switch *resType { - case utils.VirtualMachinesResourceType: - vmNames = b.clusterState.GetVMsMatchingTagKeys(tagsToMatch) - case utils.NetworkInterfacesResourceType: - vmNames = b.clusterState.ExtractVMNamesFromNICsMatchingTagKeys(tagsToMatch) + if foundResourceTypes != nil { + for _, resType := range foundResourceTypes { + switch resType { + case utils.VirtualMachinesResourceType: + vmNames := b.clusterState.GetVMsMatchingTagKeys(tagsToMatch) + if !utils.IsSliceNilOrEmpty(vmNames) { + resTypeToVMNames[string(resType)] = vmNames + } + case utils.NetworkInterfacesResourceType: + vmNames := b.clusterState.GetNICNamesMatchingTagKeys(tagsToMatch) + if !utils.IsSliceNilOrEmpty(vmNames) { + resTypeToVMNames[string(resType)] = vmNames + } + case utils.DiskResourceType: + vmNames := b.clusterState.GetDiskNamesMatchingTagKeys(tagsToMatch) + if !utils.IsSliceNilOrEmpty(vmNames) { + resTypeToVMNames[string(resType)] = vmNames + } + } } - } else { - // if there is not resultType this means that the query does not have a filter on resource type - // in this case we will now search for VM names across all resources that we preserve as part of ClusterState. - vmNames = b.clusterState.GetAllVMNamesFromMachineResources() } } // create the response // currently the fake implementation does not have paging support. This means the Count is also the TotalRecords. - queryResp := createResourcesResponse(vmNames) + queryResp := createResourcesResponse(resTypeToVMNames) resp.SetResponse(http.StatusOK, queryResp, nil) return } return b } -// getResourceType tries to find the table name from the query string. Resource graph defines one table per resource type. -// Unfortunately I could not find a way to parse the KUSTO Query string to extract the table name and therefore string matching is used here. We can change it if we find a better way -func getResourceType(query string) *utils.ResourceType { - switch { - case strings.Contains(query, string(utils.VirtualMachinesResourceType)): - return to.Ptr(utils.VirtualMachinesResourceType) - case strings.Contains(query, string(utils.NetworkInterfacesResourceType)): - return to.Ptr(utils.NetworkInterfacesResourceType) - default: - return nil +// getResourceTypes tries to find the table names from the query string. Resource graph defines one table per resource type. +// Unfortunately there seems to be no way to parse the KUSTO Query string to extract the table name and therefore string matching is used here. +// We can change it if we find a better way +func getResourceTypes(query armresourcegraph.QueryRequest) []utils.ResourceType { + var foundResourceTypes []utils.ResourceType + if query.Query == nil { + return foundResourceTypes + } + resourceTypesToMatch := []utils.ResourceType{utils.VirtualMachinesResourceType, utils.NetworkInterfacesResourceType, utils.DiskResourceType} + for _, resType := range resourceTypesToMatch { + if strings.Contains(*query.Query, string(resType)) { + foundResourceTypes = append(foundResourceTypes, resType) + } } + return foundResourceTypes } func (b *ResourceGraphAccessBuilder) getProviderSpecTagKeysToMatch() []string { @@ -116,21 +130,24 @@ func (b *ResourceGraphAccessBuilder) getProviderSpecTagKeysToMatch() []string { return tagKeys } -func createResourcesResponse(vmNames []string) armresourcegraph.ClientResourcesResponse { - body := make([]interface{}, 0, len(vmNames)) - if !utils.IsSliceNilOrEmpty(vmNames) { - for _, vmName := range vmNames { - entry := make(map[string]interface{}) - entry["name"] = vmName - body = append(body, entry) +func createResourcesResponse(resTypeToVMNames map[string][]string) armresourcegraph.ClientResourcesResponse { + body := make([]interface{}, 0, len(resTypeToVMNames)) + if resTypeToVMNames != nil { + for resType, vmNames := range resTypeToVMNames { + for _, vmName := range vmNames { + entry := make(map[string]interface{}) + entry["type"] = resType + entry["name"] = vmName + body = append(body, entry) + } } } return armresourcegraph.ClientResourcesResponse{ QueryResponse: armresourcegraph.QueryResponse{ - Count: pointer.Int64(int64(len(vmNames))), + Count: pointer.Int64(int64(len(resTypeToVMNames))), Data: body, ResultTruncated: to.Ptr(armresourcegraph.ResultTruncatedFalse), - TotalRecords: pointer.Int64(int64(len(vmNames))), + TotalRecords: pointer.Int64(int64(len(resTypeToVMNames))), }, } } diff --git a/pkg/azure/utils/resourcetype.go b/pkg/azure/utils/resourcetype.go index b02d54d03..28a28f358 100644 --- a/pkg/azure/utils/resourcetype.go +++ b/pkg/azure/utils/resourcetype.go @@ -9,7 +9,7 @@ const ( // NetworkInterfacesResourceType is a type used by Azure to represent network interfaces resources. NetworkInterfacesResourceType ResourceType = "microsoft.network/networkinterfaces" //as defined in azure // DiskResourceType is a type used by Azure to represent disks (both OS and Data disks) - DiskResourceType ResourceType = "microsoft.network/disks" + DiskResourceType ResourceType = "microsoft.compute/disks" // VMImageResourceType is a type used by Azure to represent VM Image resources. // This is not defined in azure, however we have created this to allow defining API behavior for VM Images. VMImageResourceType ResourceType = "microsoft.compute/vmimage" diff --git a/pkg/azure/utils/vm.go b/pkg/azure/utils/vm.go index 478f7ea33..f8aa18b09 100644 --- a/pkg/azure/utils/vm.go +++ b/pkg/azure/utils/vm.go @@ -2,6 +2,11 @@ package utils import "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5" +const ( + // ProvisioningStateFailed is the provisioning state of the VM set by the provider indicating that the VM is in terminal state. + ProvisioningStateFailed = "Failed" +) + // DataDisksMarkedForDetachment checks if there is at least DataDisk that is marked for detachment. // If there are no DataDisk(s) configured then it will return false. func DataDisksMarkedForDetachment(vm *armcompute.VirtualMachine) bool { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/CHANGELOG.md index d2788cd0d..77577d574 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 5.3.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + ## 5.3.0-beta.2 (2023-10-30) ### Other Changes diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/README.md index 994be2147..87ce9c30e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/README.md @@ -62,37 +62,10 @@ client := clientFactory.NewLogAnalyticsClient() ## Fakes -The `fake` package provides implementations for fake servers that can be used for testing. +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. -To create a fake server, declare an instance of the required fake server type(s). - -```go -myFakeVirtualMachinesServer := fake.VirtualMachinesServer{} -``` - -Next, provide func implementations for the methods you wish to fake. -The named return variables can be used to simplify return value construction. - -```go -myFakeVirtualMachinesServer.Get = func(ctx context.Context, resourceGroupName string, vmName string, options *armcompute.VirtualMachinesClientGetOptions) (resp azfake.Responder[armcompute.VirtualMachinesClientGetResponse], errResp azfake.ErrorResponder) { - // TODO: resp.SetResponse(/* your fake armcompute.VirtualMachinesClientGetResponse response */) - return -} -``` - -You connect the fake server to a client instance during construction through the optional transport. - -Use `NewTokenCredential()` from `azcore/fake` to obtain a fake credential. - -```go -import azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" - -client, err := armcompute.VirtualMachinesClient("subscriptionID", azfake.NewTokenCredential(), &arm.ClientOptions{ - ClientOptions: azcore.ClientOptions{ - Transport: fake.NewVirtualMachinesServerTransport(&myFakeVirtualMachinesServer), - }, -}) -``` +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. ## More sample code diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/autorest.md index 32721d81c..f40cc3252 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/autorest.md @@ -8,9 +8,6 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/c78b5d8bd3aff2d82a5f034d9164b1a9ac030e09/specification/compute/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/c78b5d8bd3aff2d82a5f034d9164b1a9ac030e09/specification/compute/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 5.3.0-beta.2 +module-version: 5.3.0 tag: package-2023-07-01 -azcore-version: 1.9.0-beta.1 -generate-fakes: true -inject-spans: true ``` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/availabilitysets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/availabilitysets_client.go index 88b4517a9..ce901d88a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/availabilitysets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/availabilitysets_client.go @@ -33,7 +33,7 @@ type AvailabilitySetsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAvailabilitySetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailabilitySetsClient, error) { - cl, err := arm.NewClient(moduleName+".AvailabilitySetsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/build.go index 7722916d9..f88d006f4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/build.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/build.go @@ -2,6 +2,6 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh ../../../../eng/scripts/build.ps1 -goExtension "@autorest/go@4.0.0-preview.57" -skipBuild -cleanGenerated -format -tidy -generate -alwaysSetBodyParamRequired resourcemanager/compute/armcompute +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate -alwaysSetBodyParamRequired resourcemanager/compute/armcompute package armcompute diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/capacityreservationgroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/capacityreservationgroups_client.go index aafaf1a9f..246dbd2b5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/capacityreservationgroups_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/capacityreservationgroups_client.go @@ -33,7 +33,7 @@ type CapacityReservationGroupsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCapacityReservationGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CapacityReservationGroupsClient, error) { - cl, err := arm.NewClient(moduleName+".CapacityReservationGroupsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/capacityreservations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/capacityreservations_client.go index b324d524c..3b76610c7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/capacityreservations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/capacityreservations_client.go @@ -33,7 +33,7 @@ type CapacityReservationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCapacityReservationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CapacityReservationsClient, error) { - cl, err := arm.NewClient(moduleName+".CapacityReservationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,14 @@ func (client *CapacityReservationsClient) BeginCreateOrUpdate(ctx context.Contex if err != nil { return nil, err } - poller, err := runtime.NewPoller[CapacityReservationsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CapacityReservationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CapacityReservationsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CapacityReservationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -146,10 +150,14 @@ func (client *CapacityReservationsClient) BeginDelete(ctx context.Context, resou if err != nil { return nil, err } - poller, err := runtime.NewPoller[CapacityReservationsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CapacityReservationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CapacityReservationsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CapacityReservationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -365,10 +373,14 @@ func (client *CapacityReservationsClient) BeginUpdate(ctx context.Context, resou if err != nil { return nil, err } - poller, err := runtime.NewPoller[CapacityReservationsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CapacityReservationsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CapacityReservationsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CapacityReservationsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/client_factory.go index 0f403c613..b8600b614 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/client_factory.go @@ -28,7 +28,7 @@ type ClientFactory struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { - _, err := arm.NewClient(moduleName+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -38,246 +38,295 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } +// NewAvailabilitySetsClient creates a new instance of AvailabilitySetsClient. func (c *ClientFactory) NewAvailabilitySetsClient() *AvailabilitySetsClient { subClient, _ := NewAvailabilitySetsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewCapacityReservationGroupsClient creates a new instance of CapacityReservationGroupsClient. func (c *ClientFactory) NewCapacityReservationGroupsClient() *CapacityReservationGroupsClient { subClient, _ := NewCapacityReservationGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewCapacityReservationsClient creates a new instance of CapacityReservationsClient. func (c *ClientFactory) NewCapacityReservationsClient() *CapacityReservationsClient { subClient, _ := NewCapacityReservationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewCloudServiceOperatingSystemsClient creates a new instance of CloudServiceOperatingSystemsClient. func (c *ClientFactory) NewCloudServiceOperatingSystemsClient() *CloudServiceOperatingSystemsClient { subClient, _ := NewCloudServiceOperatingSystemsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewCloudServiceRoleInstancesClient creates a new instance of CloudServiceRoleInstancesClient. func (c *ClientFactory) NewCloudServiceRoleInstancesClient() *CloudServiceRoleInstancesClient { subClient, _ := NewCloudServiceRoleInstancesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewCloudServiceRolesClient creates a new instance of CloudServiceRolesClient. func (c *ClientFactory) NewCloudServiceRolesClient() *CloudServiceRolesClient { subClient, _ := NewCloudServiceRolesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewCloudServicesClient creates a new instance of CloudServicesClient. func (c *ClientFactory) NewCloudServicesClient() *CloudServicesClient { subClient, _ := NewCloudServicesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewCloudServicesUpdateDomainClient creates a new instance of CloudServicesUpdateDomainClient. func (c *ClientFactory) NewCloudServicesUpdateDomainClient() *CloudServicesUpdateDomainClient { subClient, _ := NewCloudServicesUpdateDomainClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewCommunityGalleriesClient creates a new instance of CommunityGalleriesClient. func (c *ClientFactory) NewCommunityGalleriesClient() *CommunityGalleriesClient { subClient, _ := NewCommunityGalleriesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewCommunityGalleryImageVersionsClient creates a new instance of CommunityGalleryImageVersionsClient. func (c *ClientFactory) NewCommunityGalleryImageVersionsClient() *CommunityGalleryImageVersionsClient { subClient, _ := NewCommunityGalleryImageVersionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewCommunityGalleryImagesClient creates a new instance of CommunityGalleryImagesClient. func (c *ClientFactory) NewCommunityGalleryImagesClient() *CommunityGalleryImagesClient { subClient, _ := NewCommunityGalleryImagesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDedicatedHostGroupsClient creates a new instance of DedicatedHostGroupsClient. func (c *ClientFactory) NewDedicatedHostGroupsClient() *DedicatedHostGroupsClient { subClient, _ := NewDedicatedHostGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDedicatedHostsClient creates a new instance of DedicatedHostsClient. func (c *ClientFactory) NewDedicatedHostsClient() *DedicatedHostsClient { subClient, _ := NewDedicatedHostsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDiskAccessesClient creates a new instance of DiskAccessesClient. func (c *ClientFactory) NewDiskAccessesClient() *DiskAccessesClient { subClient, _ := NewDiskAccessesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDiskEncryptionSetsClient creates a new instance of DiskEncryptionSetsClient. func (c *ClientFactory) NewDiskEncryptionSetsClient() *DiskEncryptionSetsClient { subClient, _ := NewDiskEncryptionSetsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDiskRestorePointClient creates a new instance of DiskRestorePointClient. func (c *ClientFactory) NewDiskRestorePointClient() *DiskRestorePointClient { subClient, _ := NewDiskRestorePointClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDisksClient creates a new instance of DisksClient. func (c *ClientFactory) NewDisksClient() *DisksClient { subClient, _ := NewDisksClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewGalleriesClient creates a new instance of GalleriesClient. func (c *ClientFactory) NewGalleriesClient() *GalleriesClient { subClient, _ := NewGalleriesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewGalleryApplicationVersionsClient creates a new instance of GalleryApplicationVersionsClient. func (c *ClientFactory) NewGalleryApplicationVersionsClient() *GalleryApplicationVersionsClient { subClient, _ := NewGalleryApplicationVersionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewGalleryApplicationsClient creates a new instance of GalleryApplicationsClient. func (c *ClientFactory) NewGalleryApplicationsClient() *GalleryApplicationsClient { subClient, _ := NewGalleryApplicationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewGalleryImageVersionsClient creates a new instance of GalleryImageVersionsClient. func (c *ClientFactory) NewGalleryImageVersionsClient() *GalleryImageVersionsClient { subClient, _ := NewGalleryImageVersionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewGalleryImagesClient creates a new instance of GalleryImagesClient. func (c *ClientFactory) NewGalleryImagesClient() *GalleryImagesClient { subClient, _ := NewGalleryImagesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewGallerySharingProfileClient creates a new instance of GallerySharingProfileClient. func (c *ClientFactory) NewGallerySharingProfileClient() *GallerySharingProfileClient { subClient, _ := NewGallerySharingProfileClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewImagesClient creates a new instance of ImagesClient. func (c *ClientFactory) NewImagesClient() *ImagesClient { subClient, _ := NewImagesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewLogAnalyticsClient creates a new instance of LogAnalyticsClient. func (c *ClientFactory) NewLogAnalyticsClient() *LogAnalyticsClient { subClient, _ := NewLogAnalyticsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewOperationsClient creates a new instance of OperationsClient. func (c *ClientFactory) NewOperationsClient() *OperationsClient { subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } +// NewProximityPlacementGroupsClient creates a new instance of ProximityPlacementGroupsClient. func (c *ClientFactory) NewProximityPlacementGroupsClient() *ProximityPlacementGroupsClient { subClient, _ := NewProximityPlacementGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewResourceSKUsClient creates a new instance of ResourceSKUsClient. func (c *ClientFactory) NewResourceSKUsClient() *ResourceSKUsClient { subClient, _ := NewResourceSKUsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewRestorePointCollectionsClient creates a new instance of RestorePointCollectionsClient. func (c *ClientFactory) NewRestorePointCollectionsClient() *RestorePointCollectionsClient { subClient, _ := NewRestorePointCollectionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewRestorePointsClient creates a new instance of RestorePointsClient. func (c *ClientFactory) NewRestorePointsClient() *RestorePointsClient { subClient, _ := NewRestorePointsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewSSHPublicKeysClient creates a new instance of SSHPublicKeysClient. func (c *ClientFactory) NewSSHPublicKeysClient() *SSHPublicKeysClient { subClient, _ := NewSSHPublicKeysClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewSharedGalleriesClient creates a new instance of SharedGalleriesClient. func (c *ClientFactory) NewSharedGalleriesClient() *SharedGalleriesClient { subClient, _ := NewSharedGalleriesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewSharedGalleryImageVersionsClient creates a new instance of SharedGalleryImageVersionsClient. func (c *ClientFactory) NewSharedGalleryImageVersionsClient() *SharedGalleryImageVersionsClient { subClient, _ := NewSharedGalleryImageVersionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewSharedGalleryImagesClient creates a new instance of SharedGalleryImagesClient. func (c *ClientFactory) NewSharedGalleryImagesClient() *SharedGalleryImagesClient { subClient, _ := NewSharedGalleryImagesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewSnapshotsClient creates a new instance of SnapshotsClient. func (c *ClientFactory) NewSnapshotsClient() *SnapshotsClient { subClient, _ := NewSnapshotsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewUsageClient creates a new instance of UsageClient. func (c *ClientFactory) NewUsageClient() *UsageClient { subClient, _ := NewUsageClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualMachineExtensionImagesClient creates a new instance of VirtualMachineExtensionImagesClient. func (c *ClientFactory) NewVirtualMachineExtensionImagesClient() *VirtualMachineExtensionImagesClient { subClient, _ := NewVirtualMachineExtensionImagesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualMachineExtensionsClient creates a new instance of VirtualMachineExtensionsClient. func (c *ClientFactory) NewVirtualMachineExtensionsClient() *VirtualMachineExtensionsClient { subClient, _ := NewVirtualMachineExtensionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualMachineImagesClient creates a new instance of VirtualMachineImagesClient. func (c *ClientFactory) NewVirtualMachineImagesClient() *VirtualMachineImagesClient { subClient, _ := NewVirtualMachineImagesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualMachineImagesEdgeZoneClient creates a new instance of VirtualMachineImagesEdgeZoneClient. func (c *ClientFactory) NewVirtualMachineImagesEdgeZoneClient() *VirtualMachineImagesEdgeZoneClient { subClient, _ := NewVirtualMachineImagesEdgeZoneClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualMachineRunCommandsClient creates a new instance of VirtualMachineRunCommandsClient. func (c *ClientFactory) NewVirtualMachineRunCommandsClient() *VirtualMachineRunCommandsClient { subClient, _ := NewVirtualMachineRunCommandsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualMachineScaleSetExtensionsClient creates a new instance of VirtualMachineScaleSetExtensionsClient. func (c *ClientFactory) NewVirtualMachineScaleSetExtensionsClient() *VirtualMachineScaleSetExtensionsClient { subClient, _ := NewVirtualMachineScaleSetExtensionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualMachineScaleSetRollingUpgradesClient creates a new instance of VirtualMachineScaleSetRollingUpgradesClient. func (c *ClientFactory) NewVirtualMachineScaleSetRollingUpgradesClient() *VirtualMachineScaleSetRollingUpgradesClient { subClient, _ := NewVirtualMachineScaleSetRollingUpgradesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualMachineScaleSetVMExtensionsClient creates a new instance of VirtualMachineScaleSetVMExtensionsClient. func (c *ClientFactory) NewVirtualMachineScaleSetVMExtensionsClient() *VirtualMachineScaleSetVMExtensionsClient { subClient, _ := NewVirtualMachineScaleSetVMExtensionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualMachineScaleSetVMRunCommandsClient creates a new instance of VirtualMachineScaleSetVMRunCommandsClient. func (c *ClientFactory) NewVirtualMachineScaleSetVMRunCommandsClient() *VirtualMachineScaleSetVMRunCommandsClient { subClient, _ := NewVirtualMachineScaleSetVMRunCommandsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualMachineScaleSetVMsClient creates a new instance of VirtualMachineScaleSetVMsClient. func (c *ClientFactory) NewVirtualMachineScaleSetVMsClient() *VirtualMachineScaleSetVMsClient { subClient, _ := NewVirtualMachineScaleSetVMsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualMachineScaleSetsClient creates a new instance of VirtualMachineScaleSetsClient. func (c *ClientFactory) NewVirtualMachineScaleSetsClient() *VirtualMachineScaleSetsClient { subClient, _ := NewVirtualMachineScaleSetsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualMachineSizesClient creates a new instance of VirtualMachineSizesClient. func (c *ClientFactory) NewVirtualMachineSizesClient() *VirtualMachineSizesClient { subClient, _ := NewVirtualMachineSizesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualMachinesClient creates a new instance of VirtualMachinesClient. func (c *ClientFactory) NewVirtualMachinesClient() *VirtualMachinesClient { subClient, _ := NewVirtualMachinesClient(c.subscriptionID, c.credential, c.options) return subClient diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceoperatingsystems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceoperatingsystems_client.go index 85fa70480..bd0cda902 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceoperatingsystems_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceoperatingsystems_client.go @@ -33,7 +33,7 @@ type CloudServiceOperatingSystemsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCloudServiceOperatingSystemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudServiceOperatingSystemsClient, error) { - cl, err := arm.NewClient(moduleName+".CloudServiceOperatingSystemsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceroleinstances_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceroleinstances_client.go index ceef2b5dc..b84530166 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceroleinstances_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceroleinstances_client.go @@ -33,7 +33,7 @@ type CloudServiceRoleInstancesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCloudServiceRoleInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudServiceRoleInstancesClient, error) { - cl, err := arm.NewClient(moduleName+".CloudServiceRoleInstancesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,10 +59,14 @@ func (client *CloudServiceRoleInstancesClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - poller, err := runtime.NewPoller[CloudServiceRoleInstancesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServiceRoleInstancesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CloudServiceRoleInstancesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServiceRoleInstancesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -411,10 +415,14 @@ func (client *CloudServiceRoleInstancesClient) BeginRebuild(ctx context.Context, if err != nil { return nil, err } - poller, err := runtime.NewPoller[CloudServiceRoleInstancesClientRebuildResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServiceRoleInstancesClientRebuildResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CloudServiceRoleInstancesClientRebuildResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServiceRoleInstancesClientRebuildResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -491,10 +499,14 @@ func (client *CloudServiceRoleInstancesClient) BeginReimage(ctx context.Context, if err != nil { return nil, err } - poller, err := runtime.NewPoller[CloudServiceRoleInstancesClientReimageResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServiceRoleInstancesClientReimageResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CloudServiceRoleInstancesClientReimageResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServiceRoleInstancesClientReimageResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -569,10 +581,14 @@ func (client *CloudServiceRoleInstancesClient) BeginRestart(ctx context.Context, if err != nil { return nil, err } - poller, err := runtime.NewPoller[CloudServiceRoleInstancesClientRestartResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServiceRoleInstancesClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CloudServiceRoleInstancesClientRestartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServiceRoleInstancesClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceroles_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceroles_client.go index ea6e9ad25..a4572cf14 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceroles_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceroles_client.go @@ -33,7 +33,7 @@ type CloudServiceRolesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCloudServiceRolesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudServiceRolesClient, error) { - cl, err := arm.NewClient(moduleName+".CloudServiceRolesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudservices_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudservices_client.go index 1023931ec..283d3a6fe 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudservices_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudservices_client.go @@ -33,7 +33,7 @@ type CloudServicesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCloudServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudServicesClient, error) { - cl, err := arm.NewClient(moduleName+".CloudServicesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,10 +60,14 @@ func (client *CloudServicesClient) BeginCreateOrUpdate(ctx context.Context, reso if err != nil { return nil, err } - poller, err := runtime.NewPoller[CloudServicesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CloudServicesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -135,10 +139,14 @@ func (client *CloudServicesClient) BeginDelete(ctx context.Context, resourceGrou if err != nil { return nil, err } - poller, err := runtime.NewPoller[CloudServicesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CloudServicesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -207,10 +215,14 @@ func (client *CloudServicesClient) BeginDeleteInstances(ctx context.Context, res if err != nil { return nil, err } - poller, err := runtime.NewPoller[CloudServicesClientDeleteInstancesResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientDeleteInstancesResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CloudServicesClientDeleteInstancesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientDeleteInstancesResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -532,10 +544,14 @@ func (client *CloudServicesClient) BeginPowerOff(ctx context.Context, resourceGr if err != nil { return nil, err } - poller, err := runtime.NewPoller[CloudServicesClientPowerOffResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientPowerOffResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CloudServicesClientPowerOffResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientPowerOffResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -606,10 +622,14 @@ func (client *CloudServicesClient) BeginRebuild(ctx context.Context, resourceGro if err != nil { return nil, err } - poller, err := runtime.NewPoller[CloudServicesClientRebuildResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientRebuildResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CloudServicesClientRebuildResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientRebuildResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -686,10 +706,14 @@ func (client *CloudServicesClient) BeginReimage(ctx context.Context, resourceGro if err != nil { return nil, err } - poller, err := runtime.NewPoller[CloudServicesClientReimageResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientReimageResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CloudServicesClientReimageResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientReimageResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -764,10 +788,14 @@ func (client *CloudServicesClient) BeginRestart(ctx context.Context, resourceGro if err != nil { return nil, err } - poller, err := runtime.NewPoller[CloudServicesClientRestartResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CloudServicesClientRestartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -842,10 +870,14 @@ func (client *CloudServicesClient) BeginStart(ctx context.Context, resourceGroup if err != nil { return nil, err } - poller, err := runtime.NewPoller[CloudServicesClientStartResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CloudServicesClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -915,10 +947,14 @@ func (client *CloudServicesClient) BeginUpdate(ctx context.Context, resourceGrou if err != nil { return nil, err } - poller, err := runtime.NewPoller[CloudServicesClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CloudServicesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudservicesupdatedomain_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudservicesupdatedomain_client.go index 0e40f7b22..a4bd1e7b1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudservicesupdatedomain_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudservicesupdatedomain_client.go @@ -34,7 +34,7 @@ type CloudServicesUpdateDomainClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCloudServicesUpdateDomainClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudServicesUpdateDomainClient, error) { - cl, err := arm.NewClient(moduleName+".CloudServicesUpdateDomainClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -196,10 +196,14 @@ func (client *CloudServicesUpdateDomainClient) BeginWalkUpdateDomain(ctx context if err != nil { return nil, err } - poller, err := runtime.NewPoller[CloudServicesUpdateDomainClientWalkUpdateDomainResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesUpdateDomainClientWalkUpdateDomainResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CloudServicesUpdateDomainClientWalkUpdateDomainResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesUpdateDomainClientWalkUpdateDomainResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleries_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleries_client.go index f9de1dae3..3cda3a9d0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleries_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleries_client.go @@ -33,7 +33,7 @@ type CommunityGalleriesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCommunityGalleriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CommunityGalleriesClient, error) { - cl, err := arm.NewClient(moduleName+".CommunityGalleriesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleryimages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleryimages_client.go index e75e1a87b..8d1c8c534 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleryimages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleryimages_client.go @@ -33,7 +33,7 @@ type CommunityGalleryImagesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCommunityGalleryImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CommunityGalleryImagesClient, error) { - cl, err := arm.NewClient(moduleName+".CommunityGalleryImagesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleryimageversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleryimageversions_client.go index 4eb7ce8a5..f1c46f849 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleryimageversions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleryimageversions_client.go @@ -33,7 +33,7 @@ type CommunityGalleryImageVersionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCommunityGalleryImageVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CommunityGalleryImageVersionsClient, error) { - cl, err := arm.NewClient(moduleName+".CommunityGalleryImageVersionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/constants.go index 08bb46bfd..4554f9355 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/constants.go @@ -9,8 +9,8 @@ package armcompute const ( - moduleName = "armcompute" - moduleVersion = "v5.3.0-beta.2" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" + moduleVersion = "v5.3.0" ) type AccessLevel string diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/dedicatedhostgroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/dedicatedhostgroups_client.go index 4cac100f5..4a1eea66b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/dedicatedhostgroups_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/dedicatedhostgroups_client.go @@ -33,7 +33,7 @@ type DedicatedHostGroupsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDedicatedHostGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DedicatedHostGroupsClient, error) { - cl, err := arm.NewClient(moduleName+".DedicatedHostGroupsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/dedicatedhosts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/dedicatedhosts_client.go index 0300b7909..d91e4db2a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/dedicatedhosts_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/dedicatedhosts_client.go @@ -33,7 +33,7 @@ type DedicatedHostsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDedicatedHostsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DedicatedHostsClient, error) { - cl, err := arm.NewClient(moduleName+".DedicatedHostsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,10 +60,14 @@ func (client *DedicatedHostsClient) BeginCreateOrUpdate(ctx context.Context, res if err != nil { return nil, err } - poller, err := runtime.NewPoller[DedicatedHostsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DedicatedHostsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DedicatedHostsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DedicatedHostsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -140,10 +144,14 @@ func (client *DedicatedHostsClient) BeginDelete(ctx context.Context, resourceGro if err != nil { return nil, err } - poller, err := runtime.NewPoller[DedicatedHostsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DedicatedHostsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DedicatedHostsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DedicatedHostsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -430,10 +438,14 @@ func (client *DedicatedHostsClient) BeginRestart(ctx context.Context, resourceGr if err != nil { return nil, err } - poller, err := runtime.NewPoller[DedicatedHostsClientRestartResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DedicatedHostsClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DedicatedHostsClientRestartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DedicatedHostsClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -511,10 +523,14 @@ func (client *DedicatedHostsClient) BeginUpdate(ctx context.Context, resourceGro if err != nil { return nil, err } - poller, err := runtime.NewPoller[DedicatedHostsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DedicatedHostsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DedicatedHostsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DedicatedHostsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskaccesses_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskaccesses_client.go index 48b3b5847..b189a0340 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskaccesses_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskaccesses_client.go @@ -33,7 +33,7 @@ type DiskAccessesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDiskAccessesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiskAccessesClient, error) { - cl, err := arm.NewClient(moduleName+".DiskAccessesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,14 @@ func (client *DiskAccessesClient) BeginCreateOrUpdate(ctx context.Context, resou if err != nil { return nil, err } - poller, err := runtime.NewPoller[DiskAccessesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskAccessesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DiskAccessesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskAccessesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +142,14 @@ func (client *DiskAccessesClient) BeginDelete(ctx context.Context, resourceGroup if err != nil { return nil, err } - poller, err := runtime.NewPoller[DiskAccessesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskAccessesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DiskAccessesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskAccessesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -213,10 +221,14 @@ func (client *DiskAccessesClient) BeginDeleteAPrivateEndpointConnection(ctx cont if err != nil { return nil, err } - poller, err := runtime.NewPoller[DiskAccessesClientDeleteAPrivateEndpointConnectionResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskAccessesClientDeleteAPrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DiskAccessesClientDeleteAPrivateEndpointConnectionResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskAccessesClientDeleteAPrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -678,10 +690,14 @@ func (client *DiskAccessesClient) BeginUpdate(ctx context.Context, resourceGroup if err != nil { return nil, err } - poller, err := runtime.NewPoller[DiskAccessesClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskAccessesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DiskAccessesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskAccessesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -759,10 +775,14 @@ func (client *DiskAccessesClient) BeginUpdateAPrivateEndpointConnection(ctx cont if err != nil { return nil, err } - poller, err := runtime.NewPoller[DiskAccessesClientUpdateAPrivateEndpointConnectionResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskAccessesClientUpdateAPrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DiskAccessesClientUpdateAPrivateEndpointConnectionResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskAccessesClientUpdateAPrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskencryptionsets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskencryptionsets_client.go index e5a4101ab..9306f9c0d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskencryptionsets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskencryptionsets_client.go @@ -33,7 +33,7 @@ type DiskEncryptionSetsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDiskEncryptionSetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiskEncryptionSetsClient, error) { - cl, err := arm.NewClient(moduleName+".DiskEncryptionSetsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,14 @@ func (client *DiskEncryptionSetsClient) BeginCreateOrUpdate(ctx context.Context, if err != nil { return nil, err } - poller, err := runtime.NewPoller[DiskEncryptionSetsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskEncryptionSetsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DiskEncryptionSetsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskEncryptionSetsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +142,14 @@ func (client *DiskEncryptionSetsClient) BeginDelete(ctx context.Context, resourc if err != nil { return nil, err } - poller, err := runtime.NewPoller[DiskEncryptionSetsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskEncryptionSetsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DiskEncryptionSetsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskEncryptionSetsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -461,10 +469,14 @@ func (client *DiskEncryptionSetsClient) BeginUpdate(ctx context.Context, resourc if err != nil { return nil, err } - poller, err := runtime.NewPoller[DiskEncryptionSetsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskEncryptionSetsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DiskEncryptionSetsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskEncryptionSetsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskrestorepoint_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskrestorepoint_client.go index 4811fb7bc..54b576957 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskrestorepoint_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskrestorepoint_client.go @@ -33,7 +33,7 @@ type DiskRestorePointClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDiskRestorePointClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiskRestorePointClient, error) { - cl, err := arm.NewClient(moduleName+".DiskRestorePointClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -137,10 +137,13 @@ func (client *DiskRestorePointClient) BeginGrantAccess(ctx context.Context, reso } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskRestorePointClientGrantAccessResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DiskRestorePointClientGrantAccessResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskRestorePointClientGrantAccessResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -294,10 +297,13 @@ func (client *DiskRestorePointClient) BeginRevokeAccess(ctx context.Context, res } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskRestorePointClientRevokeAccessResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DiskRestorePointClientRevokeAccessResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskRestorePointClientRevokeAccessResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/disks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/disks_client.go index ca5aa26bf..854a8ffd6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/disks_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/disks_client.go @@ -33,7 +33,7 @@ type DisksClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDisksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DisksClient, error) { - cl, err := arm.NewClient(moduleName+".DisksClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,14 @@ func (client *DisksClient) BeginCreateOrUpdate(ctx context.Context, resourceGrou if err != nil { return nil, err } - poller, err := runtime.NewPoller[DisksClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DisksClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DisksClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DisksClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -137,10 +141,14 @@ func (client *DisksClient) BeginDelete(ctx context.Context, resourceGroupName st if err != nil { return nil, err } - poller, err := runtime.NewPoller[DisksClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DisksClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DisksClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DisksClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -278,10 +286,13 @@ func (client *DisksClient) BeginGrantAccess(ctx context.Context, resourceGroupNa } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DisksClientGrantAccessResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DisksClientGrantAccessResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DisksClientGrantAccessResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -470,10 +481,13 @@ func (client *DisksClient) BeginRevokeAccess(ctx context.Context, resourceGroupN } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DisksClientRevokeAccessResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DisksClientRevokeAccessResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DisksClientRevokeAccessResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -543,10 +557,14 @@ func (client *DisksClient) BeginUpdate(ctx context.Context, resourceGroupName st if err != nil { return nil, err } - poller, err := runtime.NewPoller[DisksClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DisksClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DisksClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DisksClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/fake/server_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/fake/server_factory.go new file mode 100644 index 000000000..4ec55a494 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/fake/server_factory.go @@ -0,0 +1,395 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "errors" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "strings" + "sync" +) + +// ServerFactory is a fake server for instances of the armcompute.ClientFactory type. +type ServerFactory struct { + AvailabilitySetsServer AvailabilitySetsServer + CapacityReservationGroupsServer CapacityReservationGroupsServer + CapacityReservationsServer CapacityReservationsServer + CloudServiceOperatingSystemsServer CloudServiceOperatingSystemsServer + CloudServiceRoleInstancesServer CloudServiceRoleInstancesServer + CloudServiceRolesServer CloudServiceRolesServer + CloudServicesServer CloudServicesServer + CloudServicesUpdateDomainServer CloudServicesUpdateDomainServer + CommunityGalleriesServer CommunityGalleriesServer + CommunityGalleryImageVersionsServer CommunityGalleryImageVersionsServer + CommunityGalleryImagesServer CommunityGalleryImagesServer + DedicatedHostGroupsServer DedicatedHostGroupsServer + DedicatedHostsServer DedicatedHostsServer + DiskAccessesServer DiskAccessesServer + DiskEncryptionSetsServer DiskEncryptionSetsServer + DiskRestorePointServer DiskRestorePointServer + DisksServer DisksServer + GalleriesServer GalleriesServer + GalleryApplicationVersionsServer GalleryApplicationVersionsServer + GalleryApplicationsServer GalleryApplicationsServer + GalleryImageVersionsServer GalleryImageVersionsServer + GalleryImagesServer GalleryImagesServer + GallerySharingProfileServer GallerySharingProfileServer + ImagesServer ImagesServer + LogAnalyticsServer LogAnalyticsServer + OperationsServer OperationsServer + ProximityPlacementGroupsServer ProximityPlacementGroupsServer + ResourceSKUsServer ResourceSKUsServer + RestorePointCollectionsServer RestorePointCollectionsServer + RestorePointsServer RestorePointsServer + SSHPublicKeysServer SSHPublicKeysServer + SharedGalleriesServer SharedGalleriesServer + SharedGalleryImageVersionsServer SharedGalleryImageVersionsServer + SharedGalleryImagesServer SharedGalleryImagesServer + SnapshotsServer SnapshotsServer + UsageServer UsageServer + VirtualMachineExtensionImagesServer VirtualMachineExtensionImagesServer + VirtualMachineExtensionsServer VirtualMachineExtensionsServer + VirtualMachineImagesServer VirtualMachineImagesServer + VirtualMachineImagesEdgeZoneServer VirtualMachineImagesEdgeZoneServer + VirtualMachineRunCommandsServer VirtualMachineRunCommandsServer + VirtualMachineScaleSetExtensionsServer VirtualMachineScaleSetExtensionsServer + VirtualMachineScaleSetRollingUpgradesServer VirtualMachineScaleSetRollingUpgradesServer + VirtualMachineScaleSetVMExtensionsServer VirtualMachineScaleSetVMExtensionsServer + VirtualMachineScaleSetVMRunCommandsServer VirtualMachineScaleSetVMRunCommandsServer + VirtualMachineScaleSetVMsServer VirtualMachineScaleSetVMsServer + VirtualMachineScaleSetsServer VirtualMachineScaleSetsServer + VirtualMachineSizesServer VirtualMachineSizesServer + VirtualMachinesServer VirtualMachinesServer +} + +// NewServerFactoryTransport creates a new instance of ServerFactoryTransport with the provided implementation. +// The returned ServerFactoryTransport instance is connected to an instance of armcompute.ClientFactory via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewServerFactoryTransport(srv *ServerFactory) *ServerFactoryTransport { + return &ServerFactoryTransport{ + srv: srv, + } +} + +// ServerFactoryTransport connects instances of armcompute.ClientFactory to instances of ServerFactory. +// Don't use this type directly, use NewServerFactoryTransport instead. +type ServerFactoryTransport struct { + srv *ServerFactory + trMu sync.Mutex + trAvailabilitySetsServer *AvailabilitySetsServerTransport + trCapacityReservationGroupsServer *CapacityReservationGroupsServerTransport + trCapacityReservationsServer *CapacityReservationsServerTransport + trCloudServiceOperatingSystemsServer *CloudServiceOperatingSystemsServerTransport + trCloudServiceRoleInstancesServer *CloudServiceRoleInstancesServerTransport + trCloudServiceRolesServer *CloudServiceRolesServerTransport + trCloudServicesServer *CloudServicesServerTransport + trCloudServicesUpdateDomainServer *CloudServicesUpdateDomainServerTransport + trCommunityGalleriesServer *CommunityGalleriesServerTransport + trCommunityGalleryImageVersionsServer *CommunityGalleryImageVersionsServerTransport + trCommunityGalleryImagesServer *CommunityGalleryImagesServerTransport + trDedicatedHostGroupsServer *DedicatedHostGroupsServerTransport + trDedicatedHostsServer *DedicatedHostsServerTransport + trDiskAccessesServer *DiskAccessesServerTransport + trDiskEncryptionSetsServer *DiskEncryptionSetsServerTransport + trDiskRestorePointServer *DiskRestorePointServerTransport + trDisksServer *DisksServerTransport + trGalleriesServer *GalleriesServerTransport + trGalleryApplicationVersionsServer *GalleryApplicationVersionsServerTransport + trGalleryApplicationsServer *GalleryApplicationsServerTransport + trGalleryImageVersionsServer *GalleryImageVersionsServerTransport + trGalleryImagesServer *GalleryImagesServerTransport + trGallerySharingProfileServer *GallerySharingProfileServerTransport + trImagesServer *ImagesServerTransport + trLogAnalyticsServer *LogAnalyticsServerTransport + trOperationsServer *OperationsServerTransport + trProximityPlacementGroupsServer *ProximityPlacementGroupsServerTransport + trResourceSKUsServer *ResourceSKUsServerTransport + trRestorePointCollectionsServer *RestorePointCollectionsServerTransport + trRestorePointsServer *RestorePointsServerTransport + trSSHPublicKeysServer *SSHPublicKeysServerTransport + trSharedGalleriesServer *SharedGalleriesServerTransport + trSharedGalleryImageVersionsServer *SharedGalleryImageVersionsServerTransport + trSharedGalleryImagesServer *SharedGalleryImagesServerTransport + trSnapshotsServer *SnapshotsServerTransport + trUsageServer *UsageServerTransport + trVirtualMachineExtensionImagesServer *VirtualMachineExtensionImagesServerTransport + trVirtualMachineExtensionsServer *VirtualMachineExtensionsServerTransport + trVirtualMachineImagesServer *VirtualMachineImagesServerTransport + trVirtualMachineImagesEdgeZoneServer *VirtualMachineImagesEdgeZoneServerTransport + trVirtualMachineRunCommandsServer *VirtualMachineRunCommandsServerTransport + trVirtualMachineScaleSetExtensionsServer *VirtualMachineScaleSetExtensionsServerTransport + trVirtualMachineScaleSetRollingUpgradesServer *VirtualMachineScaleSetRollingUpgradesServerTransport + trVirtualMachineScaleSetVMExtensionsServer *VirtualMachineScaleSetVMExtensionsServerTransport + trVirtualMachineScaleSetVMRunCommandsServer *VirtualMachineScaleSetVMRunCommandsServerTransport + trVirtualMachineScaleSetVMsServer *VirtualMachineScaleSetVMsServerTransport + trVirtualMachineScaleSetsServer *VirtualMachineScaleSetsServerTransport + trVirtualMachineSizesServer *VirtualMachineSizesServerTransport + trVirtualMachinesServer *VirtualMachinesServerTransport +} + +// Do implements the policy.Transporter interface for ServerFactoryTransport. +func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + client := method[:strings.Index(method, ".")] + var resp *http.Response + var err error + + switch client { + case "AvailabilitySetsClient": + initServer(s, &s.trAvailabilitySetsServer, func() *AvailabilitySetsServerTransport { + return NewAvailabilitySetsServerTransport(&s.srv.AvailabilitySetsServer) + }) + resp, err = s.trAvailabilitySetsServer.Do(req) + case "CapacityReservationGroupsClient": + initServer(s, &s.trCapacityReservationGroupsServer, func() *CapacityReservationGroupsServerTransport { + return NewCapacityReservationGroupsServerTransport(&s.srv.CapacityReservationGroupsServer) + }) + resp, err = s.trCapacityReservationGroupsServer.Do(req) + case "CapacityReservationsClient": + initServer(s, &s.trCapacityReservationsServer, func() *CapacityReservationsServerTransport { + return NewCapacityReservationsServerTransport(&s.srv.CapacityReservationsServer) + }) + resp, err = s.trCapacityReservationsServer.Do(req) + case "CloudServiceOperatingSystemsClient": + initServer(s, &s.trCloudServiceOperatingSystemsServer, func() *CloudServiceOperatingSystemsServerTransport { + return NewCloudServiceOperatingSystemsServerTransport(&s.srv.CloudServiceOperatingSystemsServer) + }) + resp, err = s.trCloudServiceOperatingSystemsServer.Do(req) + case "CloudServiceRoleInstancesClient": + initServer(s, &s.trCloudServiceRoleInstancesServer, func() *CloudServiceRoleInstancesServerTransport { + return NewCloudServiceRoleInstancesServerTransport(&s.srv.CloudServiceRoleInstancesServer) + }) + resp, err = s.trCloudServiceRoleInstancesServer.Do(req) + case "CloudServiceRolesClient": + initServer(s, &s.trCloudServiceRolesServer, func() *CloudServiceRolesServerTransport { + return NewCloudServiceRolesServerTransport(&s.srv.CloudServiceRolesServer) + }) + resp, err = s.trCloudServiceRolesServer.Do(req) + case "CloudServicesClient": + initServer(s, &s.trCloudServicesServer, func() *CloudServicesServerTransport { + return NewCloudServicesServerTransport(&s.srv.CloudServicesServer) + }) + resp, err = s.trCloudServicesServer.Do(req) + case "CloudServicesUpdateDomainClient": + initServer(s, &s.trCloudServicesUpdateDomainServer, func() *CloudServicesUpdateDomainServerTransport { + return NewCloudServicesUpdateDomainServerTransport(&s.srv.CloudServicesUpdateDomainServer) + }) + resp, err = s.trCloudServicesUpdateDomainServer.Do(req) + case "CommunityGalleriesClient": + initServer(s, &s.trCommunityGalleriesServer, func() *CommunityGalleriesServerTransport { + return NewCommunityGalleriesServerTransport(&s.srv.CommunityGalleriesServer) + }) + resp, err = s.trCommunityGalleriesServer.Do(req) + case "CommunityGalleryImageVersionsClient": + initServer(s, &s.trCommunityGalleryImageVersionsServer, func() *CommunityGalleryImageVersionsServerTransport { + return NewCommunityGalleryImageVersionsServerTransport(&s.srv.CommunityGalleryImageVersionsServer) + }) + resp, err = s.trCommunityGalleryImageVersionsServer.Do(req) + case "CommunityGalleryImagesClient": + initServer(s, &s.trCommunityGalleryImagesServer, func() *CommunityGalleryImagesServerTransport { + return NewCommunityGalleryImagesServerTransport(&s.srv.CommunityGalleryImagesServer) + }) + resp, err = s.trCommunityGalleryImagesServer.Do(req) + case "DedicatedHostGroupsClient": + initServer(s, &s.trDedicatedHostGroupsServer, func() *DedicatedHostGroupsServerTransport { + return NewDedicatedHostGroupsServerTransport(&s.srv.DedicatedHostGroupsServer) + }) + resp, err = s.trDedicatedHostGroupsServer.Do(req) + case "DedicatedHostsClient": + initServer(s, &s.trDedicatedHostsServer, func() *DedicatedHostsServerTransport { + return NewDedicatedHostsServerTransport(&s.srv.DedicatedHostsServer) + }) + resp, err = s.trDedicatedHostsServer.Do(req) + case "DiskAccessesClient": + initServer(s, &s.trDiskAccessesServer, func() *DiskAccessesServerTransport { return NewDiskAccessesServerTransport(&s.srv.DiskAccessesServer) }) + resp, err = s.trDiskAccessesServer.Do(req) + case "DiskEncryptionSetsClient": + initServer(s, &s.trDiskEncryptionSetsServer, func() *DiskEncryptionSetsServerTransport { + return NewDiskEncryptionSetsServerTransport(&s.srv.DiskEncryptionSetsServer) + }) + resp, err = s.trDiskEncryptionSetsServer.Do(req) + case "DiskRestorePointClient": + initServer(s, &s.trDiskRestorePointServer, func() *DiskRestorePointServerTransport { + return NewDiskRestorePointServerTransport(&s.srv.DiskRestorePointServer) + }) + resp, err = s.trDiskRestorePointServer.Do(req) + case "DisksClient": + initServer(s, &s.trDisksServer, func() *DisksServerTransport { return NewDisksServerTransport(&s.srv.DisksServer) }) + resp, err = s.trDisksServer.Do(req) + case "GalleriesClient": + initServer(s, &s.trGalleriesServer, func() *GalleriesServerTransport { return NewGalleriesServerTransport(&s.srv.GalleriesServer) }) + resp, err = s.trGalleriesServer.Do(req) + case "GalleryApplicationVersionsClient": + initServer(s, &s.trGalleryApplicationVersionsServer, func() *GalleryApplicationVersionsServerTransport { + return NewGalleryApplicationVersionsServerTransport(&s.srv.GalleryApplicationVersionsServer) + }) + resp, err = s.trGalleryApplicationVersionsServer.Do(req) + case "GalleryApplicationsClient": + initServer(s, &s.trGalleryApplicationsServer, func() *GalleryApplicationsServerTransport { + return NewGalleryApplicationsServerTransport(&s.srv.GalleryApplicationsServer) + }) + resp, err = s.trGalleryApplicationsServer.Do(req) + case "GalleryImageVersionsClient": + initServer(s, &s.trGalleryImageVersionsServer, func() *GalleryImageVersionsServerTransport { + return NewGalleryImageVersionsServerTransport(&s.srv.GalleryImageVersionsServer) + }) + resp, err = s.trGalleryImageVersionsServer.Do(req) + case "GalleryImagesClient": + initServer(s, &s.trGalleryImagesServer, func() *GalleryImagesServerTransport { + return NewGalleryImagesServerTransport(&s.srv.GalleryImagesServer) + }) + resp, err = s.trGalleryImagesServer.Do(req) + case "GallerySharingProfileClient": + initServer(s, &s.trGallerySharingProfileServer, func() *GallerySharingProfileServerTransport { + return NewGallerySharingProfileServerTransport(&s.srv.GallerySharingProfileServer) + }) + resp, err = s.trGallerySharingProfileServer.Do(req) + case "ImagesClient": + initServer(s, &s.trImagesServer, func() *ImagesServerTransport { return NewImagesServerTransport(&s.srv.ImagesServer) }) + resp, err = s.trImagesServer.Do(req) + case "LogAnalyticsClient": + initServer(s, &s.trLogAnalyticsServer, func() *LogAnalyticsServerTransport { return NewLogAnalyticsServerTransport(&s.srv.LogAnalyticsServer) }) + resp, err = s.trLogAnalyticsServer.Do(req) + case "OperationsClient": + initServer(s, &s.trOperationsServer, func() *OperationsServerTransport { return NewOperationsServerTransport(&s.srv.OperationsServer) }) + resp, err = s.trOperationsServer.Do(req) + case "ProximityPlacementGroupsClient": + initServer(s, &s.trProximityPlacementGroupsServer, func() *ProximityPlacementGroupsServerTransport { + return NewProximityPlacementGroupsServerTransport(&s.srv.ProximityPlacementGroupsServer) + }) + resp, err = s.trProximityPlacementGroupsServer.Do(req) + case "ResourceSKUsClient": + initServer(s, &s.trResourceSKUsServer, func() *ResourceSKUsServerTransport { return NewResourceSKUsServerTransport(&s.srv.ResourceSKUsServer) }) + resp, err = s.trResourceSKUsServer.Do(req) + case "RestorePointCollectionsClient": + initServer(s, &s.trRestorePointCollectionsServer, func() *RestorePointCollectionsServerTransport { + return NewRestorePointCollectionsServerTransport(&s.srv.RestorePointCollectionsServer) + }) + resp, err = s.trRestorePointCollectionsServer.Do(req) + case "RestorePointsClient": + initServer(s, &s.trRestorePointsServer, func() *RestorePointsServerTransport { + return NewRestorePointsServerTransport(&s.srv.RestorePointsServer) + }) + resp, err = s.trRestorePointsServer.Do(req) + case "SSHPublicKeysClient": + initServer(s, &s.trSSHPublicKeysServer, func() *SSHPublicKeysServerTransport { + return NewSSHPublicKeysServerTransport(&s.srv.SSHPublicKeysServer) + }) + resp, err = s.trSSHPublicKeysServer.Do(req) + case "SharedGalleriesClient": + initServer(s, &s.trSharedGalleriesServer, func() *SharedGalleriesServerTransport { + return NewSharedGalleriesServerTransport(&s.srv.SharedGalleriesServer) + }) + resp, err = s.trSharedGalleriesServer.Do(req) + case "SharedGalleryImageVersionsClient": + initServer(s, &s.trSharedGalleryImageVersionsServer, func() *SharedGalleryImageVersionsServerTransport { + return NewSharedGalleryImageVersionsServerTransport(&s.srv.SharedGalleryImageVersionsServer) + }) + resp, err = s.trSharedGalleryImageVersionsServer.Do(req) + case "SharedGalleryImagesClient": + initServer(s, &s.trSharedGalleryImagesServer, func() *SharedGalleryImagesServerTransport { + return NewSharedGalleryImagesServerTransport(&s.srv.SharedGalleryImagesServer) + }) + resp, err = s.trSharedGalleryImagesServer.Do(req) + case "SnapshotsClient": + initServer(s, &s.trSnapshotsServer, func() *SnapshotsServerTransport { return NewSnapshotsServerTransport(&s.srv.SnapshotsServer) }) + resp, err = s.trSnapshotsServer.Do(req) + case "UsageClient": + initServer(s, &s.trUsageServer, func() *UsageServerTransport { return NewUsageServerTransport(&s.srv.UsageServer) }) + resp, err = s.trUsageServer.Do(req) + case "VirtualMachineExtensionImagesClient": + initServer(s, &s.trVirtualMachineExtensionImagesServer, func() *VirtualMachineExtensionImagesServerTransport { + return NewVirtualMachineExtensionImagesServerTransport(&s.srv.VirtualMachineExtensionImagesServer) + }) + resp, err = s.trVirtualMachineExtensionImagesServer.Do(req) + case "VirtualMachineExtensionsClient": + initServer(s, &s.trVirtualMachineExtensionsServer, func() *VirtualMachineExtensionsServerTransport { + return NewVirtualMachineExtensionsServerTransport(&s.srv.VirtualMachineExtensionsServer) + }) + resp, err = s.trVirtualMachineExtensionsServer.Do(req) + case "VirtualMachineImagesClient": + initServer(s, &s.trVirtualMachineImagesServer, func() *VirtualMachineImagesServerTransport { + return NewVirtualMachineImagesServerTransport(&s.srv.VirtualMachineImagesServer) + }) + resp, err = s.trVirtualMachineImagesServer.Do(req) + case "VirtualMachineImagesEdgeZoneClient": + initServer(s, &s.trVirtualMachineImagesEdgeZoneServer, func() *VirtualMachineImagesEdgeZoneServerTransport { + return NewVirtualMachineImagesEdgeZoneServerTransport(&s.srv.VirtualMachineImagesEdgeZoneServer) + }) + resp, err = s.trVirtualMachineImagesEdgeZoneServer.Do(req) + case "VirtualMachineRunCommandsClient": + initServer(s, &s.trVirtualMachineRunCommandsServer, func() *VirtualMachineRunCommandsServerTransport { + return NewVirtualMachineRunCommandsServerTransport(&s.srv.VirtualMachineRunCommandsServer) + }) + resp, err = s.trVirtualMachineRunCommandsServer.Do(req) + case "VirtualMachineScaleSetExtensionsClient": + initServer(s, &s.trVirtualMachineScaleSetExtensionsServer, func() *VirtualMachineScaleSetExtensionsServerTransport { + return NewVirtualMachineScaleSetExtensionsServerTransport(&s.srv.VirtualMachineScaleSetExtensionsServer) + }) + resp, err = s.trVirtualMachineScaleSetExtensionsServer.Do(req) + case "VirtualMachineScaleSetRollingUpgradesClient": + initServer(s, &s.trVirtualMachineScaleSetRollingUpgradesServer, func() *VirtualMachineScaleSetRollingUpgradesServerTransport { + return NewVirtualMachineScaleSetRollingUpgradesServerTransport(&s.srv.VirtualMachineScaleSetRollingUpgradesServer) + }) + resp, err = s.trVirtualMachineScaleSetRollingUpgradesServer.Do(req) + case "VirtualMachineScaleSetVMExtensionsClient": + initServer(s, &s.trVirtualMachineScaleSetVMExtensionsServer, func() *VirtualMachineScaleSetVMExtensionsServerTransport { + return NewVirtualMachineScaleSetVMExtensionsServerTransport(&s.srv.VirtualMachineScaleSetVMExtensionsServer) + }) + resp, err = s.trVirtualMachineScaleSetVMExtensionsServer.Do(req) + case "VirtualMachineScaleSetVMRunCommandsClient": + initServer(s, &s.trVirtualMachineScaleSetVMRunCommandsServer, func() *VirtualMachineScaleSetVMRunCommandsServerTransport { + return NewVirtualMachineScaleSetVMRunCommandsServerTransport(&s.srv.VirtualMachineScaleSetVMRunCommandsServer) + }) + resp, err = s.trVirtualMachineScaleSetVMRunCommandsServer.Do(req) + case "VirtualMachineScaleSetVMsClient": + initServer(s, &s.trVirtualMachineScaleSetVMsServer, func() *VirtualMachineScaleSetVMsServerTransport { + return NewVirtualMachineScaleSetVMsServerTransport(&s.srv.VirtualMachineScaleSetVMsServer) + }) + resp, err = s.trVirtualMachineScaleSetVMsServer.Do(req) + case "VirtualMachineScaleSetsClient": + initServer(s, &s.trVirtualMachineScaleSetsServer, func() *VirtualMachineScaleSetsServerTransport { + return NewVirtualMachineScaleSetsServerTransport(&s.srv.VirtualMachineScaleSetsServer) + }) + resp, err = s.trVirtualMachineScaleSetsServer.Do(req) + case "VirtualMachineSizesClient": + initServer(s, &s.trVirtualMachineSizesServer, func() *VirtualMachineSizesServerTransport { + return NewVirtualMachineSizesServerTransport(&s.srv.VirtualMachineSizesServer) + }) + resp, err = s.trVirtualMachineSizesServer.Do(req) + case "VirtualMachinesClient": + initServer(s, &s.trVirtualMachinesServer, func() *VirtualMachinesServerTransport { + return NewVirtualMachinesServerTransport(&s.srv.VirtualMachinesServer) + }) + resp, err = s.trVirtualMachinesServer.Do(req) + default: + err = fmt.Errorf("unhandled client %s", client) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func initServer[T any](s *ServerFactoryTransport, dst **T, src func() *T) { + s.trMu.Lock() + if *dst == nil { + *dst = src() + } + s.trMu.Unlock() +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleries_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleries_client.go index e3177895a..5bd114c06 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleries_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleries_client.go @@ -33,7 +33,7 @@ type GalleriesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGalleriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleriesClient, error) { - cl, err := arm.NewClient(moduleName+".GalleriesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,10 +60,14 @@ func (client *GalleriesClient) BeginCreateOrUpdate(ctx context.Context, resource if err != nil { return nil, err } - poller, err := runtime.NewPoller[GalleriesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleriesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[GalleriesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleriesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -134,10 +138,14 @@ func (client *GalleriesClient) BeginDelete(ctx context.Context, resourceGroupNam if err != nil { return nil, err } - poller, err := runtime.NewPoller[GalleriesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleriesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[GalleriesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleriesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -391,10 +399,14 @@ func (client *GalleriesClient) BeginUpdate(ctx context.Context, resourceGroupNam if err != nil { return nil, err } - poller, err := runtime.NewPoller[GalleriesClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleriesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[GalleriesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleriesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryapplications_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryapplications_client.go index ffa4a21c8..897c18a2f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryapplications_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryapplications_client.go @@ -33,7 +33,7 @@ type GalleryApplicationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGalleryApplicationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleryApplicationsClient, error) { - cl, err := arm.NewClient(moduleName+".GalleryApplicationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,14 @@ func (client *GalleryApplicationsClient) BeginCreateOrUpdate(ctx context.Context if err != nil { return nil, err } - poller, err := runtime.NewPoller[GalleryApplicationsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryApplicationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[GalleryApplicationsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryApplicationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -142,10 +146,14 @@ func (client *GalleryApplicationsClient) BeginDelete(ctx context.Context, resour if err != nil { return nil, err } - poller, err := runtime.NewPoller[GalleryApplicationsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryApplicationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[GalleryApplicationsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryApplicationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -356,10 +364,14 @@ func (client *GalleryApplicationsClient) BeginUpdate(ctx context.Context, resour if err != nil { return nil, err } - poller, err := runtime.NewPoller[GalleryApplicationsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryApplicationsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[GalleryApplicationsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryApplicationsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryapplicationversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryapplicationversions_client.go index 5586e1a81..3148aa31d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryapplicationversions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryapplicationversions_client.go @@ -33,7 +33,7 @@ type GalleryApplicationVersionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGalleryApplicationVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleryApplicationVersionsClient, error) { - cl, err := arm.NewClient(moduleName+".GalleryApplicationVersionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -63,10 +63,14 @@ func (client *GalleryApplicationVersionsClient) BeginCreateOrUpdate(ctx context. if err != nil { return nil, err } - poller, err := runtime.NewPoller[GalleryApplicationVersionsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryApplicationVersionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[GalleryApplicationVersionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryApplicationVersionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -148,10 +152,14 @@ func (client *GalleryApplicationVersionsClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - poller, err := runtime.NewPoller[GalleryApplicationVersionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryApplicationVersionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[GalleryApplicationVersionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryApplicationVersionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -382,10 +390,14 @@ func (client *GalleryApplicationVersionsClient) BeginUpdate(ctx context.Context, if err != nil { return nil, err } - poller, err := runtime.NewPoller[GalleryApplicationVersionsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryApplicationVersionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[GalleryApplicationVersionsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryApplicationVersionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryimages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryimages_client.go index 5bcd3f21b..84fc57a2b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryimages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryimages_client.go @@ -33,7 +33,7 @@ type GalleryImagesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGalleryImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleryImagesClient, error) { - cl, err := arm.NewClient(moduleName+".GalleryImagesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,14 @@ func (client *GalleryImagesClient) BeginCreateOrUpdate(ctx context.Context, reso if err != nil { return nil, err } - poller, err := runtime.NewPoller[GalleryImagesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryImagesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[GalleryImagesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryImagesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -142,10 +146,14 @@ func (client *GalleryImagesClient) BeginDelete(ctx context.Context, resourceGrou if err != nil { return nil, err } - poller, err := runtime.NewPoller[GalleryImagesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryImagesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[GalleryImagesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryImagesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -355,10 +363,14 @@ func (client *GalleryImagesClient) BeginUpdate(ctx context.Context, resourceGrou if err != nil { return nil, err } - poller, err := runtime.NewPoller[GalleryImagesClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryImagesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[GalleryImagesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryImagesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryimageversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryimageversions_client.go index 4b0c842d9..7bbe1f00f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryimageversions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryimageversions_client.go @@ -33,7 +33,7 @@ type GalleryImageVersionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGalleryImageVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleryImageVersionsClient, error) { - cl, err := arm.NewClient(moduleName+".GalleryImageVersionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -63,10 +63,14 @@ func (client *GalleryImageVersionsClient) BeginCreateOrUpdate(ctx context.Contex if err != nil { return nil, err } - poller, err := runtime.NewPoller[GalleryImageVersionsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryImageVersionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[GalleryImageVersionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryImageVersionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -148,10 +152,14 @@ func (client *GalleryImageVersionsClient) BeginDelete(ctx context.Context, resou if err != nil { return nil, err } - poller, err := runtime.NewPoller[GalleryImageVersionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryImageVersionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[GalleryImageVersionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryImageVersionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -381,10 +389,14 @@ func (client *GalleryImageVersionsClient) BeginUpdate(ctx context.Context, resou if err != nil { return nil, err } - poller, err := runtime.NewPoller[GalleryImageVersionsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryImageVersionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[GalleryImageVersionsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryImageVersionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/gallerysharingprofile_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/gallerysharingprofile_client.go index 59e8777e9..e53a8f08a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/gallerysharingprofile_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/gallerysharingprofile_client.go @@ -33,7 +33,7 @@ type GallerySharingProfileClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGallerySharingProfileClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GallerySharingProfileClient, error) { - cl, err := arm.NewClient(moduleName+".GallerySharingProfileClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,10 +59,14 @@ func (client *GallerySharingProfileClient) BeginUpdate(ctx context.Context, reso if err != nil { return nil, err } - poller, err := runtime.NewPoller[GallerySharingProfileClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GallerySharingProfileClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[GallerySharingProfileClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GallerySharingProfileClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/images_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/images_client.go index c82f866c6..e97d6fa30 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/images_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/images_client.go @@ -33,7 +33,7 @@ type ImagesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ImagesClient, error) { - cl, err := arm.NewClient(moduleName+".ImagesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -59,10 +59,14 @@ func (client *ImagesClient) BeginCreateOrUpdate(ctx context.Context, resourceGro if err != nil { return nil, err } - poller, err := runtime.NewPoller[ImagesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ImagesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ImagesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ImagesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -133,10 +137,14 @@ func (client *ImagesClient) BeginDelete(ctx context.Context, resourceGroupName s if err != nil { return nil, err } - poller, err := runtime.NewPoller[ImagesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ImagesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ImagesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ImagesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -388,10 +396,14 @@ func (client *ImagesClient) BeginUpdate(ctx context.Context, resourceGroupName s if err != nil { return nil, err } - poller, err := runtime.NewPoller[ImagesClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ImagesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ImagesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ImagesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/loganalytics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/loganalytics_client.go index 72819b4e3..6dfabd2bf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/loganalytics_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/loganalytics_client.go @@ -33,7 +33,7 @@ type LogAnalyticsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLogAnalyticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LogAnalyticsClient, error) { - cl, err := arm.NewClient(moduleName+".LogAnalyticsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *LogAnalyticsClient) BeginExportRequestRateByInterval(ctx context.C } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LogAnalyticsClientExportRequestRateByIntervalResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[LogAnalyticsClientExportRequestRateByIntervalResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LogAnalyticsClientExportRequestRateByIntervalResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -136,10 +139,13 @@ func (client *LogAnalyticsClient) BeginExportThrottledRequests(ctx context.Conte } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LogAnalyticsClientExportThrottledRequestsResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[LogAnalyticsClientExportThrottledRequestsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LogAnalyticsClientExportThrottledRequestsResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/operations_client.go index 088244df6..545c016fc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/operations_client.go @@ -27,7 +27,7 @@ type OperationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - cl, err := arm.NewClient(moduleName+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/proximityplacementgroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/proximityplacementgroups_client.go index 40c518909..7dbfd8f5b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/proximityplacementgroups_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/proximityplacementgroups_client.go @@ -33,7 +33,7 @@ type ProximityPlacementGroupsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewProximityPlacementGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProximityPlacementGroupsClient, error) { - cl, err := arm.NewClient(moduleName+".ProximityPlacementGroupsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/resourceskus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/resourceskus_client.go index f6104236c..e0dd1afa4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/resourceskus_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/resourceskus_client.go @@ -33,7 +33,7 @@ type ResourceSKUsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewResourceSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceSKUsClient, error) { - cl, err := arm.NewClient(moduleName+".ResourceSKUsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/restorepointcollections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/restorepointcollections_client.go index e4fc69d96..343e99867 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/restorepointcollections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/restorepointcollections_client.go @@ -33,7 +33,7 @@ type RestorePointCollectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewRestorePointCollectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorePointCollectionsClient, error) { - cl, err := arm.NewClient(moduleName+".RestorePointCollectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -129,10 +129,14 @@ func (client *RestorePointCollectionsClient) BeginDelete(ctx context.Context, re if err != nil { return nil, err } - poller, err := runtime.NewPoller[RestorePointCollectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RestorePointCollectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[RestorePointCollectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RestorePointCollectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/restorepoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/restorepoints_client.go index 83862669d..a04794bbb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/restorepoints_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/restorepoints_client.go @@ -33,7 +33,7 @@ type RestorePointsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewRestorePointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorePointsClient, error) { - cl, err := arm.NewClient(moduleName+".RestorePointsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,10 +60,14 @@ func (client *RestorePointsClient) BeginCreate(ctx context.Context, resourceGrou if err != nil { return nil, err } - poller, err := runtime.NewPoller[RestorePointsClientCreateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RestorePointsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[RestorePointsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RestorePointsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -140,10 +144,14 @@ func (client *RestorePointsClient) BeginDelete(ctx context.Context, resourceGrou if err != nil { return nil, err } - poller, err := runtime.NewPoller[RestorePointsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RestorePointsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[RestorePointsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RestorePointsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleries_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleries_client.go index 6b123b006..b1239fadd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleries_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleries_client.go @@ -33,7 +33,7 @@ type SharedGalleriesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSharedGalleriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SharedGalleriesClient, error) { - cl, err := arm.NewClient(moduleName+".SharedGalleriesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleryimages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleryimages_client.go index fc912ab7a..461801f26 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleryimages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleryimages_client.go @@ -33,7 +33,7 @@ type SharedGalleryImagesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSharedGalleryImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SharedGalleryImagesClient, error) { - cl, err := arm.NewClient(moduleName+".SharedGalleryImagesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleryimageversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleryimageversions_client.go index e23aaf202..2f0c5b048 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleryimageversions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleryimageversions_client.go @@ -33,7 +33,7 @@ type SharedGalleryImageVersionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSharedGalleryImageVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SharedGalleryImageVersionsClient, error) { - cl, err := arm.NewClient(moduleName+".SharedGalleryImageVersionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/snapshots_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/snapshots_client.go index 402a60605..a0d263613 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/snapshots_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/snapshots_client.go @@ -33,7 +33,7 @@ type SnapshotsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSnapshotsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SnapshotsClient, error) { - cl, err := arm.NewClient(moduleName+".SnapshotsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,14 @@ func (client *SnapshotsClient) BeginCreateOrUpdate(ctx context.Context, resource if err != nil { return nil, err } - poller, err := runtime.NewPoller[SnapshotsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SnapshotsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[SnapshotsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SnapshotsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -137,10 +141,14 @@ func (client *SnapshotsClient) BeginDelete(ctx context.Context, resourceGroupNam if err != nil { return nil, err } - poller, err := runtime.NewPoller[SnapshotsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SnapshotsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[SnapshotsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SnapshotsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -279,10 +287,13 @@ func (client *SnapshotsClient) BeginGrantAccess(ctx context.Context, resourceGro } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SnapshotsClientGrantAccessResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[SnapshotsClientGrantAccessResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SnapshotsClientGrantAccessResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -472,10 +483,13 @@ func (client *SnapshotsClient) BeginRevokeAccess(ctx context.Context, resourceGr } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SnapshotsClientRevokeAccessResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[SnapshotsClientRevokeAccessResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SnapshotsClientRevokeAccessResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -545,10 +559,14 @@ func (client *SnapshotsClient) BeginUpdate(ctx context.Context, resourceGroupNam if err != nil { return nil, err } - poller, err := runtime.NewPoller[SnapshotsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SnapshotsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[SnapshotsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SnapshotsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sshpublickeys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sshpublickeys_client.go index f8b021629..5d08d5596 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sshpublickeys_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sshpublickeys_client.go @@ -33,7 +33,7 @@ type SSHPublicKeysClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSSHPublicKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SSHPublicKeysClient, error) { - cl, err := arm.NewClient(moduleName+".SSHPublicKeysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/usage_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/usage_client.go index 527c5204c..2ea544447 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/usage_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/usage_client.go @@ -33,7 +33,7 @@ type UsageClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewUsageClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsageClient, error) { - cl, err := arm.NewClient(moduleName+".UsageClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineextensionimages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineextensionimages_client.go index b29d4a822..0e0b62612 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineextensionimages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineextensionimages_client.go @@ -34,7 +34,7 @@ type VirtualMachineExtensionImagesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualMachineExtensionImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineExtensionImagesClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualMachineExtensionImagesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineextensions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineextensions_client.go index 2a6875dbe..f1cba272c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineextensions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineextensions_client.go @@ -33,7 +33,7 @@ type VirtualMachineExtensionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualMachineExtensionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineExtensionsClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualMachineExtensionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,10 +60,14 @@ func (client *VirtualMachineExtensionsClient) BeginCreateOrUpdate(ctx context.Co if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineExtensionsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineExtensionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineExtensionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineExtensionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -140,10 +144,14 @@ func (client *VirtualMachineExtensionsClient) BeginDelete(ctx context.Context, r if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineExtensionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineExtensionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineExtensionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineExtensionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -359,10 +367,14 @@ func (client *VirtualMachineExtensionsClient) BeginUpdate(ctx context.Context, r if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineExtensionsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineExtensionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineExtensionsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineExtensionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineimages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineimages_client.go index 4929b4f6e..42f941766 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineimages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineimages_client.go @@ -34,7 +34,7 @@ type VirtualMachineImagesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualMachineImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineImagesClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualMachineImagesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineimagesedgezone_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineimagesedgezone_client.go index f985a9c20..f946cd4d8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineimagesedgezone_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineimagesedgezone_client.go @@ -34,7 +34,7 @@ type VirtualMachineImagesEdgeZoneClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualMachineImagesEdgeZoneClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineImagesEdgeZoneClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualMachineImagesEdgeZoneClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineruncommands_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineruncommands_client.go index ff9c2cbe9..6b40675ef 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineruncommands_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineruncommands_client.go @@ -33,7 +33,7 @@ type VirtualMachineRunCommandsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualMachineRunCommandsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineRunCommandsClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualMachineRunCommandsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,10 +60,14 @@ func (client *VirtualMachineRunCommandsClient) BeginCreateOrUpdate(ctx context.C if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineRunCommandsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineRunCommandsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineRunCommandsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineRunCommandsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -140,10 +144,14 @@ func (client *VirtualMachineRunCommandsClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineRunCommandsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineRunCommandsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineRunCommandsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineRunCommandsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -484,10 +492,14 @@ func (client *VirtualMachineRunCommandsClient) BeginUpdate(ctx context.Context, if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineRunCommandsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineRunCommandsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineRunCommandsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineRunCommandsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachines_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachines_client.go index 92c3ea506..e02d32dc6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachines_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachines_client.go @@ -34,7 +34,7 @@ type VirtualMachinesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachinesClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualMachinesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *VirtualMachinesClient) BeginAssessPatches(ctx context.Context, res } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientAssessPatchesResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientAssessPatchesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientAssessPatchesResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -137,10 +140,13 @@ func (client *VirtualMachinesClient) BeginCapture(ctx context.Context, resourceG } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientCaptureResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientCaptureResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -214,10 +220,14 @@ func (client *VirtualMachinesClient) BeginConvertToManagedDisks(ctx context.Cont if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachinesClientConvertToManagedDisksResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientConvertToManagedDisksResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientConvertToManagedDisksResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientConvertToManagedDisksResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -289,10 +299,14 @@ func (client *VirtualMachinesClient) BeginCreateOrUpdate(ctx context.Context, re if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachinesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -366,10 +380,14 @@ func (client *VirtualMachinesClient) BeginDeallocate(ctx context.Context, resour if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachinesClientDeallocateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientDeallocateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientDeallocateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientDeallocateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -442,10 +460,14 @@ func (client *VirtualMachinesClient) BeginDelete(ctx context.Context, resourceGr if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachinesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -646,10 +668,13 @@ func (client *VirtualMachinesClient) BeginInstallPatches(ctx context.Context, re } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientInstallPatchesResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientInstallPatchesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientInstallPatchesResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1044,10 +1069,14 @@ func (client *VirtualMachinesClient) BeginPerformMaintenance(ctx context.Context if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachinesClientPerformMaintenanceResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientPerformMaintenanceResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientPerformMaintenanceResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientPerformMaintenanceResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1117,10 +1146,14 @@ func (client *VirtualMachinesClient) BeginPowerOff(ctx context.Context, resource if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachinesClientPowerOffResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientPowerOffResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientPowerOffResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientPowerOffResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1193,10 +1226,14 @@ func (client *VirtualMachinesClient) BeginReapply(ctx context.Context, resourceG if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachinesClientReapplyResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientReapplyResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientReapplyResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientReapplyResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1265,10 +1302,14 @@ func (client *VirtualMachinesClient) BeginRedeploy(ctx context.Context, resource if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachinesClientRedeployResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientRedeployResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientRedeployResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientRedeployResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1341,10 +1382,14 @@ func (client *VirtualMachinesClient) BeginReimage(ctx context.Context, resourceG if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachinesClientReimageResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientReimageResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientReimageResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientReimageResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1423,10 +1468,14 @@ func (client *VirtualMachinesClient) BeginRestart(ctx context.Context, resourceG if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachinesClientRestartResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientRestartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1566,10 +1615,13 @@ func (client *VirtualMachinesClient) BeginRunCommand(ctx context.Context, resour } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientRunCommandResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientRunCommandResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientRunCommandResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1696,10 +1748,14 @@ func (client *VirtualMachinesClient) BeginStart(ctx context.Context, resourceGro if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachinesClientStartResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1769,10 +1825,14 @@ func (client *VirtualMachinesClient) BeginUpdate(ctx context.Context, resourceGr if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachinesClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachinesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetextensions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetextensions_client.go index bdf25a164..8e5820d44 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetextensions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetextensions_client.go @@ -33,7 +33,7 @@ type VirtualMachineScaleSetExtensionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetExtensionsClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualMachineScaleSetExtensionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,10 +60,14 @@ func (client *VirtualMachineScaleSetExtensionsClient) BeginCreateOrUpdate(ctx co if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetExtensionsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetExtensionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetExtensionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetExtensionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -140,10 +144,14 @@ func (client *VirtualMachineScaleSetExtensionsClient) BeginDelete(ctx context.Co if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetExtensionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetExtensionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetExtensionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetExtensionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -356,10 +364,14 @@ func (client *VirtualMachineScaleSetExtensionsClient) BeginUpdate(ctx context.Co if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetExtensionsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetExtensionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetExtensionsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetExtensionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetrollingupgrades_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetrollingupgrades_client.go index bf3025503..7856e8e69 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetrollingupgrades_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetrollingupgrades_client.go @@ -33,7 +33,7 @@ type VirtualMachineScaleSetRollingUpgradesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetRollingUpgradesClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualMachineScaleSetRollingUpgradesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,10 +58,14 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) BeginCancel(ctx conte if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetRollingUpgradesClientCancelResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetRollingUpgradesClientCancelResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetRollingUpgradesClientCancelResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetRollingUpgradesClientCancelResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -197,10 +201,14 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) BeginStartExtensionUp if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetRollingUpgradesClientStartExtensionUpgradeResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetRollingUpgradesClientStartExtensionUpgradeResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetRollingUpgradesClientStartExtensionUpgradeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetRollingUpgradesClientStartExtensionUpgradeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -273,10 +281,14 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) BeginStartOSUpgrade(c if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetRollingUpgradesClientStartOSUpgradeResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetRollingUpgradesClientStartOSUpgradeResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetRollingUpgradesClientStartOSUpgradeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetRollingUpgradesClientStartOSUpgradeResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesets_client.go index d6e648e0b..dc9276c62 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesets_client.go @@ -34,7 +34,7 @@ type VirtualMachineScaleSetsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualMachineScaleSetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetsClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualMachineScaleSetsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -119,10 +119,14 @@ func (client *VirtualMachineScaleSetsClient) BeginCreateOrUpdate(ctx context.Con if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -196,10 +200,14 @@ func (client *VirtualMachineScaleSetsClient) BeginDeallocate(ctx context.Context if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetsClientDeallocateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientDeallocateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetsClientDeallocateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientDeallocateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -279,10 +287,14 @@ func (client *VirtualMachineScaleSetsClient) BeginDelete(ctx context.Context, re if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -355,10 +367,14 @@ func (client *VirtualMachineScaleSetsClient) BeginDeleteInstances(ctx context.Co if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetsClientDeleteInstancesResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientDeleteInstancesResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetsClientDeleteInstancesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientDeleteInstancesResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -950,10 +966,14 @@ func (client *VirtualMachineScaleSetsClient) BeginPerformMaintenance(ctx context if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetsClientPerformMaintenanceResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientPerformMaintenanceResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetsClientPerformMaintenanceResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientPerformMaintenanceResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1032,10 +1052,14 @@ func (client *VirtualMachineScaleSetsClient) BeginPowerOff(ctx context.Context, if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetsClientPowerOffResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientPowerOffResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetsClientPowerOffResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientPowerOffResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1117,10 +1141,13 @@ func (client *VirtualMachineScaleSetsClient) BeginReapply(ctx context.Context, r } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientReapplyResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetsClientReapplyResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientReapplyResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1190,10 +1217,14 @@ func (client *VirtualMachineScaleSetsClient) BeginRedeploy(ctx context.Context, if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetsClientRedeployResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientRedeployResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetsClientRedeployResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientRedeployResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1271,10 +1302,14 @@ func (client *VirtualMachineScaleSetsClient) BeginReimage(ctx context.Context, r if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetsClientReimageResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientReimageResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetsClientReimageResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientReimageResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1352,10 +1387,14 @@ func (client *VirtualMachineScaleSetsClient) BeginReimageAll(ctx context.Context if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetsClientReimageAllResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientReimageAllResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetsClientReimageAllResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientReimageAllResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1431,10 +1470,14 @@ func (client *VirtualMachineScaleSetsClient) BeginRestart(ctx context.Context, r if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetsClientRestartResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetsClientRestartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1510,10 +1553,14 @@ func (client *VirtualMachineScaleSetsClient) BeginSetOrchestrationServiceState(c if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetsClientSetOrchestrationServiceStateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientSetOrchestrationServiceStateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetsClientSetOrchestrationServiceStateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientSetOrchestrationServiceStateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1585,10 +1632,14 @@ func (client *VirtualMachineScaleSetsClient) BeginStart(ctx context.Context, res if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetsClientStartResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetsClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1664,10 +1715,14 @@ func (client *VirtualMachineScaleSetsClient) BeginUpdate(ctx context.Context, re if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1740,10 +1795,14 @@ func (client *VirtualMachineScaleSetsClient) BeginUpdateInstances(ctx context.Co if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetsClientUpdateInstancesResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientUpdateInstancesResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetsClientUpdateInstancesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientUpdateInstancesResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvmextensions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvmextensions_client.go index 3ec0fd63f..8d657b688 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvmextensions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvmextensions_client.go @@ -33,7 +33,7 @@ type VirtualMachineScaleSetVMExtensionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualMachineScaleSetVMExtensionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetVMExtensionsClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualMachineScaleSetVMExtensionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,14 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) BeginCreateOrUpdate(ctx if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetVMExtensionsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMExtensionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetVMExtensionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMExtensionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -146,10 +150,14 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) BeginDelete(ctx context. if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetVMExtensionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMExtensionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetVMExtensionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMExtensionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -380,10 +388,14 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) BeginUpdate(ctx context. if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetVMExtensionsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMExtensionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetVMExtensionsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMExtensionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvmruncommands_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvmruncommands_client.go index 0fbe1d5a1..beb09f99b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvmruncommands_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvmruncommands_client.go @@ -33,7 +33,7 @@ type VirtualMachineScaleSetVMRunCommandsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualMachineScaleSetVMRunCommandsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetVMRunCommandsClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualMachineScaleSetVMRunCommandsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,14 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) BeginCreateOrUpdate(ctx if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetVMRunCommandsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMRunCommandsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetVMRunCommandsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMRunCommandsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -146,10 +150,14 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) BeginDelete(ctx context if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetVMRunCommandsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMRunCommandsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetVMRunCommandsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMRunCommandsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -380,10 +388,14 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) BeginUpdate(ctx context if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetVMRunCommandsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMRunCommandsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetVMRunCommandsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMRunCommandsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvms_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvms_client.go index 9a3128fac..e27cc0a64 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvms_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvms_client.go @@ -34,7 +34,7 @@ type VirtualMachineScaleSetVMsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualMachineScaleSetVMsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetVMsClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualMachineScaleSetVMsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,14 @@ func (client *VirtualMachineScaleSetVMsClient) BeginDeallocate(ctx context.Conte if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetVMsClientDeallocateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientDeallocateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetVMsClientDeallocateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientDeallocateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -141,10 +145,14 @@ func (client *VirtualMachineScaleSetVMsClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetVMsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetVMsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -438,10 +446,14 @@ func (client *VirtualMachineScaleSetVMsClient) BeginPerformMaintenance(ctx conte if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetVMsClientPerformMaintenanceResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientPerformMaintenanceResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetVMsClientPerformMaintenanceResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientPerformMaintenanceResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -517,10 +529,14 @@ func (client *VirtualMachineScaleSetVMsClient) BeginPowerOff(ctx context.Context if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetVMsClientPowerOffResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientPowerOffResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetVMsClientPowerOffResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientPowerOffResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -600,10 +616,14 @@ func (client *VirtualMachineScaleSetVMsClient) BeginRedeploy(ctx context.Context if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetVMsClientRedeployResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientRedeployResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetVMsClientRedeployResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientRedeployResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -678,10 +698,14 @@ func (client *VirtualMachineScaleSetVMsClient) BeginReimage(ctx context.Context, if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetVMsClientReimageResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientReimageResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetVMsClientReimageResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientReimageResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -762,10 +786,14 @@ func (client *VirtualMachineScaleSetVMsClient) BeginReimageAll(ctx context.Conte if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetVMsClientReimageAllResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientReimageAllResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetVMsClientReimageAllResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientReimageAllResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -840,10 +868,14 @@ func (client *VirtualMachineScaleSetVMsClient) BeginRestart(ctx context.Context, if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetVMsClientRestartResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetVMsClientRestartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -994,10 +1026,13 @@ func (client *VirtualMachineScaleSetVMsClient) BeginRunCommand(ctx context.Conte } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientRunCommandResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetVMsClientRunCommandResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientRunCommandResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1134,10 +1169,14 @@ func (client *VirtualMachineScaleSetVMsClient) BeginStart(ctx context.Context, r if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetVMsClientStartResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetVMsClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1212,10 +1251,14 @@ func (client *VirtualMachineScaleSetVMsClient) BeginUpdate(ctx context.Context, if err != nil { return nil, err } - poller, err := runtime.NewPoller[VirtualMachineScaleSetVMsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualMachineScaleSetVMsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinesizes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinesizes_client.go index 4b0d4310b..066ecc7b4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinesizes_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinesizes_client.go @@ -33,7 +33,7 @@ type VirtualMachineSizesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualMachineSizesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineSizesClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualMachineSizesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/CHANGELOG.md index d74e3193c..0ef679459 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.2.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + ## 1.2.0-beta.3 (2023-10-09) ### Other Changes diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/README.md index 0b9300d0b..50c9f4707 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/README.md @@ -61,29 +61,11 @@ client := clientFactory.NewMarketplaceAgreementsClient() ``` ## Fakes -The `fake` package provides implementations for fake servers that can be used for testing. -To create a fake server, declare an instance of the required fake server type(s). -```go -myFakeMarketplaceAgreementsServer := fake.MarketplaceAgreementsServer{} -``` -Next, provide func implementations for the methods you wish to fake. -The named return variables can be used to simplify return value construction. -```go -myFakeMarketplaceAgreementsServer.Get = func(ctx context.Context, offerType armmarketplaceordering.OfferType, publisherID string, offerID string, planID string, options *armmarketplaceordering.MarketplaceAgreementsClientGetOptions) (resp azfake.Responder[armmarketplaceordering.MarketplaceAgreementsClientGetResponse], errResp azfake.ErrorResponder) { - // TODO: resp.SetResponse(/* your fake MarketplaceAgreementsClientGetResponse response */) - return -} -``` -You connect the fake server to a client instance during construction through the optional transport. -Use `NewTokenCredential()` from `azcore/fake` to obtain a fake credential. -```go -import azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" -client, err := armmarketplaceordering.NewMarketplaceAgreementsClient("subscriptionID", azfake.NewTokenCredential(), &arm.ClientOptions{ - ClientOptions: azcore.ClientOptions{ - Transport: fake.NewMarketplaceAgreementsServerTransport(&myFakeMarketplaceAgreementsServer), - }, -}) -``` + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. ## Provide Feedback diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/autorest.md index d0fec092f..65e24d53e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/autorest.md @@ -8,9 +8,5 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/marketplaceordering/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/marketplaceordering/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module: github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering -module-version: 1.2.0-beta.3 -azcore-version: 1.9.0-beta.1 -generate-fakes: true -inject-spans: true +module-version: 1.2.0 ``` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/build.go index e5c9c6cdb..1c369f959 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/build.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/build.go @@ -2,6 +2,6 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh ../../../../eng/scripts/build.ps1 -goExtension "@autorest/go@4.0.0-preview.54" -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/marketplaceordering/armmarketplaceordering +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/marketplaceordering/armmarketplaceordering package armmarketplaceordering diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/client_factory.go index d3037f304..3a5cce4b1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/client_factory.go @@ -27,7 +27,7 @@ type ClientFactory struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { - _, err := arm.NewClient(moduleName+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -37,11 +37,13 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } +// NewMarketplaceAgreementsClient creates a new instance of MarketplaceAgreementsClient. func (c *ClientFactory) NewMarketplaceAgreementsClient() *MarketplaceAgreementsClient { subClient, _ := NewMarketplaceAgreementsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewOperationsClient creates a new instance of OperationsClient. func (c *ClientFactory) NewOperationsClient() *OperationsClient { subClient, _ := NewOperationsClient(c.credential, c.options) return subClient diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/constants.go index eea09b0c8..66035b923 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/constants.go @@ -9,8 +9,8 @@ package armmarketplaceordering const ( - moduleName = "armmarketplaceordering" - moduleVersion = "v1.2.0-beta.3" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering" + moduleVersion = "v1.2.0" ) // CreatedByType - The type of identity that created the resource. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake/internal.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake/internal.go index 03b635903..be04ff43d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake/internal.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake/internal.go @@ -9,11 +9,8 @@ package fake import ( - "io" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "net/http" - "reflect" - "regexp" - "strings" "sync" ) @@ -25,30 +22,13 @@ func (nonRetriableError) NonRetriable() { // marker method } -func getOptional[T any](v T) *T { - if reflect.ValueOf(v).IsZero() { - return nil - } - return &v -} - -func getHeaderValue(h http.Header, k string) string { - v := h[k] - if len(v) == 0 { - return "" - } - return v[0] -} - -func parseOptional[T any](v string, parse func(v string) (T, error)) (*T, error) { - if v == "" { - return nil, nil - } - t, err := parse(v) - if err != nil { - return nil, err +func contains[T comparable](s []T, v T) bool { + for _, vv := range s { + if vv == v { + return true + } } - return &t, err + return false } func parseWithCast[T any](v string, parse func(v string) (T, error)) (T, error) { @@ -59,27 +39,6 @@ func parseWithCast[T any](v string, parse func(v string) (T, error)) (T, error) return t, err } -func readRequestBody(req *http.Request) ([]byte, error) { - if req.Body == nil { - return nil, nil - } - body, err := io.ReadAll(req.Body) - if err != nil { - return nil, err - } - req.Body.Close() - return body, nil -} - -func contains[T comparable](s []T, v T) bool { - for _, vv := range s { - if vv == v { - return true - } - } - return false -} - func newTracker[T any]() *tracker[T] { return &tracker[T]{ items: map[string]*T{}, @@ -91,20 +50,10 @@ type tracker[T any] struct { mu sync.Mutex } -func (p *tracker[T]) key(req *http.Request) string { - path := req.URL.Path - if match, _ := regexp.Match(`/page_\d+$`, []byte(path)); match { - path = path[:strings.LastIndex(path, "/")] - } else if strings.HasSuffix(path, "/get/fake/status") { - path = path[:len(path)-16] - } - return path -} - func (p *tracker[T]) get(req *http.Request) *T { p.mu.Lock() defer p.mu.Unlock() - if item, ok := p.items[p.key(req)]; ok { + if item, ok := p.items[server.SanitizePagerPollerPath(req.URL.Path)]; ok { return item } return nil @@ -113,11 +62,11 @@ func (p *tracker[T]) get(req *http.Request) *T { func (p *tracker[T]) add(req *http.Request, item *T) { p.mu.Lock() defer p.mu.Unlock() - p.items[p.key(req)] = item + p.items[server.SanitizePagerPollerPath(req.URL.Path)] = item } func (p *tracker[T]) remove(req *http.Request) { p.mu.Lock() defer p.mu.Unlock() - delete(p.items, p.key(req)) + delete(p.items, server.SanitizePagerPollerPath(req.URL.Path)) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake/marketplaceagreements_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake/marketplaceagreements_server.go index 45346d8f0..3cddfa1de 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake/marketplaceagreements_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake/marketplaceagreements_server.go @@ -100,25 +100,25 @@ func (m *MarketplaceAgreementsServerTransport) dispatchCancel(req *http.Request) if m.srv.Cancel == nil { return nil, &nonRetriableError{errors.New("fake for method Cancel not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.MarketplaceOrdering/agreements/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/offers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/plans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.MarketplaceOrdering/agreements/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/offers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/plans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - publisherIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("publisherId")]) + publisherIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("publisherId")]) if err != nil { return nil, err } - offerIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("offerId")]) + offerIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("offerId")]) if err != nil { return nil, err } - planIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("planId")]) + planIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("planId")]) if err != nil { return nil, err } - respr, errRespr := m.srv.Cancel(req.Context(), publisherIDUnescaped, offerIDUnescaped, planIDUnescaped, nil) + respr, errRespr := m.srv.Cancel(req.Context(), publisherIDParam, offerIDParam, planIDParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -137,7 +137,7 @@ func (m *MarketplaceAgreementsServerTransport) dispatchCreate(req *http.Request) if m.srv.Create == nil { return nil, &nonRetriableError{errors.New("fake for method Create not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.MarketplaceOrdering/offerTypes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publishers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/offers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/plans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/agreements/current` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.MarketplaceOrdering/offerTypes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publishers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/offers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/plans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/agreements/current` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { @@ -147,23 +147,29 @@ func (m *MarketplaceAgreementsServerTransport) dispatchCreate(req *http.Request) if err != nil { return nil, err } - offerTypeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("offerType")]) + offerTypeParam, err := parseWithCast(matches[regex.SubexpIndex("offerType")], func(v string) (armmarketplaceordering.OfferType, error) { + p, unescapeErr := url.PathUnescape(v) + if unescapeErr != nil { + return "", unescapeErr + } + return armmarketplaceordering.OfferType(p), nil + }) if err != nil { return nil, err } - publisherIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("publisherId")]) + publisherIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("publisherId")]) if err != nil { return nil, err } - offerIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("offerId")]) + offerIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("offerId")]) if err != nil { return nil, err } - planIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("planId")]) + planIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("planId")]) if err != nil { return nil, err } - respr, errRespr := m.srv.Create(req.Context(), armmarketplaceordering.OfferType(offerTypeUnescaped), publisherIDUnescaped, offerIDUnescaped, planIDUnescaped, body, nil) + respr, errRespr := m.srv.Create(req.Context(), offerTypeParam, publisherIDParam, offerIDParam, planIDParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -182,29 +188,35 @@ func (m *MarketplaceAgreementsServerTransport) dispatchGet(req *http.Request) (* if m.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.MarketplaceOrdering/offerTypes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publishers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/offers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/plans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/agreements/current` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.MarketplaceOrdering/offerTypes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publishers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/offers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/plans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/agreements/current` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - offerTypeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("offerType")]) + offerTypeParam, err := parseWithCast(matches[regex.SubexpIndex("offerType")], func(v string) (armmarketplaceordering.OfferType, error) { + p, unescapeErr := url.PathUnescape(v) + if unescapeErr != nil { + return "", unescapeErr + } + return armmarketplaceordering.OfferType(p), nil + }) if err != nil { return nil, err } - publisherIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("publisherId")]) + publisherIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("publisherId")]) if err != nil { return nil, err } - offerIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("offerId")]) + offerIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("offerId")]) if err != nil { return nil, err } - planIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("planId")]) + planIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("planId")]) if err != nil { return nil, err } - respr, errRespr := m.srv.Get(req.Context(), armmarketplaceordering.OfferType(offerTypeUnescaped), publisherIDUnescaped, offerIDUnescaped, planIDUnescaped, nil) + respr, errRespr := m.srv.Get(req.Context(), offerTypeParam, publisherIDParam, offerIDParam, planIDParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -223,25 +235,25 @@ func (m *MarketplaceAgreementsServerTransport) dispatchGetAgreement(req *http.Re if m.srv.GetAgreement == nil { return nil, &nonRetriableError{errors.New("fake for method GetAgreement not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.MarketplaceOrdering/agreements/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/offers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/plans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.MarketplaceOrdering/agreements/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/offers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/plans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - publisherIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("publisherId")]) + publisherIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("publisherId")]) if err != nil { return nil, err } - offerIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("offerId")]) + offerIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("offerId")]) if err != nil { return nil, err } - planIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("planId")]) + planIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("planId")]) if err != nil { return nil, err } - respr, errRespr := m.srv.GetAgreement(req.Context(), publisherIDUnescaped, offerIDUnescaped, planIDUnescaped, nil) + respr, errRespr := m.srv.GetAgreement(req.Context(), publisherIDParam, offerIDParam, planIDParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -260,7 +272,7 @@ func (m *MarketplaceAgreementsServerTransport) dispatchList(req *http.Request) ( if m.srv.List == nil { return nil, &nonRetriableError{errors.New("fake for method List not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.MarketplaceOrdering/agreements` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.MarketplaceOrdering/agreements` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -285,25 +297,25 @@ func (m *MarketplaceAgreementsServerTransport) dispatchSign(req *http.Request) ( if m.srv.Sign == nil { return nil, &nonRetriableError{errors.New("fake for method Sign not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.MarketplaceOrdering/agreements/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/offers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/plans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sign` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.MarketplaceOrdering/agreements/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/offers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/plans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sign` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - publisherIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("publisherId")]) + publisherIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("publisherId")]) if err != nil { return nil, err } - offerIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("offerId")]) + offerIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("offerId")]) if err != nil { return nil, err } - planIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("planId")]) + planIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("planId")]) if err != nil { return nil, err } - respr, errRespr := m.srv.Sign(req.Context(), publisherIDUnescaped, offerIDUnescaped, planIDUnescaped, nil) + respr, errRespr := m.srv.Sign(req.Context(), publisherIDParam, offerIDParam, planIDParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake/server_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake/server_factory.go new file mode 100644 index 000000000..3d070fc1d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake/server_factory.go @@ -0,0 +1,82 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "errors" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "strings" + "sync" +) + +// ServerFactory is a fake server for instances of the armmarketplaceordering.ClientFactory type. +type ServerFactory struct { + MarketplaceAgreementsServer MarketplaceAgreementsServer + OperationsServer OperationsServer +} + +// NewServerFactoryTransport creates a new instance of ServerFactoryTransport with the provided implementation. +// The returned ServerFactoryTransport instance is connected to an instance of armmarketplaceordering.ClientFactory via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewServerFactoryTransport(srv *ServerFactory) *ServerFactoryTransport { + return &ServerFactoryTransport{ + srv: srv, + } +} + +// ServerFactoryTransport connects instances of armmarketplaceordering.ClientFactory to instances of ServerFactory. +// Don't use this type directly, use NewServerFactoryTransport instead. +type ServerFactoryTransport struct { + srv *ServerFactory + trMu sync.Mutex + trMarketplaceAgreementsServer *MarketplaceAgreementsServerTransport + trOperationsServer *OperationsServerTransport +} + +// Do implements the policy.Transporter interface for ServerFactoryTransport. +func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + client := method[:strings.Index(method, ".")] + var resp *http.Response + var err error + + switch client { + case "MarketplaceAgreementsClient": + initServer(s, &s.trMarketplaceAgreementsServer, func() *MarketplaceAgreementsServerTransport { + return NewMarketplaceAgreementsServerTransport(&s.srv.MarketplaceAgreementsServer) + }) + resp, err = s.trMarketplaceAgreementsServer.Do(req) + case "OperationsClient": + initServer(s, &s.trOperationsServer, func() *OperationsServerTransport { return NewOperationsServerTransport(&s.srv.OperationsServer) }) + resp, err = s.trOperationsServer.Do(req) + default: + err = fmt.Errorf("unhandled client %s", client) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func initServer[T any](s *ServerFactoryTransport, dst **T, src func() *T) { + s.trMu.Lock() + if *dst == nil { + *dst = src() + } + s.trMu.Unlock() +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake/time_rfc3339.go index 45fe10cbc..b0535a7b6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake/time_rfc3339.go @@ -18,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -70,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/marketplaceagreements_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/marketplaceagreements_client.go index 5cc1f977d..2ba273a83 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/marketplaceagreements_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/marketplaceagreements_client.go @@ -32,7 +32,7 @@ type MarketplaceAgreementsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewMarketplaceAgreementsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MarketplaceAgreementsClient, error) { - cl, err := arm.NewClient(moduleName+".MarketplaceAgreementsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/models_serde.go index 9069c5c67..b6e988be1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/models_serde.go @@ -25,7 +25,7 @@ func (a AgreementProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "privacyPolicyLink", a.PrivacyPolicyLink) populate(objectMap, "product", a.Product) populate(objectMap, "publisher", a.Publisher) - populateTimeRFC3339(objectMap, "retrieveDatetime", a.RetrieveDatetime) + populateDateTimeRFC3339(objectMap, "retrieveDatetime", a.RetrieveDatetime) populate(objectMap, "signature", a.Signature) return json.Marshal(objectMap) } @@ -61,7 +61,7 @@ func (a *AgreementProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Publisher", &a.Publisher) delete(rawMsg, key) case "retrieveDatetime": - err = unpopulateTimeRFC3339(val, "RetrieveDatetime", &a.RetrieveDatetime) + err = unpopulateDateTimeRFC3339(val, "RetrieveDatetime", &a.RetrieveDatetime) delete(rawMsg, key) case "signature": err = unpopulate(val, "Signature", &a.Signature) @@ -314,10 +314,10 @@ func (r *Resource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) populate(objectMap, "lastModifiedByType", s.LastModifiedByType) return json.Marshal(objectMap) @@ -333,7 +333,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &s.CreatedBy) @@ -342,7 +342,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/operations_client.go index 95ab96079..f727aed08 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/operations_client.go @@ -27,7 +27,7 @@ type OperationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - cl, err := arm.NewClient(moduleName+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,23 +48,16 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return OperationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/time_rfc3339.go index 9054f9009..b79c1ae39 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/time_rfc3339.go @@ -18,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -70,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/CHANGELOG.md index e1b1bf3ca..0d27c0773 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 4.3.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + ## 4.3.0-beta.1 (2023-10-09) ### Features Added diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/README.md index 31a3b8c14..093565038 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/README.md @@ -61,29 +61,11 @@ client := clientFactory.NewVirtualHubBgpConnectionsClient() ``` ## Fakes -The `fake` package provides implementations for fake servers that can be used for testing. -To create a fake server, declare an instance of the required fake server type(s). -```go -myFakeInterfacesServer := fake.InterfacesServer{} -``` -Next, provide func implementations for the methods you wish to fake. -The named return variables can be used to simplify return value construction. -```go -myFakeInterfacesServer.Get = func(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *armnetwork.InterfacesClientGetOptions) (resp azfake.Responder[armnetwork.InterfacesClientGetResponse], errResp azfake.ErrorResponder) { - // TODO: resp.SetResponse(/* your fake InterfacesClientGetResponse response */) - return -} -``` -You connect the fake server to a client instance during construction through the optional transport. -Use `NewTokenCredential()` from `azcore/fake` to obtain a fake credential. -```go -import azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" -client, err := armnetwork.NewInterfacesClient("subscriptionID", azfake.NewTokenCredential(), &arm.ClientOptions{ - ClientOptions: azcore.ClientOptions{ - Transport: fake.NewInterfacesServerTransport(&myFakeInterfacesServer), - }, -}) -``` + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. ## More sample code diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/adminrulecollections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/adminrulecollections_client.go index d7a1db9f9..c3b96670a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/adminrulecollections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/adminrulecollections_client.go @@ -34,7 +34,7 @@ type AdminRuleCollectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAdminRuleCollectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AdminRuleCollectionsClient, error) { - cl, err := arm.NewClient(moduleName+".AdminRuleCollectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -142,10 +142,13 @@ func (client *AdminRuleCollectionsClient) BeginDelete(ctx context.Context, resou } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AdminRuleCollectionsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[AdminRuleCollectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AdminRuleCollectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -301,23 +304,16 @@ func (client *AdminRuleCollectionsClient) NewListPager(resourceGroupName string, }, Fetcher: func(ctx context.Context, page *AdminRuleCollectionsClientListResponse) (AdminRuleCollectionsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AdminRuleCollectionsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) + }, nil) if err != nil { return AdminRuleCollectionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AdminRuleCollectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AdminRuleCollectionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/adminrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/adminrules_client.go index 893152c15..f5928b3df 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/adminrules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/adminrules_client.go @@ -34,7 +34,7 @@ type AdminRulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAdminRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AdminRulesClient, error) { - cl, err := arm.NewClient(moduleName+".AdminRulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -147,10 +147,13 @@ func (client *AdminRulesClient) BeginDelete(ctx context.Context, resourceGroupNa } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AdminRulesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[AdminRulesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AdminRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -314,23 +317,16 @@ func (client *AdminRulesClient) NewListPager(resourceGroupName string, networkMa }, Fetcher: func(ctx context.Context, page *AdminRulesClientListResponse) (AdminRulesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AdminRulesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) + }, nil) if err != nil { return AdminRulesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AdminRulesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AdminRulesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgatewayprivateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgatewayprivateendpointconnections_client.go index c22dfb3f8..6632c4bd2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgatewayprivateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgatewayprivateendpointconnections_client.go @@ -33,7 +33,7 @@ type ApplicationGatewayPrivateEndpointConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewApplicationGatewayPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewayPrivateEndpointConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".ApplicationGatewayPrivateEndpointConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *ApplicationGatewayPrivateEndpointConnectionsClient) BeginDelete(ct } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -207,23 +210,16 @@ func (client *ApplicationGatewayPrivateEndpointConnectionsClient) NewListPager(r }, Fetcher: func(ctx context.Context, page *ApplicationGatewayPrivateEndpointConnectionsClientListResponse) (ApplicationGatewayPrivateEndpointConnectionsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationGatewayPrivateEndpointConnectionsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ApplicationGatewayPrivateEndpointConnectionsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) + }, nil) if err != nil { return ApplicationGatewayPrivateEndpointConnectionsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewayPrivateEndpointConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -283,10 +279,13 @@ func (client *ApplicationGatewayPrivateEndpointConnectionsClient) BeginUpdate(ct } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgatewayprivatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgatewayprivatelinkresources_client.go index 1ac8a7445..a57e95d52 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgatewayprivatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgatewayprivatelinkresources_client.go @@ -33,7 +33,7 @@ type ApplicationGatewayPrivateLinkResourcesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewApplicationGatewayPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewayPrivateLinkResourcesClient, error) { - cl, err := arm.NewClient(moduleName+".ApplicationGatewayPrivateLinkResourcesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,23 +58,16 @@ func (client *ApplicationGatewayPrivateLinkResourcesClient) NewListPager(resourc }, Fetcher: func(ctx context.Context, page *ApplicationGatewayPrivateLinkResourcesClientListResponse) (ApplicationGatewayPrivateLinkResourcesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationGatewayPrivateLinkResourcesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) + }, nil) if err != nil { return ApplicationGatewayPrivateLinkResourcesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ApplicationGatewayPrivateLinkResourcesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewayPrivateLinkResourcesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgateways_client.go index 7780949ec..713c18f0e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgateways_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgateways_client.go @@ -33,7 +33,7 @@ type ApplicationGatewaysClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewApplicationGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewaysClient, error) { - cl, err := arm.NewClient(moduleName+".ApplicationGatewaysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,10 +60,13 @@ func (client *ApplicationGatewaysClient) BeginBackendHealth(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationGatewaysClientBackendHealthResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ApplicationGatewaysClientBackendHealthResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationGatewaysClientBackendHealthResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -139,10 +142,13 @@ func (client *ApplicationGatewaysClient) BeginBackendHealthOnDemand(ctx context. } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationGatewaysClientBackendHealthOnDemandResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ApplicationGatewaysClientBackendHealthOnDemandResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationGatewaysClientBackendHealthOnDemandResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -221,10 +227,13 @@ func (client *ApplicationGatewaysClient) BeginCreateOrUpdate(ctx context.Context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationGatewaysClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ApplicationGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationGatewaysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -298,10 +307,13 @@ func (client *ApplicationGatewaysClient) BeginDelete(ctx context.Context, resour } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationGatewaysClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ApplicationGatewaysClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationGatewaysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -493,23 +505,16 @@ func (client *ApplicationGatewaysClient) NewListPager(resourceGroupName string, }, Fetcher: func(ctx context.Context, page *ApplicationGatewaysClientListResponse) (ApplicationGatewaysClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationGatewaysClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return ApplicationGatewaysClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ApplicationGatewaysClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewaysClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -559,23 +564,16 @@ func (client *ApplicationGatewaysClient) NewListAllPager(options *ApplicationGat }, Fetcher: func(ctx context.Context, page *ApplicationGatewaysClientListAllResponse) (ApplicationGatewaysClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationGatewaysClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ApplicationGatewaysClientListAllResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return ApplicationGatewaysClientListAllResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewaysClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -786,23 +784,16 @@ func (client *ApplicationGatewaysClient) NewListAvailableSSLPredefinedPoliciesPa }, Fetcher: func(ctx context.Context, page *ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse) (ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationGatewaysClient.NewListAvailableSSLPredefinedPoliciesPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAvailableSSLPredefinedPoliciesCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAvailableSSLPredefinedPoliciesCreateRequest(ctx, options) + }, nil) if err != nil { return ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse{}, runtime.NewResponseError(resp) - } return client.listAvailableSSLPredefinedPoliciesHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -962,10 +953,13 @@ func (client *ApplicationGatewaysClient) BeginStart(ctx context.Context, resourc } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationGatewaysClientStartResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ApplicationGatewaysClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationGatewaysClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1036,10 +1030,13 @@ func (client *ApplicationGatewaysClient) BeginStop(ctx context.Context, resource } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationGatewaysClientStopResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ApplicationGatewaysClientStopResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationGatewaysClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgatewaywafdynamicmanifests_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgatewaywafdynamicmanifests_client.go index 56015e873..6821c9769 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgatewaywafdynamicmanifests_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgatewaywafdynamicmanifests_client.go @@ -33,7 +33,7 @@ type ApplicationGatewayWafDynamicManifestsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewApplicationGatewayWafDynamicManifestsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewayWafDynamicManifestsClient, error) { - cl, err := arm.NewClient(moduleName+".ApplicationGatewayWafDynamicManifestsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,23 +57,16 @@ func (client *ApplicationGatewayWafDynamicManifestsClient) NewGetPager(location }, Fetcher: func(ctx context.Context, page *ApplicationGatewayWafDynamicManifestsClientGetResponse) (ApplicationGatewayWafDynamicManifestsClientGetResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationGatewayWafDynamicManifestsClient.NewGetPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.getCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getCreateRequest(ctx, location, options) + }, nil) if err != nil { return ApplicationGatewayWafDynamicManifestsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ApplicationGatewayWafDynamicManifestsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewayWafDynamicManifestsClientGetResponse{}, runtime.NewResponseError(resp) - } return client.getHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgatewaywafdynamicmanifestsdefault_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgatewaywafdynamicmanifestsdefault_client.go index eb6426bf8..d189a5614 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgatewaywafdynamicmanifestsdefault_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationgatewaywafdynamicmanifestsdefault_client.go @@ -33,7 +33,7 @@ type ApplicationGatewayWafDynamicManifestsDefaultClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewApplicationGatewayWafDynamicManifestsDefaultClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewayWafDynamicManifestsDefaultClient, error) { - cl, err := arm.NewClient(moduleName+".ApplicationGatewayWafDynamicManifestsDefaultClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationsecuritygroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationsecuritygroups_client.go index 87f74c62d..74f42055f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationsecuritygroups_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/applicationsecuritygroups_client.go @@ -33,7 +33,7 @@ type ApplicationSecurityGroupsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewApplicationSecurityGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationSecurityGroupsClient, error) { - cl, err := arm.NewClient(moduleName+".ApplicationSecurityGroupsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *ApplicationSecurityGroupsClient) BeginCreateOrUpdate(ctx context.C } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationSecurityGroupsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ApplicationSecurityGroupsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationSecurityGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *ApplicationSecurityGroupsClient) BeginDelete(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationSecurityGroupsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ApplicationSecurityGroupsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationSecurityGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -274,23 +280,16 @@ func (client *ApplicationSecurityGroupsClient) NewListPager(resourceGroupName st }, Fetcher: func(ctx context.Context, page *ApplicationSecurityGroupsClientListResponse) (ApplicationSecurityGroupsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationSecurityGroupsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ApplicationSecurityGroupsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return ApplicationSecurityGroupsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationSecurityGroupsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -340,23 +339,16 @@ func (client *ApplicationSecurityGroupsClient) NewListAllPager(options *Applicat }, Fetcher: func(ctx context.Context, page *ApplicationSecurityGroupsClientListAllResponse) (ApplicationSecurityGroupsClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationSecurityGroupsClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return ApplicationSecurityGroupsClientListAllResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ApplicationSecurityGroupsClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationSecurityGroupsClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/autorest.md index 601c51f41..1982a9354 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/autorest.md @@ -8,9 +8,6 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/network/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/network/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 4.3.0-beta.1 +module-version: 4.3.0 tag: package-2023-05 -azcore-version: 1.9.0-beta.1 -generate-fakes: true -inject-spans: true ``` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availabledelegations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availabledelegations_client.go index e5ad23972..cd58ab741 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availabledelegations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availabledelegations_client.go @@ -33,7 +33,7 @@ type AvailableDelegationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAvailableDelegationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableDelegationsClient, error) { - cl, err := arm.NewClient(moduleName+".AvailableDelegationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,23 +57,16 @@ func (client *AvailableDelegationsClient) NewListPager(location string, options }, Fetcher: func(ctx context.Context, page *AvailableDelegationsClientListResponse) (AvailableDelegationsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AvailableDelegationsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) if err != nil { return AvailableDelegationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AvailableDelegationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AvailableDelegationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availableendpointservices_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availableendpointservices_client.go index 00fa61ed0..e64ff0ed7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availableendpointservices_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availableendpointservices_client.go @@ -33,7 +33,7 @@ type AvailableEndpointServicesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAvailableEndpointServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableEndpointServicesClient, error) { - cl, err := arm.NewClient(moduleName+".AvailableEndpointServicesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,23 +57,16 @@ func (client *AvailableEndpointServicesClient) NewListPager(location string, opt }, Fetcher: func(ctx context.Context, page *AvailableEndpointServicesClientListResponse) (AvailableEndpointServicesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AvailableEndpointServicesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) if err != nil { return AvailableEndpointServicesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AvailableEndpointServicesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AvailableEndpointServicesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availableprivateendpointtypes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availableprivateendpointtypes_client.go index 4d9ae561a..dec555fa1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availableprivateendpointtypes_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availableprivateendpointtypes_client.go @@ -33,7 +33,7 @@ type AvailablePrivateEndpointTypesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAvailablePrivateEndpointTypesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailablePrivateEndpointTypesClient, error) { - cl, err := arm.NewClient(moduleName+".AvailablePrivateEndpointTypesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,23 +58,16 @@ func (client *AvailablePrivateEndpointTypesClient) NewListPager(location string, }, Fetcher: func(ctx context.Context, page *AvailablePrivateEndpointTypesClientListResponse) (AvailablePrivateEndpointTypesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AvailablePrivateEndpointTypesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) if err != nil { return AvailablePrivateEndpointTypesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AvailablePrivateEndpointTypesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AvailablePrivateEndpointTypesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -127,23 +120,16 @@ func (client *AvailablePrivateEndpointTypesClient) NewListByResourceGroupPager(l }, Fetcher: func(ctx context.Context, page *AvailablePrivateEndpointTypesClientListByResourceGroupResponse) (AvailablePrivateEndpointTypesClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AvailablePrivateEndpointTypesClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, location, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, location, resourceGroupName, options) + }, nil) if err != nil { return AvailablePrivateEndpointTypesClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AvailablePrivateEndpointTypesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AvailablePrivateEndpointTypesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availableresourcegroupdelegations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availableresourcegroupdelegations_client.go index 2ecf44dfa..c4916fbfc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availableresourcegroupdelegations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availableresourcegroupdelegations_client.go @@ -33,7 +33,7 @@ type AvailableResourceGroupDelegationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAvailableResourceGroupDelegationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableResourceGroupDelegationsClient, error) { - cl, err := arm.NewClient(moduleName+".AvailableResourceGroupDelegationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,23 +58,16 @@ func (client *AvailableResourceGroupDelegationsClient) NewListPager(location str }, Fetcher: func(ctx context.Context, page *AvailableResourceGroupDelegationsClientListResponse) (AvailableResourceGroupDelegationsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AvailableResourceGroupDelegationsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, location, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, resourceGroupName, options) + }, nil) if err != nil { return AvailableResourceGroupDelegationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AvailableResourceGroupDelegationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AvailableResourceGroupDelegationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availableservicealiases_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availableservicealiases_client.go index a313bb73f..ccb45a0c6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availableservicealiases_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/availableservicealiases_client.go @@ -33,7 +33,7 @@ type AvailableServiceAliasesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAvailableServiceAliasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableServiceAliasesClient, error) { - cl, err := arm.NewClient(moduleName+".AvailableServiceAliasesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -57,23 +57,16 @@ func (client *AvailableServiceAliasesClient) NewListPager(location string, optio }, Fetcher: func(ctx context.Context, page *AvailableServiceAliasesClientListResponse) (AvailableServiceAliasesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AvailableServiceAliasesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) if err != nil { return AvailableServiceAliasesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AvailableServiceAliasesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AvailableServiceAliasesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -125,23 +118,16 @@ func (client *AvailableServiceAliasesClient) NewListByResourceGroupPager(resourc }, Fetcher: func(ctx context.Context, page *AvailableServiceAliasesClientListByResourceGroupResponse) (AvailableServiceAliasesClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AvailableServiceAliasesClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, location, options) + }, nil) if err != nil { return AvailableServiceAliasesClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AvailableServiceAliasesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AvailableServiceAliasesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/azurefirewallfqdntags_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/azurefirewallfqdntags_client.go index 27069ff5f..dfd02e2ef 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/azurefirewallfqdntags_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/azurefirewallfqdntags_client.go @@ -33,7 +33,7 @@ type AzureFirewallFqdnTagsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAzureFirewallFqdnTagsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureFirewallFqdnTagsClient, error) { - cl, err := arm.NewClient(moduleName+".AzureFirewallFqdnTagsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,23 +56,16 @@ func (client *AzureFirewallFqdnTagsClient) NewListAllPager(options *AzureFirewal }, Fetcher: func(ctx context.Context, page *AzureFirewallFqdnTagsClientListAllResponse) (AzureFirewallFqdnTagsClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AzureFirewallFqdnTagsClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return AzureFirewallFqdnTagsClientListAllResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AzureFirewallFqdnTagsClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AzureFirewallFqdnTagsClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/azurefirewalls_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/azurefirewalls_client.go index 9c6bc7bd4..f46875f7c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/azurefirewalls_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/azurefirewalls_client.go @@ -33,7 +33,7 @@ type AzureFirewallsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAzureFirewallsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureFirewallsClient, error) { - cl, err := arm.NewClient(moduleName+".AzureFirewallsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *AzureFirewallsClient) BeginCreateOrUpdate(ctx context.Context, res } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AzureFirewallsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[AzureFirewallsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AzureFirewallsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *AzureFirewallsClient) BeginDelete(ctx context.Context, resourceGro } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AzureFirewallsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[AzureFirewallsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AzureFirewallsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -272,23 +278,16 @@ func (client *AzureFirewallsClient) NewListPager(resourceGroupName string, optio }, Fetcher: func(ctx context.Context, page *AzureFirewallsClientListResponse) (AzureFirewallsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AzureFirewallsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return AzureFirewallsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AzureFirewallsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AzureFirewallsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -338,23 +337,16 @@ func (client *AzureFirewallsClient) NewListAllPager(options *AzureFirewallsClien }, Fetcher: func(ctx context.Context, page *AzureFirewallsClientListAllResponse) (AzureFirewallsClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AzureFirewallsClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return AzureFirewallsClientListAllResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AzureFirewallsClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AzureFirewallsClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -404,10 +396,13 @@ func (client *AzureFirewallsClient) BeginListLearnedPrefixes(ctx context.Context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AzureFirewallsClientListLearnedPrefixesResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[AzureFirewallsClientListLearnedPrefixesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AzureFirewallsClientListLearnedPrefixesResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -479,10 +474,13 @@ func (client *AzureFirewallsClient) BeginPacketCapture(ctx context.Context, reso } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AzureFirewallsClientPacketCaptureResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[AzureFirewallsClientPacketCaptureResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AzureFirewallsClientPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -557,10 +555,13 @@ func (client *AzureFirewallsClient) BeginUpdateTags(ctx context.Context, resourc } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AzureFirewallsClientUpdateTagsResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[AzureFirewallsClientUpdateTagsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AzureFirewallsClientUpdateTagsResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/bastionhosts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/bastionhosts_client.go index 497fa9352..315c2d66b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/bastionhosts_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/bastionhosts_client.go @@ -33,7 +33,7 @@ type BastionHostsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewBastionHostsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BastionHostsClient, error) { - cl, err := arm.NewClient(moduleName+".BastionHostsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *BastionHostsClient) BeginCreateOrUpdate(ctx context.Context, resou } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BastionHostsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[BastionHostsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BastionHostsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *BastionHostsClient) BeginDelete(ctx context.Context, resourceGroup } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BastionHostsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[BastionHostsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BastionHostsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -271,23 +277,16 @@ func (client *BastionHostsClient) NewListPager(options *BastionHostsClientListOp }, Fetcher: func(ctx context.Context, page *BastionHostsClientListResponse) (BastionHostsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BastionHostsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BastionHostsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return BastionHostsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BastionHostsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -334,23 +333,16 @@ func (client *BastionHostsClient) NewListByResourceGroupPager(resourceGroupName }, Fetcher: func(ctx context.Context, page *BastionHostsClientListByResourceGroupResponse) (BastionHostsClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BastionHostsClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return BastionHostsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return BastionHostsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BastionHostsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -405,10 +397,13 @@ func (client *BastionHostsClient) BeginUpdateTags(ctx context.Context, resourceG } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BastionHostsClientUpdateTagsResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[BastionHostsClientUpdateTagsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BastionHostsClientUpdateTagsResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/bgpservicecommunities_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/bgpservicecommunities_client.go index 88bf734e8..5364936f3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/bgpservicecommunities_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/bgpservicecommunities_client.go @@ -33,7 +33,7 @@ type BgpServiceCommunitiesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewBgpServiceCommunitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BgpServiceCommunitiesClient, error) { - cl, err := arm.NewClient(moduleName+".BgpServiceCommunitiesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,23 +56,16 @@ func (client *BgpServiceCommunitiesClient) NewListPager(options *BgpServiceCommu }, Fetcher: func(ctx context.Context, page *BgpServiceCommunitiesClientListResponse) (BgpServiceCommunitiesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BgpServiceCommunitiesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return BgpServiceCommunitiesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return BgpServiceCommunitiesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BgpServiceCommunitiesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/build.go index 6cb650356..a22250100 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/build.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/build.go @@ -2,6 +2,6 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh ../../../../eng/scripts/build.ps1 -goExtension "@autorest/go@4.0.0-preview.54" -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/network/armnetwork +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/network/armnetwork package armnetwork diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/client_factory.go index 67883a217..b354e3dbb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/client_factory.go @@ -28,7 +28,7 @@ type ClientFactory struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { - _, err := arm.NewClient(moduleName+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -38,666 +38,799 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } +// NewAdminRuleCollectionsClient creates a new instance of AdminRuleCollectionsClient. func (c *ClientFactory) NewAdminRuleCollectionsClient() *AdminRuleCollectionsClient { subClient, _ := NewAdminRuleCollectionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewAdminRulesClient creates a new instance of AdminRulesClient. func (c *ClientFactory) NewAdminRulesClient() *AdminRulesClient { subClient, _ := NewAdminRulesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewApplicationGatewayPrivateEndpointConnectionsClient creates a new instance of ApplicationGatewayPrivateEndpointConnectionsClient. func (c *ClientFactory) NewApplicationGatewayPrivateEndpointConnectionsClient() *ApplicationGatewayPrivateEndpointConnectionsClient { subClient, _ := NewApplicationGatewayPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewApplicationGatewayPrivateLinkResourcesClient creates a new instance of ApplicationGatewayPrivateLinkResourcesClient. func (c *ClientFactory) NewApplicationGatewayPrivateLinkResourcesClient() *ApplicationGatewayPrivateLinkResourcesClient { subClient, _ := NewApplicationGatewayPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewApplicationGatewayWafDynamicManifestsClient creates a new instance of ApplicationGatewayWafDynamicManifestsClient. func (c *ClientFactory) NewApplicationGatewayWafDynamicManifestsClient() *ApplicationGatewayWafDynamicManifestsClient { subClient, _ := NewApplicationGatewayWafDynamicManifestsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewApplicationGatewayWafDynamicManifestsDefaultClient creates a new instance of ApplicationGatewayWafDynamicManifestsDefaultClient. func (c *ClientFactory) NewApplicationGatewayWafDynamicManifestsDefaultClient() *ApplicationGatewayWafDynamicManifestsDefaultClient { subClient, _ := NewApplicationGatewayWafDynamicManifestsDefaultClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewApplicationGatewaysClient creates a new instance of ApplicationGatewaysClient. func (c *ClientFactory) NewApplicationGatewaysClient() *ApplicationGatewaysClient { subClient, _ := NewApplicationGatewaysClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewApplicationSecurityGroupsClient creates a new instance of ApplicationSecurityGroupsClient. func (c *ClientFactory) NewApplicationSecurityGroupsClient() *ApplicationSecurityGroupsClient { subClient, _ := NewApplicationSecurityGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewAvailableDelegationsClient creates a new instance of AvailableDelegationsClient. func (c *ClientFactory) NewAvailableDelegationsClient() *AvailableDelegationsClient { subClient, _ := NewAvailableDelegationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewAvailableEndpointServicesClient creates a new instance of AvailableEndpointServicesClient. func (c *ClientFactory) NewAvailableEndpointServicesClient() *AvailableEndpointServicesClient { subClient, _ := NewAvailableEndpointServicesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewAvailablePrivateEndpointTypesClient creates a new instance of AvailablePrivateEndpointTypesClient. func (c *ClientFactory) NewAvailablePrivateEndpointTypesClient() *AvailablePrivateEndpointTypesClient { subClient, _ := NewAvailablePrivateEndpointTypesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewAvailableResourceGroupDelegationsClient creates a new instance of AvailableResourceGroupDelegationsClient. func (c *ClientFactory) NewAvailableResourceGroupDelegationsClient() *AvailableResourceGroupDelegationsClient { subClient, _ := NewAvailableResourceGroupDelegationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewAvailableServiceAliasesClient creates a new instance of AvailableServiceAliasesClient. func (c *ClientFactory) NewAvailableServiceAliasesClient() *AvailableServiceAliasesClient { subClient, _ := NewAvailableServiceAliasesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewAzureFirewallFqdnTagsClient creates a new instance of AzureFirewallFqdnTagsClient. func (c *ClientFactory) NewAzureFirewallFqdnTagsClient() *AzureFirewallFqdnTagsClient { subClient, _ := NewAzureFirewallFqdnTagsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewAzureFirewallsClient creates a new instance of AzureFirewallsClient. func (c *ClientFactory) NewAzureFirewallsClient() *AzureFirewallsClient { subClient, _ := NewAzureFirewallsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewBastionHostsClient creates a new instance of BastionHostsClient. func (c *ClientFactory) NewBastionHostsClient() *BastionHostsClient { subClient, _ := NewBastionHostsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewBgpServiceCommunitiesClient creates a new instance of BgpServiceCommunitiesClient. func (c *ClientFactory) NewBgpServiceCommunitiesClient() *BgpServiceCommunitiesClient { subClient, _ := NewBgpServiceCommunitiesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewConfigurationPolicyGroupsClient creates a new instance of ConfigurationPolicyGroupsClient. func (c *ClientFactory) NewConfigurationPolicyGroupsClient() *ConfigurationPolicyGroupsClient { subClient, _ := NewConfigurationPolicyGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewConnectionMonitorsClient creates a new instance of ConnectionMonitorsClient. func (c *ClientFactory) NewConnectionMonitorsClient() *ConnectionMonitorsClient { subClient, _ := NewConnectionMonitorsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewConnectivityConfigurationsClient creates a new instance of ConnectivityConfigurationsClient. func (c *ClientFactory) NewConnectivityConfigurationsClient() *ConnectivityConfigurationsClient { subClient, _ := NewConnectivityConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewCustomIPPrefixesClient creates a new instance of CustomIPPrefixesClient. func (c *ClientFactory) NewCustomIPPrefixesClient() *CustomIPPrefixesClient { subClient, _ := NewCustomIPPrefixesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDdosCustomPoliciesClient creates a new instance of DdosCustomPoliciesClient. func (c *ClientFactory) NewDdosCustomPoliciesClient() *DdosCustomPoliciesClient { subClient, _ := NewDdosCustomPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDdosProtectionPlansClient creates a new instance of DdosProtectionPlansClient. func (c *ClientFactory) NewDdosProtectionPlansClient() *DdosProtectionPlansClient { subClient, _ := NewDdosProtectionPlansClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDefaultSecurityRulesClient creates a new instance of DefaultSecurityRulesClient. func (c *ClientFactory) NewDefaultSecurityRulesClient() *DefaultSecurityRulesClient { subClient, _ := NewDefaultSecurityRulesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDscpConfigurationClient creates a new instance of DscpConfigurationClient. func (c *ClientFactory) NewDscpConfigurationClient() *DscpConfigurationClient { subClient, _ := NewDscpConfigurationClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewExpressRouteCircuitAuthorizationsClient creates a new instance of ExpressRouteCircuitAuthorizationsClient. func (c *ClientFactory) NewExpressRouteCircuitAuthorizationsClient() *ExpressRouteCircuitAuthorizationsClient { subClient, _ := NewExpressRouteCircuitAuthorizationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewExpressRouteCircuitConnectionsClient creates a new instance of ExpressRouteCircuitConnectionsClient. func (c *ClientFactory) NewExpressRouteCircuitConnectionsClient() *ExpressRouteCircuitConnectionsClient { subClient, _ := NewExpressRouteCircuitConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewExpressRouteCircuitPeeringsClient creates a new instance of ExpressRouteCircuitPeeringsClient. func (c *ClientFactory) NewExpressRouteCircuitPeeringsClient() *ExpressRouteCircuitPeeringsClient { subClient, _ := NewExpressRouteCircuitPeeringsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewExpressRouteCircuitsClient creates a new instance of ExpressRouteCircuitsClient. func (c *ClientFactory) NewExpressRouteCircuitsClient() *ExpressRouteCircuitsClient { subClient, _ := NewExpressRouteCircuitsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewExpressRouteConnectionsClient creates a new instance of ExpressRouteConnectionsClient. func (c *ClientFactory) NewExpressRouteConnectionsClient() *ExpressRouteConnectionsClient { subClient, _ := NewExpressRouteConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewExpressRouteCrossConnectionPeeringsClient creates a new instance of ExpressRouteCrossConnectionPeeringsClient. func (c *ClientFactory) NewExpressRouteCrossConnectionPeeringsClient() *ExpressRouteCrossConnectionPeeringsClient { subClient, _ := NewExpressRouteCrossConnectionPeeringsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewExpressRouteCrossConnectionsClient creates a new instance of ExpressRouteCrossConnectionsClient. func (c *ClientFactory) NewExpressRouteCrossConnectionsClient() *ExpressRouteCrossConnectionsClient { subClient, _ := NewExpressRouteCrossConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewExpressRouteGatewaysClient creates a new instance of ExpressRouteGatewaysClient. func (c *ClientFactory) NewExpressRouteGatewaysClient() *ExpressRouteGatewaysClient { subClient, _ := NewExpressRouteGatewaysClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewExpressRouteLinksClient creates a new instance of ExpressRouteLinksClient. func (c *ClientFactory) NewExpressRouteLinksClient() *ExpressRouteLinksClient { subClient, _ := NewExpressRouteLinksClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewExpressRoutePortAuthorizationsClient creates a new instance of ExpressRoutePortAuthorizationsClient. func (c *ClientFactory) NewExpressRoutePortAuthorizationsClient() *ExpressRoutePortAuthorizationsClient { subClient, _ := NewExpressRoutePortAuthorizationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewExpressRoutePortsClient creates a new instance of ExpressRoutePortsClient. func (c *ClientFactory) NewExpressRoutePortsClient() *ExpressRoutePortsClient { subClient, _ := NewExpressRoutePortsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewExpressRoutePortsLocationsClient creates a new instance of ExpressRoutePortsLocationsClient. func (c *ClientFactory) NewExpressRoutePortsLocationsClient() *ExpressRoutePortsLocationsClient { subClient, _ := NewExpressRoutePortsLocationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewExpressRouteProviderPortsLocationClient creates a new instance of ExpressRouteProviderPortsLocationClient. func (c *ClientFactory) NewExpressRouteProviderPortsLocationClient() *ExpressRouteProviderPortsLocationClient { subClient, _ := NewExpressRouteProviderPortsLocationClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewExpressRouteServiceProvidersClient creates a new instance of ExpressRouteServiceProvidersClient. func (c *ClientFactory) NewExpressRouteServiceProvidersClient() *ExpressRouteServiceProvidersClient { subClient, _ := NewExpressRouteServiceProvidersClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewFirewallPoliciesClient creates a new instance of FirewallPoliciesClient. func (c *ClientFactory) NewFirewallPoliciesClient() *FirewallPoliciesClient { subClient, _ := NewFirewallPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewFirewallPolicyIdpsSignaturesClient creates a new instance of FirewallPolicyIdpsSignaturesClient. func (c *ClientFactory) NewFirewallPolicyIdpsSignaturesClient() *FirewallPolicyIdpsSignaturesClient { subClient, _ := NewFirewallPolicyIdpsSignaturesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewFirewallPolicyIdpsSignaturesFilterValuesClient creates a new instance of FirewallPolicyIdpsSignaturesFilterValuesClient. func (c *ClientFactory) NewFirewallPolicyIdpsSignaturesFilterValuesClient() *FirewallPolicyIdpsSignaturesFilterValuesClient { subClient, _ := NewFirewallPolicyIdpsSignaturesFilterValuesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewFirewallPolicyIdpsSignaturesOverridesClient creates a new instance of FirewallPolicyIdpsSignaturesOverridesClient. func (c *ClientFactory) NewFirewallPolicyIdpsSignaturesOverridesClient() *FirewallPolicyIdpsSignaturesOverridesClient { subClient, _ := NewFirewallPolicyIdpsSignaturesOverridesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewFirewallPolicyRuleCollectionGroupsClient creates a new instance of FirewallPolicyRuleCollectionGroupsClient. func (c *ClientFactory) NewFirewallPolicyRuleCollectionGroupsClient() *FirewallPolicyRuleCollectionGroupsClient { subClient, _ := NewFirewallPolicyRuleCollectionGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewFlowLogsClient creates a new instance of FlowLogsClient. func (c *ClientFactory) NewFlowLogsClient() *FlowLogsClient { subClient, _ := NewFlowLogsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewGroupsClient creates a new instance of GroupsClient. func (c *ClientFactory) NewGroupsClient() *GroupsClient { subClient, _ := NewGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewHubRouteTablesClient creates a new instance of HubRouteTablesClient. func (c *ClientFactory) NewHubRouteTablesClient() *HubRouteTablesClient { subClient, _ := NewHubRouteTablesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewHubVirtualNetworkConnectionsClient creates a new instance of HubVirtualNetworkConnectionsClient. func (c *ClientFactory) NewHubVirtualNetworkConnectionsClient() *HubVirtualNetworkConnectionsClient { subClient, _ := NewHubVirtualNetworkConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewIPAllocationsClient creates a new instance of IPAllocationsClient. func (c *ClientFactory) NewIPAllocationsClient() *IPAllocationsClient { subClient, _ := NewIPAllocationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewIPGroupsClient creates a new instance of IPGroupsClient. func (c *ClientFactory) NewIPGroupsClient() *IPGroupsClient { subClient, _ := NewIPGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewInboundNatRulesClient creates a new instance of InboundNatRulesClient. func (c *ClientFactory) NewInboundNatRulesClient() *InboundNatRulesClient { subClient, _ := NewInboundNatRulesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewInboundSecurityRuleClient creates a new instance of InboundSecurityRuleClient. func (c *ClientFactory) NewInboundSecurityRuleClient() *InboundSecurityRuleClient { subClient, _ := NewInboundSecurityRuleClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewInterfaceIPConfigurationsClient creates a new instance of InterfaceIPConfigurationsClient. func (c *ClientFactory) NewInterfaceIPConfigurationsClient() *InterfaceIPConfigurationsClient { subClient, _ := NewInterfaceIPConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewInterfaceLoadBalancersClient creates a new instance of InterfaceLoadBalancersClient. func (c *ClientFactory) NewInterfaceLoadBalancersClient() *InterfaceLoadBalancersClient { subClient, _ := NewInterfaceLoadBalancersClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewInterfaceTapConfigurationsClient creates a new instance of InterfaceTapConfigurationsClient. func (c *ClientFactory) NewInterfaceTapConfigurationsClient() *InterfaceTapConfigurationsClient { subClient, _ := NewInterfaceTapConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewInterfacesClient creates a new instance of InterfacesClient. func (c *ClientFactory) NewInterfacesClient() *InterfacesClient { subClient, _ := NewInterfacesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewLoadBalancerBackendAddressPoolsClient creates a new instance of LoadBalancerBackendAddressPoolsClient. func (c *ClientFactory) NewLoadBalancerBackendAddressPoolsClient() *LoadBalancerBackendAddressPoolsClient { subClient, _ := NewLoadBalancerBackendAddressPoolsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewLoadBalancerFrontendIPConfigurationsClient creates a new instance of LoadBalancerFrontendIPConfigurationsClient. func (c *ClientFactory) NewLoadBalancerFrontendIPConfigurationsClient() *LoadBalancerFrontendIPConfigurationsClient { subClient, _ := NewLoadBalancerFrontendIPConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewLoadBalancerLoadBalancingRulesClient creates a new instance of LoadBalancerLoadBalancingRulesClient. func (c *ClientFactory) NewLoadBalancerLoadBalancingRulesClient() *LoadBalancerLoadBalancingRulesClient { subClient, _ := NewLoadBalancerLoadBalancingRulesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewLoadBalancerNetworkInterfacesClient creates a new instance of LoadBalancerNetworkInterfacesClient. func (c *ClientFactory) NewLoadBalancerNetworkInterfacesClient() *LoadBalancerNetworkInterfacesClient { subClient, _ := NewLoadBalancerNetworkInterfacesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewLoadBalancerOutboundRulesClient creates a new instance of LoadBalancerOutboundRulesClient. func (c *ClientFactory) NewLoadBalancerOutboundRulesClient() *LoadBalancerOutboundRulesClient { subClient, _ := NewLoadBalancerOutboundRulesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewLoadBalancerProbesClient creates a new instance of LoadBalancerProbesClient. func (c *ClientFactory) NewLoadBalancerProbesClient() *LoadBalancerProbesClient { subClient, _ := NewLoadBalancerProbesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewLoadBalancersClient creates a new instance of LoadBalancersClient. func (c *ClientFactory) NewLoadBalancersClient() *LoadBalancersClient { subClient, _ := NewLoadBalancersClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewLocalNetworkGatewaysClient creates a new instance of LocalNetworkGatewaysClient. func (c *ClientFactory) NewLocalNetworkGatewaysClient() *LocalNetworkGatewaysClient { subClient, _ := NewLocalNetworkGatewaysClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewManagementClient creates a new instance of ManagementClient. func (c *ClientFactory) NewManagementClient() *ManagementClient { subClient, _ := NewManagementClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewManagementGroupNetworkManagerConnectionsClient creates a new instance of ManagementGroupNetworkManagerConnectionsClient. func (c *ClientFactory) NewManagementGroupNetworkManagerConnectionsClient() *ManagementGroupNetworkManagerConnectionsClient { subClient, _ := NewManagementGroupNetworkManagerConnectionsClient(c.credential, c.options) return subClient } +// NewManagerCommitsClient creates a new instance of ManagerCommitsClient. func (c *ClientFactory) NewManagerCommitsClient() *ManagerCommitsClient { subClient, _ := NewManagerCommitsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewManagerDeploymentStatusClient creates a new instance of ManagerDeploymentStatusClient. func (c *ClientFactory) NewManagerDeploymentStatusClient() *ManagerDeploymentStatusClient { subClient, _ := NewManagerDeploymentStatusClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewManagersClient creates a new instance of ManagersClient. func (c *ClientFactory) NewManagersClient() *ManagersClient { subClient, _ := NewManagersClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewNatGatewaysClient creates a new instance of NatGatewaysClient. func (c *ClientFactory) NewNatGatewaysClient() *NatGatewaysClient { subClient, _ := NewNatGatewaysClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewNatRulesClient creates a new instance of NatRulesClient. func (c *ClientFactory) NewNatRulesClient() *NatRulesClient { subClient, _ := NewNatRulesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewOperationsClient creates a new instance of OperationsClient. func (c *ClientFactory) NewOperationsClient() *OperationsClient { subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } +// NewP2SVPNGatewaysClient creates a new instance of P2SVPNGatewaysClient. func (c *ClientFactory) NewP2SVPNGatewaysClient() *P2SVPNGatewaysClient { subClient, _ := NewP2SVPNGatewaysClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewPacketCapturesClient creates a new instance of PacketCapturesClient. func (c *ClientFactory) NewPacketCapturesClient() *PacketCapturesClient { subClient, _ := NewPacketCapturesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewPeerExpressRouteCircuitConnectionsClient creates a new instance of PeerExpressRouteCircuitConnectionsClient. func (c *ClientFactory) NewPeerExpressRouteCircuitConnectionsClient() *PeerExpressRouteCircuitConnectionsClient { subClient, _ := NewPeerExpressRouteCircuitConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewPrivateDNSZoneGroupsClient creates a new instance of PrivateDNSZoneGroupsClient. func (c *ClientFactory) NewPrivateDNSZoneGroupsClient() *PrivateDNSZoneGroupsClient { subClient, _ := NewPrivateDNSZoneGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewPrivateEndpointsClient creates a new instance of PrivateEndpointsClient. func (c *ClientFactory) NewPrivateEndpointsClient() *PrivateEndpointsClient { subClient, _ := NewPrivateEndpointsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewPrivateLinkServicesClient creates a new instance of PrivateLinkServicesClient. func (c *ClientFactory) NewPrivateLinkServicesClient() *PrivateLinkServicesClient { subClient, _ := NewPrivateLinkServicesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewProfilesClient creates a new instance of ProfilesClient. func (c *ClientFactory) NewProfilesClient() *ProfilesClient { subClient, _ := NewProfilesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewPublicIPAddressesClient creates a new instance of PublicIPAddressesClient. func (c *ClientFactory) NewPublicIPAddressesClient() *PublicIPAddressesClient { subClient, _ := NewPublicIPAddressesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewPublicIPPrefixesClient creates a new instance of PublicIPPrefixesClient. func (c *ClientFactory) NewPublicIPPrefixesClient() *PublicIPPrefixesClient { subClient, _ := NewPublicIPPrefixesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewResourceNavigationLinksClient creates a new instance of ResourceNavigationLinksClient. func (c *ClientFactory) NewResourceNavigationLinksClient() *ResourceNavigationLinksClient { subClient, _ := NewResourceNavigationLinksClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewRouteFilterRulesClient creates a new instance of RouteFilterRulesClient. func (c *ClientFactory) NewRouteFilterRulesClient() *RouteFilterRulesClient { subClient, _ := NewRouteFilterRulesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewRouteFiltersClient creates a new instance of RouteFiltersClient. func (c *ClientFactory) NewRouteFiltersClient() *RouteFiltersClient { subClient, _ := NewRouteFiltersClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewRouteMapsClient creates a new instance of RouteMapsClient. func (c *ClientFactory) NewRouteMapsClient() *RouteMapsClient { subClient, _ := NewRouteMapsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewRouteTablesClient creates a new instance of RouteTablesClient. func (c *ClientFactory) NewRouteTablesClient() *RouteTablesClient { subClient, _ := NewRouteTablesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewRoutesClient creates a new instance of RoutesClient. func (c *ClientFactory) NewRoutesClient() *RoutesClient { subClient, _ := NewRoutesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewRoutingIntentClient creates a new instance of RoutingIntentClient. func (c *ClientFactory) NewRoutingIntentClient() *RoutingIntentClient { subClient, _ := NewRoutingIntentClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewScopeConnectionsClient creates a new instance of ScopeConnectionsClient. func (c *ClientFactory) NewScopeConnectionsClient() *ScopeConnectionsClient { subClient, _ := NewScopeConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewSecurityAdminConfigurationsClient creates a new instance of SecurityAdminConfigurationsClient. func (c *ClientFactory) NewSecurityAdminConfigurationsClient() *SecurityAdminConfigurationsClient { subClient, _ := NewSecurityAdminConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewSecurityGroupsClient creates a new instance of SecurityGroupsClient. func (c *ClientFactory) NewSecurityGroupsClient() *SecurityGroupsClient { subClient, _ := NewSecurityGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewSecurityPartnerProvidersClient creates a new instance of SecurityPartnerProvidersClient. func (c *ClientFactory) NewSecurityPartnerProvidersClient() *SecurityPartnerProvidersClient { subClient, _ := NewSecurityPartnerProvidersClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewSecurityRulesClient creates a new instance of SecurityRulesClient. func (c *ClientFactory) NewSecurityRulesClient() *SecurityRulesClient { subClient, _ := NewSecurityRulesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewServiceAssociationLinksClient creates a new instance of ServiceAssociationLinksClient. func (c *ClientFactory) NewServiceAssociationLinksClient() *ServiceAssociationLinksClient { subClient, _ := NewServiceAssociationLinksClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewServiceEndpointPoliciesClient creates a new instance of ServiceEndpointPoliciesClient. func (c *ClientFactory) NewServiceEndpointPoliciesClient() *ServiceEndpointPoliciesClient { subClient, _ := NewServiceEndpointPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewServiceEndpointPolicyDefinitionsClient creates a new instance of ServiceEndpointPolicyDefinitionsClient. func (c *ClientFactory) NewServiceEndpointPolicyDefinitionsClient() *ServiceEndpointPolicyDefinitionsClient { subClient, _ := NewServiceEndpointPolicyDefinitionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewServiceTagInformationClient creates a new instance of ServiceTagInformationClient. func (c *ClientFactory) NewServiceTagInformationClient() *ServiceTagInformationClient { subClient, _ := NewServiceTagInformationClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewServiceTagsClient creates a new instance of ServiceTagsClient. func (c *ClientFactory) NewServiceTagsClient() *ServiceTagsClient { subClient, _ := NewServiceTagsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewStaticMembersClient creates a new instance of StaticMembersClient. func (c *ClientFactory) NewStaticMembersClient() *StaticMembersClient { subClient, _ := NewStaticMembersClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewSubnetsClient creates a new instance of SubnetsClient. func (c *ClientFactory) NewSubnetsClient() *SubnetsClient { subClient, _ := NewSubnetsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewSubscriptionNetworkManagerConnectionsClient creates a new instance of SubscriptionNetworkManagerConnectionsClient. func (c *ClientFactory) NewSubscriptionNetworkManagerConnectionsClient() *SubscriptionNetworkManagerConnectionsClient { subClient, _ := NewSubscriptionNetworkManagerConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewUsagesClient creates a new instance of UsagesClient. func (c *ClientFactory) NewUsagesClient() *UsagesClient { subClient, _ := NewUsagesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVPNConnectionsClient creates a new instance of VPNConnectionsClient. func (c *ClientFactory) NewVPNConnectionsClient() *VPNConnectionsClient { subClient, _ := NewVPNConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVPNGatewaysClient creates a new instance of VPNGatewaysClient. func (c *ClientFactory) NewVPNGatewaysClient() *VPNGatewaysClient { subClient, _ := NewVPNGatewaysClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVPNLinkConnectionsClient creates a new instance of VPNLinkConnectionsClient. func (c *ClientFactory) NewVPNLinkConnectionsClient() *VPNLinkConnectionsClient { subClient, _ := NewVPNLinkConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVPNServerConfigurationsAssociatedWithVirtualWanClient creates a new instance of VPNServerConfigurationsAssociatedWithVirtualWanClient. func (c *ClientFactory) NewVPNServerConfigurationsAssociatedWithVirtualWanClient() *VPNServerConfigurationsAssociatedWithVirtualWanClient { subClient, _ := NewVPNServerConfigurationsAssociatedWithVirtualWanClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVPNServerConfigurationsClient creates a new instance of VPNServerConfigurationsClient. func (c *ClientFactory) NewVPNServerConfigurationsClient() *VPNServerConfigurationsClient { subClient, _ := NewVPNServerConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVPNSiteLinkConnectionsClient creates a new instance of VPNSiteLinkConnectionsClient. func (c *ClientFactory) NewVPNSiteLinkConnectionsClient() *VPNSiteLinkConnectionsClient { subClient, _ := NewVPNSiteLinkConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVPNSiteLinksClient creates a new instance of VPNSiteLinksClient. func (c *ClientFactory) NewVPNSiteLinksClient() *VPNSiteLinksClient { subClient, _ := NewVPNSiteLinksClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVPNSitesClient creates a new instance of VPNSitesClient. func (c *ClientFactory) NewVPNSitesClient() *VPNSitesClient { subClient, _ := NewVPNSitesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVPNSitesConfigurationClient creates a new instance of VPNSitesConfigurationClient. func (c *ClientFactory) NewVPNSitesConfigurationClient() *VPNSitesConfigurationClient { subClient, _ := NewVPNSitesConfigurationClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVipSwapClient creates a new instance of VipSwapClient. func (c *ClientFactory) NewVipSwapClient() *VipSwapClient { subClient, _ := NewVipSwapClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualApplianceConnectionsClient creates a new instance of VirtualApplianceConnectionsClient. func (c *ClientFactory) NewVirtualApplianceConnectionsClient() *VirtualApplianceConnectionsClient { subClient, _ := NewVirtualApplianceConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualApplianceSKUsClient creates a new instance of VirtualApplianceSKUsClient. func (c *ClientFactory) NewVirtualApplianceSKUsClient() *VirtualApplianceSKUsClient { subClient, _ := NewVirtualApplianceSKUsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualApplianceSitesClient creates a new instance of VirtualApplianceSitesClient. func (c *ClientFactory) NewVirtualApplianceSitesClient() *VirtualApplianceSitesClient { subClient, _ := NewVirtualApplianceSitesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualAppliancesClient creates a new instance of VirtualAppliancesClient. func (c *ClientFactory) NewVirtualAppliancesClient() *VirtualAppliancesClient { subClient, _ := NewVirtualAppliancesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualHubBgpConnectionClient creates a new instance of VirtualHubBgpConnectionClient. func (c *ClientFactory) NewVirtualHubBgpConnectionClient() *VirtualHubBgpConnectionClient { subClient, _ := NewVirtualHubBgpConnectionClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualHubBgpConnectionsClient creates a new instance of VirtualHubBgpConnectionsClient. func (c *ClientFactory) NewVirtualHubBgpConnectionsClient() *VirtualHubBgpConnectionsClient { subClient, _ := NewVirtualHubBgpConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualHubIPConfigurationClient creates a new instance of VirtualHubIPConfigurationClient. func (c *ClientFactory) NewVirtualHubIPConfigurationClient() *VirtualHubIPConfigurationClient { subClient, _ := NewVirtualHubIPConfigurationClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualHubRouteTableV2SClient creates a new instance of VirtualHubRouteTableV2SClient. func (c *ClientFactory) NewVirtualHubRouteTableV2SClient() *VirtualHubRouteTableV2SClient { subClient, _ := NewVirtualHubRouteTableV2SClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualHubsClient creates a new instance of VirtualHubsClient. func (c *ClientFactory) NewVirtualHubsClient() *VirtualHubsClient { subClient, _ := NewVirtualHubsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualNetworkGatewayConnectionsClient creates a new instance of VirtualNetworkGatewayConnectionsClient. func (c *ClientFactory) NewVirtualNetworkGatewayConnectionsClient() *VirtualNetworkGatewayConnectionsClient { subClient, _ := NewVirtualNetworkGatewayConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualNetworkGatewayNatRulesClient creates a new instance of VirtualNetworkGatewayNatRulesClient. func (c *ClientFactory) NewVirtualNetworkGatewayNatRulesClient() *VirtualNetworkGatewayNatRulesClient { subClient, _ := NewVirtualNetworkGatewayNatRulesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualNetworkGatewaysClient creates a new instance of VirtualNetworkGatewaysClient. func (c *ClientFactory) NewVirtualNetworkGatewaysClient() *VirtualNetworkGatewaysClient { subClient, _ := NewVirtualNetworkGatewaysClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualNetworkPeeringsClient creates a new instance of VirtualNetworkPeeringsClient. func (c *ClientFactory) NewVirtualNetworkPeeringsClient() *VirtualNetworkPeeringsClient { subClient, _ := NewVirtualNetworkPeeringsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualNetworkTapsClient creates a new instance of VirtualNetworkTapsClient. func (c *ClientFactory) NewVirtualNetworkTapsClient() *VirtualNetworkTapsClient { subClient, _ := NewVirtualNetworkTapsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualNetworksClient creates a new instance of VirtualNetworksClient. func (c *ClientFactory) NewVirtualNetworksClient() *VirtualNetworksClient { subClient, _ := NewVirtualNetworksClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualRouterPeeringsClient creates a new instance of VirtualRouterPeeringsClient. func (c *ClientFactory) NewVirtualRouterPeeringsClient() *VirtualRouterPeeringsClient { subClient, _ := NewVirtualRouterPeeringsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualRoutersClient creates a new instance of VirtualRoutersClient. func (c *ClientFactory) NewVirtualRoutersClient() *VirtualRoutersClient { subClient, _ := NewVirtualRoutersClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewVirtualWansClient creates a new instance of VirtualWansClient. func (c *ClientFactory) NewVirtualWansClient() *VirtualWansClient { subClient, _ := NewVirtualWansClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewWatchersClient creates a new instance of WatchersClient. func (c *ClientFactory) NewWatchersClient() *WatchersClient { subClient, _ := NewWatchersClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewWebApplicationFirewallPoliciesClient creates a new instance of WebApplicationFirewallPoliciesClient. func (c *ClientFactory) NewWebApplicationFirewallPoliciesClient() *WebApplicationFirewallPoliciesClient { subClient, _ := NewWebApplicationFirewallPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewWebCategoriesClient creates a new instance of WebCategoriesClient. func (c *ClientFactory) NewWebCategoriesClient() *WebCategoriesClient { subClient, _ := NewWebCategoriesClient(c.subscriptionID, c.credential, c.options) return subClient diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/configurationpolicygroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/configurationpolicygroups_client.go index db780f348..feeea87c1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/configurationpolicygroups_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/configurationpolicygroups_client.go @@ -33,7 +33,7 @@ type ConfigurationPolicyGroupsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewConfigurationPolicyGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationPolicyGroupsClient, error) { - cl, err := arm.NewClient(moduleName+".ConfigurationPolicyGroupsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *ConfigurationPolicyGroupsClient) BeginCreateOrUpdate(ctx context.C } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigurationPolicyGroupsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ConfigurationPolicyGroupsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConfigurationPolicyGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *ConfigurationPolicyGroupsClient) BeginDelete(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigurationPolicyGroupsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ConfigurationPolicyGroupsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConfigurationPolicyGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -290,23 +296,16 @@ func (client *ConfigurationPolicyGroupsClient) NewListByVPNServerConfigurationPa }, Fetcher: func(ctx context.Context, page *ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse) (ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ConfigurationPolicyGroupsClient.NewListByVPNServerConfigurationPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByVPNServerConfigurationCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByVPNServerConfigurationCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, options) + }, nil) if err != nil { return ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse{}, runtime.NewResponseError(resp) - } return client.listByVPNServerConfigurationHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/connectionmonitors_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/connectionmonitors_client.go index 58a367cbe..905523443 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/connectionmonitors_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/connectionmonitors_client.go @@ -33,7 +33,7 @@ type ConnectionMonitorsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewConnectionMonitorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectionMonitorsClient, error) { - cl, err := arm.NewClient(moduleName+".ConnectionMonitorsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *ConnectionMonitorsClient) BeginCreateOrUpdate(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectionMonitorsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ConnectionMonitorsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConnectionMonitorsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -147,10 +150,13 @@ func (client *ConnectionMonitorsClient) BeginDelete(ctx context.Context, resourc } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectionMonitorsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ConnectionMonitorsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConnectionMonitorsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -361,10 +367,13 @@ func (client *ConnectionMonitorsClient) BeginQuery(ctx context.Context, resource } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectionMonitorsClientQueryResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ConnectionMonitorsClientQueryResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConnectionMonitorsClientQueryResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -440,10 +449,13 @@ func (client *ConnectionMonitorsClient) BeginStart(ctx context.Context, resource } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectionMonitorsClientStartResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ConnectionMonitorsClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConnectionMonitorsClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -519,10 +531,13 @@ func (client *ConnectionMonitorsClient) BeginStop(ctx context.Context, resourceG } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectionMonitorsClientStopResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ConnectionMonitorsClientStopResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConnectionMonitorsClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/connectivityconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/connectivityconfigurations_client.go index 6e9a3223e..0e0317c17 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/connectivityconfigurations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/connectivityconfigurations_client.go @@ -34,7 +34,7 @@ type ConnectivityConfigurationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewConnectivityConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectivityConfigurationsClient, error) { - cl, err := arm.NewClient(moduleName+".ConnectivityConfigurationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -137,10 +137,13 @@ func (client *ConnectivityConfigurationsClient) BeginDelete(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectivityConfigurationsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ConnectivityConfigurationsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConnectivityConfigurationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -288,23 +291,16 @@ func (client *ConnectivityConfigurationsClient) NewListPager(resourceGroupName s }, Fetcher: func(ctx context.Context, page *ConnectivityConfigurationsClientListResponse) (ConnectivityConfigurationsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ConnectivityConfigurationsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) + }, nil) if err != nil { return ConnectivityConfigurationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ConnectivityConfigurationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectivityConfigurationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/constants.go index ac405b5e4..6ec8bdb32 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/constants.go @@ -9,8 +9,8 @@ package armnetwork const ( - moduleName = "armnetwork" - moduleVersion = "v4.3.0-beta.1" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" + moduleVersion = "v4.3.0" ) // Access - Access to be allowed or denied. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/customipprefixes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/customipprefixes_client.go index 12e583a2e..52935bf86 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/customipprefixes_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/customipprefixes_client.go @@ -33,7 +33,7 @@ type CustomIPPrefixesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCustomIPPrefixesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomIPPrefixesClient, error) { - cl, err := arm.NewClient(moduleName+".CustomIPPrefixesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *CustomIPPrefixesClient) BeginCreateOrUpdate(ctx context.Context, r } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomIPPrefixesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CustomIPPrefixesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomIPPrefixesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *CustomIPPrefixesClient) BeginDelete(ctx context.Context, resourceG } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomIPPrefixesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[CustomIPPrefixesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomIPPrefixesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -276,23 +282,16 @@ func (client *CustomIPPrefixesClient) NewListPager(resourceGroupName string, opt }, Fetcher: func(ctx context.Context, page *CustomIPPrefixesClientListResponse) (CustomIPPrefixesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CustomIPPrefixesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CustomIPPrefixesClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return CustomIPPrefixesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CustomIPPrefixesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -342,23 +341,16 @@ func (client *CustomIPPrefixesClient) NewListAllPager(options *CustomIPPrefixesC }, Fetcher: func(ctx context.Context, page *CustomIPPrefixesClientListAllResponse) (CustomIPPrefixesClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CustomIPPrefixesClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return CustomIPPrefixesClientListAllResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CustomIPPrefixesClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CustomIPPrefixesClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/ddoscustompolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/ddoscustompolicies_client.go index 74997485d..97593c1f1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/ddoscustompolicies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/ddoscustompolicies_client.go @@ -33,7 +33,7 @@ type DdosCustomPoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDdosCustomPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DdosCustomPoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".DdosCustomPoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *DdosCustomPoliciesClient) BeginCreateOrUpdate(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DdosCustomPoliciesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DdosCustomPoliciesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DdosCustomPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *DdosCustomPoliciesClient) BeginDelete(ctx context.Context, resourc } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DdosCustomPoliciesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DdosCustomPoliciesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DdosCustomPoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/ddosprotectionplans_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/ddosprotectionplans_client.go index b50fe38a9..24e240859 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/ddosprotectionplans_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/ddosprotectionplans_client.go @@ -33,7 +33,7 @@ type DdosProtectionPlansClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDdosProtectionPlansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DdosProtectionPlansClient, error) { - cl, err := arm.NewClient(moduleName+".DdosProtectionPlansClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *DdosProtectionPlansClient) BeginCreateOrUpdate(ctx context.Context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DdosProtectionPlansClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DdosProtectionPlansClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DdosProtectionPlansClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *DdosProtectionPlansClient) BeginDelete(ctx context.Context, resour } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DdosProtectionPlansClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DdosProtectionPlansClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DdosProtectionPlansClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -272,23 +278,16 @@ func (client *DdosProtectionPlansClient) NewListPager(options *DdosProtectionPla }, Fetcher: func(ctx context.Context, page *DdosProtectionPlansClientListResponse) (DdosProtectionPlansClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DdosProtectionPlansClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DdosProtectionPlansClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return DdosProtectionPlansClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DdosProtectionPlansClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -335,23 +334,16 @@ func (client *DdosProtectionPlansClient) NewListByResourceGroupPager(resourceGro }, Fetcher: func(ctx context.Context, page *DdosProtectionPlansClientListByResourceGroupResponse) (DdosProtectionPlansClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DdosProtectionPlansClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return DdosProtectionPlansClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DdosProtectionPlansClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DdosProtectionPlansClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/defaultsecurityrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/defaultsecurityrules_client.go index d4d3eee41..3ebcfd56e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/defaultsecurityrules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/defaultsecurityrules_client.go @@ -33,7 +33,7 @@ type DefaultSecurityRulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDefaultSecurityRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DefaultSecurityRulesClient, error) { - cl, err := arm.NewClient(moduleName+".DefaultSecurityRulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -128,23 +128,16 @@ func (client *DefaultSecurityRulesClient) NewListPager(resourceGroupName string, }, Fetcher: func(ctx context.Context, page *DefaultSecurityRulesClientListResponse) (DefaultSecurityRulesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DefaultSecurityRulesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) + }, nil) if err != nil { return DefaultSecurityRulesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DefaultSecurityRulesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DefaultSecurityRulesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/dscpconfiguration_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/dscpconfiguration_client.go index d4b9708df..733734d3c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/dscpconfiguration_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/dscpconfiguration_client.go @@ -33,7 +33,7 @@ type DscpConfigurationClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDscpConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DscpConfigurationClient, error) { - cl, err := arm.NewClient(moduleName+".DscpConfigurationClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *DscpConfigurationClient) BeginCreateOrUpdate(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DscpConfigurationClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DscpConfigurationClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DscpConfigurationClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *DscpConfigurationClient) BeginDelete(ctx context.Context, resource } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DscpConfigurationClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DscpConfigurationClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DscpConfigurationClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -273,23 +279,16 @@ func (client *DscpConfigurationClient) NewListPager(resourceGroupName string, op }, Fetcher: func(ctx context.Context, page *DscpConfigurationClientListResponse) (DscpConfigurationClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DscpConfigurationClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DscpConfigurationClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return DscpConfigurationClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscpConfigurationClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -339,23 +338,16 @@ func (client *DscpConfigurationClient) NewListAllPager(options *DscpConfiguratio }, Fetcher: func(ctx context.Context, page *DscpConfigurationClientListAllResponse) (DscpConfigurationClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DscpConfigurationClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return DscpConfigurationClientListAllResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DscpConfigurationClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscpConfigurationClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecircuitauthorizations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecircuitauthorizations_client.go index d35c1e173..91d2d8c29 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecircuitauthorizations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecircuitauthorizations_client.go @@ -33,7 +33,7 @@ type ExpressRouteCircuitAuthorizationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitAuthorizationsClient, error) { - cl, err := arm.NewClient(moduleName+".ExpressRouteCircuitAuthorizationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *ExpressRouteCircuitAuthorizationsClient) BeginCreateOrUpdate(ctx c } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *ExpressRouteCircuitAuthorizationsClient) BeginDelete(ctx context.C } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitAuthorizationsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitAuthorizationsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitAuthorizationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -290,23 +296,16 @@ func (client *ExpressRouteCircuitAuthorizationsClient) NewListPager(resourceGrou }, Fetcher: func(ctx context.Context, page *ExpressRouteCircuitAuthorizationsClientListResponse) (ExpressRouteCircuitAuthorizationsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteCircuitAuthorizationsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, circuitName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRouteCircuitAuthorizationsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, circuitName, options) + }, nil) if err != nil { return ExpressRouteCircuitAuthorizationsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCircuitAuthorizationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecircuitconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecircuitconnections_client.go index f322ea4e9..e07aaa0b0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecircuitconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecircuitconnections_client.go @@ -33,7 +33,7 @@ type ExpressRouteCircuitConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExpressRouteCircuitConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".ExpressRouteCircuitConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -64,10 +64,13 @@ func (client *ExpressRouteCircuitConnectionsClient) BeginCreateOrUpdate(ctx cont } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -151,10 +154,13 @@ func (client *ExpressRouteCircuitConnectionsClient) BeginDelete(ctx context.Cont } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitConnectionsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -307,23 +313,16 @@ func (client *ExpressRouteCircuitConnectionsClient) NewListPager(resourceGroupNa }, Fetcher: func(ctx context.Context, page *ExpressRouteCircuitConnectionsClientListResponse) (ExpressRouteCircuitConnectionsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteCircuitConnectionsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRouteCircuitConnectionsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) + }, nil) if err != nil { return ExpressRouteCircuitConnectionsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCircuitConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecircuitpeerings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecircuitpeerings_client.go index 0ead66c03..4d849efaf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecircuitpeerings_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecircuitpeerings_client.go @@ -33,7 +33,7 @@ type ExpressRouteCircuitPeeringsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExpressRouteCircuitPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitPeeringsClient, error) { - cl, err := arm.NewClient(moduleName+".ExpressRouteCircuitPeeringsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *ExpressRouteCircuitPeeringsClient) BeginCreateOrUpdate(ctx context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *ExpressRouteCircuitPeeringsClient) BeginDelete(ctx context.Context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitPeeringsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitPeeringsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitPeeringsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -290,23 +296,16 @@ func (client *ExpressRouteCircuitPeeringsClient) NewListPager(resourceGroupName }, Fetcher: func(ctx context.Context, page *ExpressRouteCircuitPeeringsClientListResponse) (ExpressRouteCircuitPeeringsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteCircuitPeeringsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, circuitName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRouteCircuitPeeringsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, circuitName, options) + }, nil) if err != nil { return ExpressRouteCircuitPeeringsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCircuitPeeringsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecircuits_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecircuits_client.go index 8fa080279..e106f07bc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecircuits_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecircuits_client.go @@ -33,7 +33,7 @@ type ExpressRouteCircuitsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExpressRouteCircuitsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitsClient, error) { - cl, err := arm.NewClient(moduleName+".ExpressRouteCircuitsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *ExpressRouteCircuitsClient) BeginCreateOrUpdate(ctx context.Contex } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *ExpressRouteCircuitsClient) BeginDelete(ctx context.Context, resou } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -409,23 +415,16 @@ func (client *ExpressRouteCircuitsClient) NewListPager(resourceGroupName string, }, Fetcher: func(ctx context.Context, page *ExpressRouteCircuitsClientListResponse) (ExpressRouteCircuitsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteCircuitsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return ExpressRouteCircuitsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ExpressRouteCircuitsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCircuitsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -475,23 +474,16 @@ func (client *ExpressRouteCircuitsClient) NewListAllPager(options *ExpressRouteC }, Fetcher: func(ctx context.Context, page *ExpressRouteCircuitsClientListAllResponse) (ExpressRouteCircuitsClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteCircuitsClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return ExpressRouteCircuitsClientListAllResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ExpressRouteCircuitsClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCircuitsClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -543,10 +535,13 @@ func (client *ExpressRouteCircuitsClient) BeginListArpTable(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitsClientListArpTableResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitsClientListArpTableResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitsClientListArpTableResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -628,10 +623,13 @@ func (client *ExpressRouteCircuitsClient) BeginListRoutesTable(ctx context.Conte } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitsClientListRoutesTableResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitsClientListRoutesTableResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitsClientListRoutesTableResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -713,10 +711,13 @@ func (client *ExpressRouteCircuitsClient) BeginListRoutesTableSummary(ctx contex } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitsClientListRoutesTableSummaryResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitsClientListRoutesTableSummaryResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitsClientListRoutesTableSummaryResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteconnections_client.go index 76b8283db..40d454090 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteconnections_client.go @@ -33,7 +33,7 @@ type ExpressRouteConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExpressRouteConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".ExpressRouteConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *ExpressRouteConnectionsClient) BeginCreateOrUpdate(ctx context.Con } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteConnectionsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *ExpressRouteConnectionsClient) BeginDelete(ctx context.Context, re } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteConnectionsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecrossconnectionpeerings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecrossconnectionpeerings_client.go index e3b53ba2c..b3eb6901b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecrossconnectionpeerings_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecrossconnectionpeerings_client.go @@ -33,7 +33,7 @@ type ExpressRouteCrossConnectionPeeringsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCrossConnectionPeeringsClient, error) { - cl, err := arm.NewClient(moduleName+".ExpressRouteCrossConnectionPeeringsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *ExpressRouteCrossConnectionPeeringsClient) BeginCreateOrUpdate(ctx } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *ExpressRouteCrossConnectionPeeringsClient) BeginDelete(ctx context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCrossConnectionPeeringsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCrossConnectionPeeringsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCrossConnectionPeeringsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -290,23 +296,16 @@ func (client *ExpressRouteCrossConnectionPeeringsClient) NewListPager(resourceGr }, Fetcher: func(ctx context.Context, page *ExpressRouteCrossConnectionPeeringsClientListResponse) (ExpressRouteCrossConnectionPeeringsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteCrossConnectionPeeringsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, crossConnectionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRouteCrossConnectionPeeringsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, crossConnectionName, options) + }, nil) if err != nil { return ExpressRouteCrossConnectionPeeringsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCrossConnectionPeeringsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecrossconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecrossconnections_client.go index 8a3a8c21a..0419a5555 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecrossconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutecrossconnections_client.go @@ -33,7 +33,7 @@ type ExpressRouteCrossConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExpressRouteCrossConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCrossConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".ExpressRouteCrossConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *ExpressRouteCrossConnectionsClient) BeginCreateOrUpdate(ctx contex } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCrossConnectionsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCrossConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCrossConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -199,23 +202,16 @@ func (client *ExpressRouteCrossConnectionsClient) NewListPager(options *ExpressR }, Fetcher: func(ctx context.Context, page *ExpressRouteCrossConnectionsClientListResponse) (ExpressRouteCrossConnectionsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteCrossConnectionsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRouteCrossConnectionsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return ExpressRouteCrossConnectionsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCrossConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -268,10 +264,13 @@ func (client *ExpressRouteCrossConnectionsClient) BeginListArpTable(ctx context. } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCrossConnectionsClientListArpTableResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCrossConnectionsClientListArpTableResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCrossConnectionsClientListArpTableResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -348,23 +347,16 @@ func (client *ExpressRouteCrossConnectionsClient) NewListByResourceGroupPager(re }, Fetcher: func(ctx context.Context, page *ExpressRouteCrossConnectionsClientListByResourceGroupResponse) (ExpressRouteCrossConnectionsClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteCrossConnectionsClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return ExpressRouteCrossConnectionsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ExpressRouteCrossConnectionsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCrossConnectionsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -421,10 +413,13 @@ func (client *ExpressRouteCrossConnectionsClient) BeginListRoutesTable(ctx conte } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCrossConnectionsClientListRoutesTableResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCrossConnectionsClientListRoutesTableResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCrossConnectionsClientListRoutesTableResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -507,10 +502,13 @@ func (client *ExpressRouteCrossConnectionsClient) BeginListRoutesTableSummary(ct } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutegateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutegateways_client.go index f0b026399..e2b0b5e7a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutegateways_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutegateways_client.go @@ -33,7 +33,7 @@ type ExpressRouteGatewaysClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExpressRouteGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteGatewaysClient, error) { - cl, err := arm.NewClient(moduleName+".ExpressRouteGatewaysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *ExpressRouteGatewaysClient) BeginCreateOrUpdate(ctx context.Contex } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteGatewaysClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteGatewaysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -139,10 +142,13 @@ func (client *ExpressRouteGatewaysClient) BeginDelete(ctx context.Context, resou } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteGatewaysClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteGatewaysClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteGatewaysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -395,10 +401,13 @@ func (client *ExpressRouteGatewaysClient) BeginUpdateTags(ctx context.Context, r } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteGatewaysClientUpdateTagsResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRouteGatewaysClientUpdateTagsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteGatewaysClientUpdateTagsResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutelinks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutelinks_client.go index 0c15bc802..99ea0d4b6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutelinks_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressroutelinks_client.go @@ -33,7 +33,7 @@ type ExpressRouteLinksClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExpressRouteLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteLinksClient, error) { - cl, err := arm.NewClient(moduleName+".ExpressRouteLinksClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -127,23 +127,16 @@ func (client *ExpressRouteLinksClient) NewListPager(resourceGroupName string, ex }, Fetcher: func(ctx context.Context, page *ExpressRouteLinksClientListResponse) (ExpressRouteLinksClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteLinksClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, expressRoutePortName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, expressRoutePortName, options) + }, nil) if err != nil { return ExpressRouteLinksClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ExpressRouteLinksClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteLinksClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteportauthorizations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteportauthorizations_client.go index 30c3bff05..ec6e1737b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteportauthorizations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteportauthorizations_client.go @@ -33,7 +33,7 @@ type ExpressRoutePortAuthorizationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExpressRoutePortAuthorizationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRoutePortAuthorizationsClient, error) { - cl, err := arm.NewClient(moduleName+".ExpressRoutePortAuthorizationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *ExpressRoutePortAuthorizationsClient) BeginCreateOrUpdate(ctx cont } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *ExpressRoutePortAuthorizationsClient) BeginDelete(ctx context.Cont } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRoutePortAuthorizationsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRoutePortAuthorizationsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRoutePortAuthorizationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -290,23 +296,16 @@ func (client *ExpressRoutePortAuthorizationsClient) NewListPager(resourceGroupNa }, Fetcher: func(ctx context.Context, page *ExpressRoutePortAuthorizationsClientListResponse) (ExpressRoutePortAuthorizationsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRoutePortAuthorizationsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, expressRoutePortName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRoutePortAuthorizationsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, expressRoutePortName, options) + }, nil) if err != nil { return ExpressRoutePortAuthorizationsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRoutePortAuthorizationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteports_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteports_client.go index 3bfe45204..4811abea7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteports_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteports_client.go @@ -33,7 +33,7 @@ type ExpressRoutePortsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExpressRoutePortsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRoutePortsClient, error) { - cl, err := arm.NewClient(moduleName+".ExpressRoutePortsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *ExpressRoutePortsClient) BeginCreateOrUpdate(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRoutePortsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRoutePortsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRoutePortsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *ExpressRoutePortsClient) BeginDelete(ctx context.Context, resource } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRoutePortsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ExpressRoutePortsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRoutePortsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -341,23 +347,16 @@ func (client *ExpressRoutePortsClient) NewListPager(options *ExpressRoutePortsCl }, Fetcher: func(ctx context.Context, page *ExpressRoutePortsClientListResponse) (ExpressRoutePortsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRoutePortsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRoutePortsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return ExpressRoutePortsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRoutePortsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -404,23 +403,16 @@ func (client *ExpressRoutePortsClient) NewListByResourceGroupPager(resourceGroup }, Fetcher: func(ctx context.Context, page *ExpressRoutePortsClientListByResourceGroupResponse) (ExpressRoutePortsClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRoutePortsClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return ExpressRoutePortsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ExpressRoutePortsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRoutePortsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteportslocations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteportslocations_client.go index 0f1988241..60221bb4a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteportslocations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteportslocations_client.go @@ -33,7 +33,7 @@ type ExpressRoutePortsLocationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExpressRoutePortsLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRoutePortsLocationsClient, error) { - cl, err := arm.NewClient(moduleName+".ExpressRoutePortsLocationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -118,23 +118,16 @@ func (client *ExpressRoutePortsLocationsClient) NewListPager(options *ExpressRou }, Fetcher: func(ctx context.Context, page *ExpressRoutePortsLocationsClientListResponse) (ExpressRoutePortsLocationsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRoutePortsLocationsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return ExpressRoutePortsLocationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ExpressRoutePortsLocationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRoutePortsLocationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteproviderportslocation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteproviderportslocation_client.go index c1e3a6d2d..b3b55c5fa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteproviderportslocation_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteproviderportslocation_client.go @@ -33,7 +33,7 @@ type ExpressRouteProviderPortsLocationClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExpressRouteProviderPortsLocationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteProviderPortsLocationClient, error) { - cl, err := arm.NewClient(moduleName+".ExpressRouteProviderPortsLocationClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteserviceproviders_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteserviceproviders_client.go index 3c5b5703e..5efbab718 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteserviceproviders_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/expressrouteserviceproviders_client.go @@ -33,7 +33,7 @@ type ExpressRouteServiceProvidersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewExpressRouteServiceProvidersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteServiceProvidersClient, error) { - cl, err := arm.NewClient(moduleName+".ExpressRouteServiceProvidersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,23 +56,16 @@ func (client *ExpressRouteServiceProvidersClient) NewListPager(options *ExpressR }, Fetcher: func(ctx context.Context, page *ExpressRouteServiceProvidersClientListResponse) (ExpressRouteServiceProvidersClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteServiceProvidersClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return ExpressRouteServiceProvidersClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ExpressRouteServiceProvidersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteServiceProvidersClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/adminrulecollections_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/adminrulecollections_server.go index 39f275d67..b7d591e29 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/adminrulecollections_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/adminrulecollections_server.go @@ -96,7 +96,7 @@ func (a *AdminRuleCollectionsServerTransport) dispatchCreateOrUpdate(req *http.R if a.srv.CreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdate not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { @@ -106,23 +106,23 @@ func (a *AdminRuleCollectionsServerTransport) dispatchCreateOrUpdate(req *http.R if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - configurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) + configurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) if err != nil { return nil, err } - ruleCollectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionName")]) + ruleCollectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.CreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, configurationNameUnescaped, ruleCollectionNameUnescaped, body, nil) + respr, errRespr := a.srv.CreateOrUpdate(req.Context(), resourceGroupNameParam, networkManagerNameParam, configurationNameParam, ruleCollectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -143,26 +143,26 @@ func (a *AdminRuleCollectionsServerTransport) dispatchBeginDelete(req *http.Requ } beginDelete := a.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - configurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) + configurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) if err != nil { return nil, err } - ruleCollectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionName")]) + ruleCollectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionName")]) if err != nil { return nil, err } @@ -180,7 +180,7 @@ func (a *AdminRuleCollectionsServerTransport) dispatchBeginDelete(req *http.Requ Force: forceParam, } } - respr, errRespr := a.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, configurationNameUnescaped, ruleCollectionNameUnescaped, options) + respr, errRespr := a.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkManagerNameParam, configurationNameParam, ruleCollectionNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -208,29 +208,29 @@ func (a *AdminRuleCollectionsServerTransport) dispatchGet(req *http.Request) (*h if a.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - configurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) + configurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) if err != nil { return nil, err } - ruleCollectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionName")]) + ruleCollectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.Get(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, configurationNameUnescaped, ruleCollectionNameUnescaped, nil) + respr, errRespr := a.srv.Get(req.Context(), resourceGroupNameParam, networkManagerNameParam, configurationNameParam, ruleCollectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -251,22 +251,22 @@ func (a *AdminRuleCollectionsServerTransport) dispatchNewListPager(req *http.Req } newListPager := a.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - configurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) + configurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) if err != nil { return nil, err } @@ -296,7 +296,7 @@ func (a *AdminRuleCollectionsServerTransport) dispatchNewListPager(req *http.Req SkipToken: skipTokenParam, } } - resp := a.srv.NewListPager(resourceGroupNameUnescaped, networkManagerNameUnescaped, configurationNameUnescaped, options) + resp := a.srv.NewListPager(resourceGroupNameParam, networkManagerNameParam, configurationNameParam, options) newListPager = &resp a.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.AdminRuleCollectionsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/adminrules_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/adminrules_server.go index 0ba862ba0..8863aa27b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/adminrules_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/adminrules_server.go @@ -96,7 +96,7 @@ func (a *AdminRulesServerTransport) dispatchCreateOrUpdate(req *http.Request) (* if a.srv.CreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdate not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/rules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/rules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 6 { @@ -110,27 +110,27 @@ func (a *AdminRulesServerTransport) dispatchCreateOrUpdate(req *http.Request) (* if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - configurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) + configurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) if err != nil { return nil, err } - ruleCollectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionName")]) + ruleCollectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionName")]) if err != nil { return nil, err } - ruleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ruleName")]) + ruleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ruleName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.CreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, configurationNameUnescaped, ruleCollectionNameUnescaped, ruleNameUnescaped, body, nil) + respr, errRespr := a.srv.CreateOrUpdate(req.Context(), resourceGroupNameParam, networkManagerNameParam, configurationNameParam, ruleCollectionNameParam, ruleNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,30 +151,30 @@ func (a *AdminRulesServerTransport) dispatchBeginDelete(req *http.Request) (*htt } beginDelete := a.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/rules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/rules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 6 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - configurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) + configurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) if err != nil { return nil, err } - ruleCollectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionName")]) + ruleCollectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionName")]) if err != nil { return nil, err } - ruleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ruleName")]) + ruleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ruleName")]) if err != nil { return nil, err } @@ -192,7 +192,7 @@ func (a *AdminRulesServerTransport) dispatchBeginDelete(req *http.Request) (*htt Force: forceParam, } } - respr, errRespr := a.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, configurationNameUnescaped, ruleCollectionNameUnescaped, ruleNameUnescaped, options) + respr, errRespr := a.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkManagerNameParam, configurationNameParam, ruleCollectionNameParam, ruleNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -220,33 +220,33 @@ func (a *AdminRulesServerTransport) dispatchGet(req *http.Request) (*http.Respon if a.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/rules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/rules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 6 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - configurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) + configurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) if err != nil { return nil, err } - ruleCollectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionName")]) + ruleCollectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionName")]) if err != nil { return nil, err } - ruleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ruleName")]) + ruleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ruleName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.Get(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, configurationNameUnescaped, ruleCollectionNameUnescaped, ruleNameUnescaped, nil) + respr, errRespr := a.srv.Get(req.Context(), resourceGroupNameParam, networkManagerNameParam, configurationNameParam, ruleCollectionNameParam, ruleNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -267,26 +267,26 @@ func (a *AdminRulesServerTransport) dispatchNewListPager(req *http.Request) (*ht } newListPager := a.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/rules` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/rules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - configurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) + configurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) if err != nil { return nil, err } - ruleCollectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionName")]) + ruleCollectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionName")]) if err != nil { return nil, err } @@ -316,7 +316,7 @@ func (a *AdminRulesServerTransport) dispatchNewListPager(req *http.Request) (*ht SkipToken: skipTokenParam, } } - resp := a.srv.NewListPager(resourceGroupNameUnescaped, networkManagerNameUnescaped, configurationNameUnescaped, ruleCollectionNameUnescaped, options) + resp := a.srv.NewListPager(resourceGroupNameParam, networkManagerNameParam, configurationNameParam, ruleCollectionNameParam, options) newListPager = &resp a.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.AdminRulesClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgatewayprivateendpointconnections_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgatewayprivateendpointconnections_server.go index 4315de674..fd4f06f67 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgatewayprivateendpointconnections_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgatewayprivateendpointconnections_server.go @@ -99,25 +99,25 @@ func (a *ApplicationGatewayPrivateEndpointConnectionsServerTransport) dispatchBe } beginDelete := a.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - applicationGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) + applicationGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, applicationGatewayNameUnescaped, connectionNameUnescaped, nil) + respr, errRespr := a.srv.BeginDelete(req.Context(), resourceGroupNameParam, applicationGatewayNameParam, connectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -145,25 +145,25 @@ func (a *ApplicationGatewayPrivateEndpointConnectionsServerTransport) dispatchGe if a.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - applicationGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) + applicationGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.Get(req.Context(), resourceGroupNameUnescaped, applicationGatewayNameUnescaped, connectionNameUnescaped, nil) + respr, errRespr := a.srv.Get(req.Context(), resourceGroupNameParam, applicationGatewayNameParam, connectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -184,21 +184,21 @@ func (a *ApplicationGatewayPrivateEndpointConnectionsServerTransport) dispatchNe } newListPager := a.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - applicationGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) + applicationGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) if err != nil { return nil, err } - resp := a.srv.NewListPager(resourceGroupNameUnescaped, applicationGatewayNameUnescaped, nil) + resp := a.srv.NewListPager(resourceGroupNameParam, applicationGatewayNameParam, nil) newListPager = &resp a.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ApplicationGatewayPrivateEndpointConnectionsClientListResponse, createLink func() string) { @@ -225,7 +225,7 @@ func (a *ApplicationGatewayPrivateEndpointConnectionsServerTransport) dispatchBe } beginUpdate := a.beginUpdate.get(req) if beginUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -235,19 +235,19 @@ func (a *ApplicationGatewayPrivateEndpointConnectionsServerTransport) dispatchBe if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - applicationGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) + applicationGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.BeginUpdate(req.Context(), resourceGroupNameUnescaped, applicationGatewayNameUnescaped, connectionNameUnescaped, body, nil) + respr, errRespr := a.srv.BeginUpdate(req.Context(), resourceGroupNameParam, applicationGatewayNameParam, connectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgatewayprivatelinkresources_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgatewayprivatelinkresources_server.go index 41a5cde0c..d4f6e5785 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgatewayprivatelinkresources_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgatewayprivatelinkresources_server.go @@ -76,21 +76,21 @@ func (a *ApplicationGatewayPrivateLinkResourcesServerTransport) dispatchNewListP } newListPager := a.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateLinkResources` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateLinkResources` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - applicationGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) + applicationGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) if err != nil { return nil, err } - resp := a.srv.NewListPager(resourceGroupNameUnescaped, applicationGatewayNameUnescaped, nil) + resp := a.srv.NewListPager(resourceGroupNameParam, applicationGatewayNameParam, nil) newListPager = &resp a.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ApplicationGatewayPrivateLinkResourcesClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgateways_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgateways_server.go index 76d22da10..ae13cb761 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgateways_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgateways_server.go @@ -189,18 +189,18 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginBackendHealth(req *htt } beginBackendHealth := a.beginBackendHealth.get(req) if beginBackendHealth == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backendhealth` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backendhealth` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - applicationGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) + applicationGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) if err != nil { return nil, err } @@ -215,7 +215,7 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginBackendHealth(req *htt Expand: expandParam, } } - respr, errRespr := a.srv.BeginBackendHealth(req.Context(), resourceGroupNameUnescaped, applicationGatewayNameUnescaped, options) + respr, errRespr := a.srv.BeginBackendHealth(req.Context(), resourceGroupNameParam, applicationGatewayNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -245,7 +245,7 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginBackendHealthOnDemand( } beginBackendHealthOnDemand := a.beginBackendHealthOnDemand.get(req) if beginBackendHealthOnDemand == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getBackendHealthOnDemand` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getBackendHealthOnDemand` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -256,11 +256,11 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginBackendHealthOnDemand( if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - applicationGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) + applicationGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) if err != nil { return nil, err } @@ -275,7 +275,7 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginBackendHealthOnDemand( Expand: expandParam, } } - respr, errRespr := a.srv.BeginBackendHealthOnDemand(req.Context(), resourceGroupNameUnescaped, applicationGatewayNameUnescaped, body, options) + respr, errRespr := a.srv.BeginBackendHealthOnDemand(req.Context(), resourceGroupNameParam, applicationGatewayNameParam, body, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -305,7 +305,7 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *ht } beginCreateOrUpdate := a.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -315,15 +315,15 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *ht if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - applicationGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) + applicationGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, applicationGatewayNameUnescaped, body, nil) + respr, errRespr := a.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, applicationGatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -353,21 +353,21 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginDelete(req *http.Reque } beginDelete := a.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - applicationGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) + applicationGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, applicationGatewayNameUnescaped, nil) + respr, errRespr := a.srv.BeginDelete(req.Context(), resourceGroupNameParam, applicationGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -395,21 +395,21 @@ func (a *ApplicationGatewaysServerTransport) dispatchGet(req *http.Request) (*ht if a.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - applicationGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) + applicationGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.Get(req.Context(), resourceGroupNameUnescaped, applicationGatewayNameUnescaped, nil) + respr, errRespr := a.srv.Get(req.Context(), resourceGroupNameParam, applicationGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -428,17 +428,17 @@ func (a *ApplicationGatewaysServerTransport) dispatchGetSSLPredefinedPolicy(req if a.srv.GetSSLPredefinedPolicy == nil { return nil, &nonRetriableError{errors.New("fake for method GetSSLPredefinedPolicy not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - predefinedPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("predefinedPolicyName")]) + predefinedPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("predefinedPolicyName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.GetSSLPredefinedPolicy(req.Context(), predefinedPolicyNameUnescaped, nil) + respr, errRespr := a.srv.GetSSLPredefinedPolicy(req.Context(), predefinedPolicyNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -459,17 +459,17 @@ func (a *ApplicationGatewaysServerTransport) dispatchNewListPager(req *http.Requ } newListPager := a.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := a.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := a.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp a.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ApplicationGatewaysClientListResponse, createLink func() string) { @@ -496,7 +496,7 @@ func (a *ApplicationGatewaysServerTransport) dispatchNewListAllPager(req *http.R } newListAllPager := a.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -527,7 +527,7 @@ func (a *ApplicationGatewaysServerTransport) dispatchListAvailableRequestHeaders if a.srv.ListAvailableRequestHeaders == nil { return nil, &nonRetriableError{errors.New("fake for method ListAvailableRequestHeaders not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGatewayAvailableRequestHeaders` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -552,7 +552,7 @@ func (a *ApplicationGatewaysServerTransport) dispatchListAvailableResponseHeader if a.srv.ListAvailableResponseHeaders == nil { return nil, &nonRetriableError{errors.New("fake for method ListAvailableResponseHeaders not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGatewayAvailableResponseHeaders` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -577,7 +577,7 @@ func (a *ApplicationGatewaysServerTransport) dispatchListAvailableSSLOptions(req if a.srv.ListAvailableSSLOptions == nil { return nil, &nonRetriableError{errors.New("fake for method ListAvailableSSLOptions not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGatewayAvailableSslOptions/default` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -604,7 +604,7 @@ func (a *ApplicationGatewaysServerTransport) dispatchNewListAvailableSSLPredefin } newListAvailableSSLPredefinedPoliciesPager := a.newListAvailableSSLPredefinedPoliciesPager.get(req) if newListAvailableSSLPredefinedPoliciesPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -635,7 +635,7 @@ func (a *ApplicationGatewaysServerTransport) dispatchListAvailableServerVariable if a.srv.ListAvailableServerVariables == nil { return nil, &nonRetriableError{errors.New("fake for method ListAvailableServerVariables not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGatewayAvailableServerVariables` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGatewayAvailableServerVariables` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -660,7 +660,7 @@ func (a *ApplicationGatewaysServerTransport) dispatchListAvailableWafRuleSets(re if a.srv.ListAvailableWafRuleSets == nil { return nil, &nonRetriableError{errors.New("fake for method ListAvailableWafRuleSets not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGatewayAvailableWafRuleSets` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -687,21 +687,21 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginStart(req *http.Reques } beginStart := a.beginStart.get(req) if beginStart == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/start` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/start` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - applicationGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) + applicationGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.BeginStart(req.Context(), resourceGroupNameUnescaped, applicationGatewayNameUnescaped, nil) + respr, errRespr := a.srv.BeginStart(req.Context(), resourceGroupNameParam, applicationGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -731,21 +731,21 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginStop(req *http.Request } beginStop := a.beginStop.get(req) if beginStop == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stop` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stop` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - applicationGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) + applicationGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.BeginStop(req.Context(), resourceGroupNameUnescaped, applicationGatewayNameUnescaped, nil) + respr, errRespr := a.srv.BeginStop(req.Context(), resourceGroupNameParam, applicationGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -773,7 +773,7 @@ func (a *ApplicationGatewaysServerTransport) dispatchUpdateTags(req *http.Reques if a.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -783,15 +783,15 @@ func (a *ApplicationGatewaysServerTransport) dispatchUpdateTags(req *http.Reques if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - applicationGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) + applicationGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("applicationGatewayName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, applicationGatewayNameUnescaped, body, nil) + respr, errRespr := a.srv.UpdateTags(req.Context(), resourceGroupNameParam, applicationGatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgatewaywafdynamicmanifests_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgatewaywafdynamicmanifests_server.go index b460ef344..9f8a136fb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgatewaywafdynamicmanifests_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgatewaywafdynamicmanifests_server.go @@ -76,17 +76,17 @@ func (a *ApplicationGatewayWafDynamicManifestsServerTransport) dispatchNewGetPag } newGetPager := a.newGetPager.get(req) if newGetPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/applicationGatewayWafDynamicManifests` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/applicationGatewayWafDynamicManifests` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } - resp := a.srv.NewGetPager(locationUnescaped, nil) + resp := a.srv.NewGetPager(locationParam, nil) newGetPager = &resp a.newGetPager.add(req, newGetPager) server.PagerResponderInjectNextLinks(newGetPager, req, func(page *armnetwork.ApplicationGatewayWafDynamicManifestsClientGetResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgatewaywafdynamicmanifestsdefault_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgatewaywafdynamicmanifestsdefault_server.go index 7e2b14f01..e9179b72c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgatewaywafdynamicmanifestsdefault_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationgatewaywafdynamicmanifestsdefault_server.go @@ -70,17 +70,17 @@ func (a *ApplicationGatewayWafDynamicManifestsDefaultServerTransport) dispatchGe if a.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/applicationGatewayWafDynamicManifests/dafault` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/applicationGatewayWafDynamicManifests/dafault` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } - respr, errRespr := a.srv.Get(req.Context(), locationUnescaped, nil) + respr, errRespr := a.srv.Get(req.Context(), locationParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationsecuritygroups_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationsecuritygroups_server.go index 178b58c42..6e19cf53e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationsecuritygroups_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/applicationsecuritygroups_server.go @@ -113,7 +113,7 @@ func (a *ApplicationSecurityGroupsServerTransport) dispatchBeginCreateOrUpdate(r } beginCreateOrUpdate := a.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (a *ApplicationSecurityGroupsServerTransport) dispatchBeginCreateOrUpdate(r if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - applicationSecurityGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("applicationSecurityGroupName")]) + applicationSecurityGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("applicationSecurityGroupName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, applicationSecurityGroupNameUnescaped, body, nil) + respr, errRespr := a.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, applicationSecurityGroupNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (a *ApplicationSecurityGroupsServerTransport) dispatchBeginDelete(req *http } beginDelete := a.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - applicationSecurityGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("applicationSecurityGroupName")]) + applicationSecurityGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("applicationSecurityGroupName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, applicationSecurityGroupNameUnescaped, nil) + respr, errRespr := a.srv.BeginDelete(req.Context(), resourceGroupNameParam, applicationSecurityGroupNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,21 +203,21 @@ func (a *ApplicationSecurityGroupsServerTransport) dispatchGet(req *http.Request if a.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - applicationSecurityGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("applicationSecurityGroupName")]) + applicationSecurityGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("applicationSecurityGroupName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.Get(req.Context(), resourceGroupNameUnescaped, applicationSecurityGroupNameUnescaped, nil) + respr, errRespr := a.srv.Get(req.Context(), resourceGroupNameParam, applicationSecurityGroupNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -238,17 +238,17 @@ func (a *ApplicationSecurityGroupsServerTransport) dispatchNewListPager(req *htt } newListPager := a.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationSecurityGroups` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationSecurityGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := a.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := a.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp a.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ApplicationSecurityGroupsClientListResponse, createLink func() string) { @@ -275,7 +275,7 @@ func (a *ApplicationSecurityGroupsServerTransport) dispatchNewListAllPager(req * } newListAllPager := a.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationSecurityGroups` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationSecurityGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -306,7 +306,7 @@ func (a *ApplicationSecurityGroupsServerTransport) dispatchUpdateTags(req *http. if a.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/applicationSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -316,15 +316,15 @@ func (a *ApplicationSecurityGroupsServerTransport) dispatchUpdateTags(req *http. if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - applicationSecurityGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("applicationSecurityGroupName")]) + applicationSecurityGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("applicationSecurityGroupName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, applicationSecurityGroupNameUnescaped, body, nil) + respr, errRespr := a.srv.UpdateTags(req.Context(), resourceGroupNameParam, applicationSecurityGroupNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availabledelegations_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availabledelegations_server.go index 189b422a0..e53602109 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availabledelegations_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availabledelegations_server.go @@ -76,17 +76,17 @@ func (a *AvailableDelegationsServerTransport) dispatchNewListPager(req *http.Req } newListPager := a.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availableDelegations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availableDelegations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } - resp := a.srv.NewListPager(locationUnescaped, nil) + resp := a.srv.NewListPager(locationParam, nil) newListPager = &resp a.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.AvailableDelegationsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availableendpointservices_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availableendpointservices_server.go index f1bc863a1..e364d5e59 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availableendpointservices_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availableendpointservices_server.go @@ -76,17 +76,17 @@ func (a *AvailableEndpointServicesServerTransport) dispatchNewListPager(req *htt } newListPager := a.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkAvailableEndpointServices` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkAvailableEndpointServices` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } - resp := a.srv.NewListPager(locationUnescaped, nil) + resp := a.srv.NewListPager(locationParam, nil) newListPager = &resp a.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.AvailableEndpointServicesClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availableprivateendpointtypes_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availableprivateendpointtypes_server.go index c7bf26c92..51612ed50 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availableprivateendpointtypes_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availableprivateendpointtypes_server.go @@ -84,17 +84,17 @@ func (a *AvailablePrivateEndpointTypesServerTransport) dispatchNewListPager(req } newListPager := a.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availablePrivateEndpointTypes` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availablePrivateEndpointTypes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } - resp := a.srv.NewListPager(locationUnescaped, nil) + resp := a.srv.NewListPager(locationParam, nil) newListPager = &resp a.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.AvailablePrivateEndpointTypesClientListResponse, createLink func() string) { @@ -121,21 +121,21 @@ func (a *AvailablePrivateEndpointTypesServerTransport) dispatchNewListByResource } newListByResourceGroupPager := a.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availablePrivateEndpointTypes` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availablePrivateEndpointTypes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := a.srv.NewListByResourceGroupPager(locationUnescaped, resourceGroupNameUnescaped, nil) + resp := a.srv.NewListByResourceGroupPager(locationParam, resourceGroupNameParam, nil) newListByResourceGroupPager = &resp a.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.AvailablePrivateEndpointTypesClientListByResourceGroupResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availableresourcegroupdelegations_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availableresourcegroupdelegations_server.go index 71f95d268..01389052d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availableresourcegroupdelegations_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availableresourcegroupdelegations_server.go @@ -76,21 +76,21 @@ func (a *AvailableResourceGroupDelegationsServerTransport) dispatchNewListPager( } newListPager := a.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availableDelegations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availableDelegations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := a.srv.NewListPager(locationUnescaped, resourceGroupNameUnescaped, nil) + resp := a.srv.NewListPager(locationParam, resourceGroupNameParam, nil) newListPager = &resp a.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.AvailableResourceGroupDelegationsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availableservicealiases_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availableservicealiases_server.go index c5cebeb4d..dd55194e6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availableservicealiases_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/availableservicealiases_server.go @@ -84,17 +84,17 @@ func (a *AvailableServiceAliasesServerTransport) dispatchNewListPager(req *http. } newListPager := a.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availableServiceAliases` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availableServiceAliases` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } - resp := a.srv.NewListPager(locationUnescaped, nil) + resp := a.srv.NewListPager(locationParam, nil) newListPager = &resp a.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.AvailableServiceAliasesClientListResponse, createLink func() string) { @@ -121,21 +121,21 @@ func (a *AvailableServiceAliasesServerTransport) dispatchNewListByResourceGroupP } newListByResourceGroupPager := a.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availableServiceAliases` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availableServiceAliases` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } - resp := a.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, locationUnescaped, nil) + resp := a.srv.NewListByResourceGroupPager(resourceGroupNameParam, locationParam, nil) newListByResourceGroupPager = &resp a.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.AvailableServiceAliasesClientListByResourceGroupResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/azurefirewallfqdntags_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/azurefirewallfqdntags_server.go index 4368f3418..25c3c6d75 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/azurefirewallfqdntags_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/azurefirewallfqdntags_server.go @@ -75,7 +75,7 @@ func (a *AzureFirewallFqdnTagsServerTransport) dispatchNewListAllPager(req *http } newListAllPager := a.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureFirewallFqdnTags` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/azureFirewallFqdnTags` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/azurefirewalls_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/azurefirewalls_server.go index b7e306fd8..31583dc03 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/azurefirewalls_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/azurefirewalls_server.go @@ -131,7 +131,7 @@ func (a *AzureFirewallsServerTransport) dispatchBeginCreateOrUpdate(req *http.Re } beginCreateOrUpdate := a.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureFirewalls/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/azureFirewalls/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -141,15 +141,15 @@ func (a *AzureFirewallsServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - azureFirewallNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("azureFirewallName")]) + azureFirewallNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("azureFirewallName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, azureFirewallNameUnescaped, body, nil) + respr, errRespr := a.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, azureFirewallNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -179,21 +179,21 @@ func (a *AzureFirewallsServerTransport) dispatchBeginDelete(req *http.Request) ( } beginDelete := a.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureFirewalls/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/azureFirewalls/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - azureFirewallNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("azureFirewallName")]) + azureFirewallNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("azureFirewallName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, azureFirewallNameUnescaped, nil) + respr, errRespr := a.srv.BeginDelete(req.Context(), resourceGroupNameParam, azureFirewallNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -221,21 +221,21 @@ func (a *AzureFirewallsServerTransport) dispatchGet(req *http.Request) (*http.Re if a.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureFirewalls/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/azureFirewalls/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - azureFirewallNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("azureFirewallName")]) + azureFirewallNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("azureFirewallName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.Get(req.Context(), resourceGroupNameUnescaped, azureFirewallNameUnescaped, nil) + respr, errRespr := a.srv.Get(req.Context(), resourceGroupNameParam, azureFirewallNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -256,17 +256,17 @@ func (a *AzureFirewallsServerTransport) dispatchNewListPager(req *http.Request) } newListPager := a.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureFirewalls` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/azureFirewalls` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := a.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := a.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp a.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.AzureFirewallsClientListResponse, createLink func() string) { @@ -293,7 +293,7 @@ func (a *AzureFirewallsServerTransport) dispatchNewListAllPager(req *http.Reques } newListAllPager := a.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureFirewalls` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/azureFirewalls` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -326,21 +326,21 @@ func (a *AzureFirewallsServerTransport) dispatchBeginListLearnedPrefixes(req *ht } beginListLearnedPrefixes := a.beginListLearnedPrefixes.get(req) if beginListLearnedPrefixes == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureFirewalls/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/learnedIPPrefixes` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/azureFirewalls/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/learnedIPPrefixes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - azureFirewallNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("azureFirewallName")]) + azureFirewallNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("azureFirewallName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.BeginListLearnedPrefixes(req.Context(), resourceGroupNameUnescaped, azureFirewallNameUnescaped, nil) + respr, errRespr := a.srv.BeginListLearnedPrefixes(req.Context(), resourceGroupNameParam, azureFirewallNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -370,7 +370,7 @@ func (a *AzureFirewallsServerTransport) dispatchBeginPacketCapture(req *http.Req } beginPacketCapture := a.beginPacketCapture.get(req) if beginPacketCapture == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureFirewalls/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCapture` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/azureFirewalls/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -380,15 +380,15 @@ func (a *AzureFirewallsServerTransport) dispatchBeginPacketCapture(req *http.Req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - azureFirewallNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("azureFirewallName")]) + azureFirewallNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("azureFirewallName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.BeginPacketCapture(req.Context(), resourceGroupNameUnescaped, azureFirewallNameUnescaped, body, nil) + respr, errRespr := a.srv.BeginPacketCapture(req.Context(), resourceGroupNameParam, azureFirewallNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -418,7 +418,7 @@ func (a *AzureFirewallsServerTransport) dispatchBeginUpdateTags(req *http.Reques } beginUpdateTags := a.beginUpdateTags.get(req) if beginUpdateTags == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureFirewalls/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/azureFirewalls/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -428,15 +428,15 @@ func (a *AzureFirewallsServerTransport) dispatchBeginUpdateTags(req *http.Reques if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - azureFirewallNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("azureFirewallName")]) + azureFirewallNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("azureFirewallName")]) if err != nil { return nil, err } - respr, errRespr := a.srv.BeginUpdateTags(req.Context(), resourceGroupNameUnescaped, azureFirewallNameUnescaped, body, nil) + respr, errRespr := a.srv.BeginUpdateTags(req.Context(), resourceGroupNameParam, azureFirewallNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/bastionhosts_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/bastionhosts_server.go index b8d41fbf0..d3bb80bee 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/bastionhosts_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/bastionhosts_server.go @@ -115,7 +115,7 @@ func (b *BastionHostsServerTransport) dispatchBeginCreateOrUpdate(req *http.Requ } beginCreateOrUpdate := b.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -125,15 +125,15 @@ func (b *BastionHostsServerTransport) dispatchBeginCreateOrUpdate(req *http.Requ if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - bastionHostNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) + bastionHostNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) if err != nil { return nil, err } - respr, errRespr := b.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, bastionHostNameUnescaped, body, nil) + respr, errRespr := b.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, bastionHostNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -163,21 +163,21 @@ func (b *BastionHostsServerTransport) dispatchBeginDelete(req *http.Request) (*h } beginDelete := b.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - bastionHostNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) + bastionHostNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) if err != nil { return nil, err } - respr, errRespr := b.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, bastionHostNameUnescaped, nil) + respr, errRespr := b.srv.BeginDelete(req.Context(), resourceGroupNameParam, bastionHostNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -205,21 +205,21 @@ func (b *BastionHostsServerTransport) dispatchGet(req *http.Request) (*http.Resp if b.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - bastionHostNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) + bastionHostNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) if err != nil { return nil, err } - respr, errRespr := b.srv.Get(req.Context(), resourceGroupNameUnescaped, bastionHostNameUnescaped, nil) + respr, errRespr := b.srv.Get(req.Context(), resourceGroupNameParam, bastionHostNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -240,7 +240,7 @@ func (b *BastionHostsServerTransport) dispatchNewListPager(req *http.Request) (* } newListPager := b.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/bastionHosts` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -273,17 +273,17 @@ func (b *BastionHostsServerTransport) dispatchNewListByResourceGroupPager(req *h } newListByResourceGroupPager := b.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/bastionHosts` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := b.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := b.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp b.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.BastionHostsClientListByResourceGroupResponse, createLink func() string) { @@ -310,7 +310,7 @@ func (b *BastionHostsServerTransport) dispatchBeginUpdateTags(req *http.Request) } beginUpdateTags := b.beginUpdateTags.get(req) if beginUpdateTags == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -320,15 +320,15 @@ func (b *BastionHostsServerTransport) dispatchBeginUpdateTags(req *http.Request) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - bastionHostNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) + bastionHostNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) if err != nil { return nil, err } - respr, errRespr := b.srv.BeginUpdateTags(req.Context(), resourceGroupNameUnescaped, bastionHostNameUnescaped, body, nil) + respr, errRespr := b.srv.BeginUpdateTags(req.Context(), resourceGroupNameParam, bastionHostNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/bgpservicecommunities_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/bgpservicecommunities_server.go index e94d2b3f6..a92b66183 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/bgpservicecommunities_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/bgpservicecommunities_server.go @@ -75,7 +75,7 @@ func (b *BgpServiceCommunitiesServerTransport) dispatchNewListPager(req *http.Re } newListPager := b.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bgpServiceCommunities` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/bgpServiceCommunities` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/configurationpolicygroups_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/configurationpolicygroups_server.go index 966c7644d..3763742c6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/configurationpolicygroups_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/configurationpolicygroups_server.go @@ -99,7 +99,7 @@ func (c *ConfigurationPolicyGroupsServerTransport) dispatchBeginCreateOrUpdate(r } beginCreateOrUpdate := c.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configurationPolicyGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configurationPolicyGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (c *ConfigurationPolicyGroupsServerTransport) dispatchBeginCreateOrUpdate(r if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - vpnServerConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("vpnServerConfigurationName")]) + vpnServerConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vpnServerConfigurationName")]) if err != nil { return nil, err } - configurationPolicyGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("configurationPolicyGroupName")]) + configurationPolicyGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("configurationPolicyGroupName")]) if err != nil { return nil, err } - respr, errRespr := c.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, vpnServerConfigurationNameUnescaped, configurationPolicyGroupNameUnescaped, body, nil) + respr, errRespr := c.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, vpnServerConfigurationNameParam, configurationPolicyGroupNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (c *ConfigurationPolicyGroupsServerTransport) dispatchBeginDelete(req *http } beginDelete := c.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configurationPolicyGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configurationPolicyGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - vpnServerConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("vpnServerConfigurationName")]) + vpnServerConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vpnServerConfigurationName")]) if err != nil { return nil, err } - configurationPolicyGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("configurationPolicyGroupName")]) + configurationPolicyGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("configurationPolicyGroupName")]) if err != nil { return nil, err } - respr, errRespr := c.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, vpnServerConfigurationNameUnescaped, configurationPolicyGroupNameUnescaped, nil) + respr, errRespr := c.srv.BeginDelete(req.Context(), resourceGroupNameParam, vpnServerConfigurationNameParam, configurationPolicyGroupNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (c *ConfigurationPolicyGroupsServerTransport) dispatchGet(req *http.Request if c.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configurationPolicyGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configurationPolicyGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - vpnServerConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("vpnServerConfigurationName")]) + vpnServerConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vpnServerConfigurationName")]) if err != nil { return nil, err } - configurationPolicyGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("configurationPolicyGroupName")]) + configurationPolicyGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("configurationPolicyGroupName")]) if err != nil { return nil, err } - respr, errRespr := c.srv.Get(req.Context(), resourceGroupNameUnescaped, vpnServerConfigurationNameUnescaped, configurationPolicyGroupNameUnescaped, nil) + respr, errRespr := c.srv.Get(req.Context(), resourceGroupNameParam, vpnServerConfigurationNameParam, configurationPolicyGroupNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (c *ConfigurationPolicyGroupsServerTransport) dispatchNewListByVPNServerCon } newListByVPNServerConfigurationPager := c.newListByVPNServerConfigurationPager.get(req) if newListByVPNServerConfigurationPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configurationPolicyGroups` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configurationPolicyGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - vpnServerConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("vpnServerConfigurationName")]) + vpnServerConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vpnServerConfigurationName")]) if err != nil { return nil, err } - resp := c.srv.NewListByVPNServerConfigurationPager(resourceGroupNameUnescaped, vpnServerConfigurationNameUnescaped, nil) + resp := c.srv.NewListByVPNServerConfigurationPager(resourceGroupNameParam, vpnServerConfigurationNameParam, nil) newListByVPNServerConfigurationPager = &resp c.newListByVPNServerConfigurationPager.add(req, newListByVPNServerConfigurationPager) server.PagerResponderInjectNextLinks(newListByVPNServerConfigurationPager, req, func(page *armnetwork.ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/connectionmonitors_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/connectionmonitors_server.go index 3d9cb5159..4ee3ea8d2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/connectionmonitors_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/connectionmonitors_server.go @@ -128,7 +128,7 @@ func (c *ConnectionMonitorsServerTransport) dispatchBeginCreateOrUpdate(req *htt } beginCreateOrUpdate := c.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -139,15 +139,15 @@ func (c *ConnectionMonitorsServerTransport) dispatchBeginCreateOrUpdate(req *htt if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - connectionMonitorNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionMonitorName")]) + connectionMonitorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionMonitorName")]) if err != nil { return nil, err } @@ -162,7 +162,7 @@ func (c *ConnectionMonitorsServerTransport) dispatchBeginCreateOrUpdate(req *htt Migrate: migrateParam, } } - respr, errRespr := c.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, connectionMonitorNameUnescaped, body, options) + respr, errRespr := c.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, networkWatcherNameParam, connectionMonitorNameParam, body, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -192,25 +192,25 @@ func (c *ConnectionMonitorsServerTransport) dispatchBeginDelete(req *http.Reques } beginDelete := c.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - connectionMonitorNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionMonitorName")]) + connectionMonitorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionMonitorName")]) if err != nil { return nil, err } - respr, errRespr := c.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, connectionMonitorNameUnescaped, nil) + respr, errRespr := c.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkWatcherNameParam, connectionMonitorNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -238,25 +238,25 @@ func (c *ConnectionMonitorsServerTransport) dispatchGet(req *http.Request) (*htt if c.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - connectionMonitorNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionMonitorName")]) + connectionMonitorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionMonitorName")]) if err != nil { return nil, err } - respr, errRespr := c.srv.Get(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, connectionMonitorNameUnescaped, nil) + respr, errRespr := c.srv.Get(req.Context(), resourceGroupNameParam, networkWatcherNameParam, connectionMonitorNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -277,21 +277,21 @@ func (c *ConnectionMonitorsServerTransport) dispatchNewListPager(req *http.Reque } newListPager := c.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - resp := c.srv.NewListPager(resourceGroupNameUnescaped, networkWatcherNameUnescaped, nil) + resp := c.srv.NewListPager(resourceGroupNameParam, networkWatcherNameParam, nil) newListPager = &resp c.newListPager.add(req, newListPager) } @@ -315,25 +315,25 @@ func (c *ConnectionMonitorsServerTransport) dispatchBeginQuery(req *http.Request } beginQuery := c.beginQuery.get(req) if beginQuery == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/query` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/query` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - connectionMonitorNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionMonitorName")]) + connectionMonitorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionMonitorName")]) if err != nil { return nil, err } - respr, errRespr := c.srv.BeginQuery(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, connectionMonitorNameUnescaped, nil) + respr, errRespr := c.srv.BeginQuery(req.Context(), resourceGroupNameParam, networkWatcherNameParam, connectionMonitorNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -363,25 +363,25 @@ func (c *ConnectionMonitorsServerTransport) dispatchBeginStart(req *http.Request } beginStart := c.beginStart.get(req) if beginStart == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/start` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/start` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - connectionMonitorNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionMonitorName")]) + connectionMonitorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionMonitorName")]) if err != nil { return nil, err } - respr, errRespr := c.srv.BeginStart(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, connectionMonitorNameUnescaped, nil) + respr, errRespr := c.srv.BeginStart(req.Context(), resourceGroupNameParam, networkWatcherNameParam, connectionMonitorNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -411,25 +411,25 @@ func (c *ConnectionMonitorsServerTransport) dispatchBeginStop(req *http.Request) } beginStop := c.beginStop.get(req) if beginStop == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stop` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stop` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - connectionMonitorNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionMonitorName")]) + connectionMonitorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionMonitorName")]) if err != nil { return nil, err } - respr, errRespr := c.srv.BeginStop(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, connectionMonitorNameUnescaped, nil) + respr, errRespr := c.srv.BeginStop(req.Context(), resourceGroupNameParam, networkWatcherNameParam, connectionMonitorNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -457,7 +457,7 @@ func (c *ConnectionMonitorsServerTransport) dispatchUpdateTags(req *http.Request if c.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -467,19 +467,19 @@ func (c *ConnectionMonitorsServerTransport) dispatchUpdateTags(req *http.Request if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - connectionMonitorNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionMonitorName")]) + connectionMonitorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionMonitorName")]) if err != nil { return nil, err } - respr, errRespr := c.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, connectionMonitorNameUnescaped, body, nil) + respr, errRespr := c.srv.UpdateTags(req.Context(), resourceGroupNameParam, networkWatcherNameParam, connectionMonitorNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/connectivityconfigurations_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/connectivityconfigurations_server.go index 12be57704..b83ad6059 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/connectivityconfigurations_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/connectivityconfigurations_server.go @@ -96,7 +96,7 @@ func (c *ConnectivityConfigurationsServerTransport) dispatchCreateOrUpdate(req * if c.srv.CreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdate not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectivityConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectivityConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -106,19 +106,19 @@ func (c *ConnectivityConfigurationsServerTransport) dispatchCreateOrUpdate(req * if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - configurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) + configurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) if err != nil { return nil, err } - respr, errRespr := c.srv.CreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, configurationNameUnescaped, body, nil) + respr, errRespr := c.srv.CreateOrUpdate(req.Context(), resourceGroupNameParam, networkManagerNameParam, configurationNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -139,22 +139,22 @@ func (c *ConnectivityConfigurationsServerTransport) dispatchBeginDelete(req *htt } beginDelete := c.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectivityConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectivityConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - configurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) + configurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) if err != nil { return nil, err } @@ -172,7 +172,7 @@ func (c *ConnectivityConfigurationsServerTransport) dispatchBeginDelete(req *htt Force: forceParam, } } - respr, errRespr := c.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, configurationNameUnescaped, options) + respr, errRespr := c.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkManagerNameParam, configurationNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -200,25 +200,25 @@ func (c *ConnectivityConfigurationsServerTransport) dispatchGet(req *http.Reques if c.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectivityConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectivityConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - configurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) + configurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) if err != nil { return nil, err } - respr, errRespr := c.srv.Get(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, configurationNameUnescaped, nil) + respr, errRespr := c.srv.Get(req.Context(), resourceGroupNameParam, networkManagerNameParam, configurationNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -239,18 +239,18 @@ func (c *ConnectivityConfigurationsServerTransport) dispatchNewListPager(req *ht } newListPager := c.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectivityConfigurations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectivityConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } @@ -280,7 +280,7 @@ func (c *ConnectivityConfigurationsServerTransport) dispatchNewListPager(req *ht SkipToken: skipTokenParam, } } - resp := c.srv.NewListPager(resourceGroupNameUnescaped, networkManagerNameUnescaped, options) + resp := c.srv.NewListPager(resourceGroupNameParam, networkManagerNameParam, options) newListPager = &resp c.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ConnectivityConfigurationsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/customipprefixes_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/customipprefixes_server.go index 92c7cb178..be2dc5f06 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/customipprefixes_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/customipprefixes_server.go @@ -113,7 +113,7 @@ func (c *CustomIPPrefixesServerTransport) dispatchBeginCreateOrUpdate(req *http. } beginCreateOrUpdate := c.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/customIpPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/customIpPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (c *CustomIPPrefixesServerTransport) dispatchBeginCreateOrUpdate(req *http. if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - customIPPrefixNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("customIpPrefixName")]) + customIPPrefixNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("customIpPrefixName")]) if err != nil { return nil, err } - respr, errRespr := c.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, customIPPrefixNameUnescaped, body, nil) + respr, errRespr := c.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, customIPPrefixNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (c *CustomIPPrefixesServerTransport) dispatchBeginDelete(req *http.Request) } beginDelete := c.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/customIpPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/customIpPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - customIPPrefixNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("customIpPrefixName")]) + customIPPrefixNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("customIpPrefixName")]) if err != nil { return nil, err } - respr, errRespr := c.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, customIPPrefixNameUnescaped, nil) + respr, errRespr := c.srv.BeginDelete(req.Context(), resourceGroupNameParam, customIPPrefixNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,18 +203,18 @@ func (c *CustomIPPrefixesServerTransport) dispatchGet(req *http.Request) (*http. if c.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/customIpPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/customIpPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - customIPPrefixNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("customIpPrefixName")]) + customIPPrefixNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("customIpPrefixName")]) if err != nil { return nil, err } @@ -229,7 +229,7 @@ func (c *CustomIPPrefixesServerTransport) dispatchGet(req *http.Request) (*http. Expand: expandParam, } } - respr, errRespr := c.srv.Get(req.Context(), resourceGroupNameUnescaped, customIPPrefixNameUnescaped, options) + respr, errRespr := c.srv.Get(req.Context(), resourceGroupNameParam, customIPPrefixNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -250,17 +250,17 @@ func (c *CustomIPPrefixesServerTransport) dispatchNewListPager(req *http.Request } newListPager := c.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/customIpPrefixes` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/customIpPrefixes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := c.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := c.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp c.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.CustomIPPrefixesClientListResponse, createLink func() string) { @@ -287,7 +287,7 @@ func (c *CustomIPPrefixesServerTransport) dispatchNewListAllPager(req *http.Requ } newListAllPager := c.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/customIpPrefixes` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/customIpPrefixes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -318,7 +318,7 @@ func (c *CustomIPPrefixesServerTransport) dispatchUpdateTags(req *http.Request) if c.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/customIpPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/customIpPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -328,15 +328,15 @@ func (c *CustomIPPrefixesServerTransport) dispatchUpdateTags(req *http.Request) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - customIPPrefixNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("customIpPrefixName")]) + customIPPrefixNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("customIpPrefixName")]) if err != nil { return nil, err } - respr, errRespr := c.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, customIPPrefixNameUnescaped, body, nil) + respr, errRespr := c.srv.UpdateTags(req.Context(), resourceGroupNameParam, customIPPrefixNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/ddoscustompolicies_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/ddoscustompolicies_server.go index f622a4acd..5a3a0feef 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/ddoscustompolicies_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/ddoscustompolicies_server.go @@ -96,7 +96,7 @@ func (d *DdosCustomPoliciesServerTransport) dispatchBeginCreateOrUpdate(req *htt } beginCreateOrUpdate := d.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ddosCustomPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ddosCustomPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -106,15 +106,15 @@ func (d *DdosCustomPoliciesServerTransport) dispatchBeginCreateOrUpdate(req *htt if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - ddosCustomPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ddosCustomPolicyName")]) + ddosCustomPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ddosCustomPolicyName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, ddosCustomPolicyNameUnescaped, body, nil) + respr, errRespr := d.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, ddosCustomPolicyNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -144,21 +144,21 @@ func (d *DdosCustomPoliciesServerTransport) dispatchBeginDelete(req *http.Reques } beginDelete := d.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ddosCustomPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ddosCustomPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - ddosCustomPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ddosCustomPolicyName")]) + ddosCustomPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ddosCustomPolicyName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, ddosCustomPolicyNameUnescaped, nil) + respr, errRespr := d.srv.BeginDelete(req.Context(), resourceGroupNameParam, ddosCustomPolicyNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -186,21 +186,21 @@ func (d *DdosCustomPoliciesServerTransport) dispatchGet(req *http.Request) (*htt if d.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ddosCustomPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ddosCustomPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - ddosCustomPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ddosCustomPolicyName")]) + ddosCustomPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ddosCustomPolicyName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.Get(req.Context(), resourceGroupNameUnescaped, ddosCustomPolicyNameUnescaped, nil) + respr, errRespr := d.srv.Get(req.Context(), resourceGroupNameParam, ddosCustomPolicyNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -219,7 +219,7 @@ func (d *DdosCustomPoliciesServerTransport) dispatchUpdateTags(req *http.Request if d.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ddosCustomPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ddosCustomPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -229,15 +229,15 @@ func (d *DdosCustomPoliciesServerTransport) dispatchUpdateTags(req *http.Request if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - ddosCustomPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ddosCustomPolicyName")]) + ddosCustomPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ddosCustomPolicyName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, ddosCustomPolicyNameUnescaped, body, nil) + respr, errRespr := d.srv.UpdateTags(req.Context(), resourceGroupNameParam, ddosCustomPolicyNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/ddosprotectionplans_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/ddosprotectionplans_server.go index c573f9c80..e1562e643 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/ddosprotectionplans_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/ddosprotectionplans_server.go @@ -113,7 +113,7 @@ func (d *DdosProtectionPlansServerTransport) dispatchBeginCreateOrUpdate(req *ht } beginCreateOrUpdate := d.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ddosProtectionPlans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ddosProtectionPlans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (d *DdosProtectionPlansServerTransport) dispatchBeginCreateOrUpdate(req *ht if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - ddosProtectionPlanNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ddosProtectionPlanName")]) + ddosProtectionPlanNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ddosProtectionPlanName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, ddosProtectionPlanNameUnescaped, body, nil) + respr, errRespr := d.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, ddosProtectionPlanNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (d *DdosProtectionPlansServerTransport) dispatchBeginDelete(req *http.Reque } beginDelete := d.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ddosProtectionPlans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ddosProtectionPlans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - ddosProtectionPlanNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ddosProtectionPlanName")]) + ddosProtectionPlanNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ddosProtectionPlanName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, ddosProtectionPlanNameUnescaped, nil) + respr, errRespr := d.srv.BeginDelete(req.Context(), resourceGroupNameParam, ddosProtectionPlanNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,21 +203,21 @@ func (d *DdosProtectionPlansServerTransport) dispatchGet(req *http.Request) (*ht if d.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ddosProtectionPlans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ddosProtectionPlans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - ddosProtectionPlanNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ddosProtectionPlanName")]) + ddosProtectionPlanNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ddosProtectionPlanName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.Get(req.Context(), resourceGroupNameUnescaped, ddosProtectionPlanNameUnescaped, nil) + respr, errRespr := d.srv.Get(req.Context(), resourceGroupNameParam, ddosProtectionPlanNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -238,7 +238,7 @@ func (d *DdosProtectionPlansServerTransport) dispatchNewListPager(req *http.Requ } newListPager := d.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ddosProtectionPlans` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ddosProtectionPlans` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -271,17 +271,17 @@ func (d *DdosProtectionPlansServerTransport) dispatchNewListByResourceGroupPager } newListByResourceGroupPager := d.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ddosProtectionPlans` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ddosProtectionPlans` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := d.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := d.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp d.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.DdosProtectionPlansClientListByResourceGroupResponse, createLink func() string) { @@ -306,7 +306,7 @@ func (d *DdosProtectionPlansServerTransport) dispatchUpdateTags(req *http.Reques if d.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ddosProtectionPlans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ddosProtectionPlans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -316,15 +316,15 @@ func (d *DdosProtectionPlansServerTransport) dispatchUpdateTags(req *http.Reques if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - ddosProtectionPlanNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ddosProtectionPlanName")]) + ddosProtectionPlanNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ddosProtectionPlanName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, ddosProtectionPlanNameUnescaped, body, nil) + respr, errRespr := d.srv.UpdateTags(req.Context(), resourceGroupNameParam, ddosProtectionPlanNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/defaultsecurityrules_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/defaultsecurityrules_server.go index 80d49cb8e..33df95b44 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/defaultsecurityrules_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/defaultsecurityrules_server.go @@ -81,25 +81,25 @@ func (d *DefaultSecurityRulesServerTransport) dispatchGet(req *http.Request) (*h if d.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/defaultSecurityRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/defaultSecurityRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkSecurityGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) + networkSecurityGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) if err != nil { return nil, err } - defaultSecurityRuleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("defaultSecurityRuleName")]) + defaultSecurityRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("defaultSecurityRuleName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.Get(req.Context(), resourceGroupNameUnescaped, networkSecurityGroupNameUnescaped, defaultSecurityRuleNameUnescaped, nil) + respr, errRespr := d.srv.Get(req.Context(), resourceGroupNameParam, networkSecurityGroupNameParam, defaultSecurityRuleNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -120,21 +120,21 @@ func (d *DefaultSecurityRulesServerTransport) dispatchNewListPager(req *http.Req } newListPager := d.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/defaultSecurityRules` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/defaultSecurityRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkSecurityGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) + networkSecurityGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) if err != nil { return nil, err } - resp := d.srv.NewListPager(resourceGroupNameUnescaped, networkSecurityGroupNameUnescaped, nil) + resp := d.srv.NewListPager(resourceGroupNameParam, networkSecurityGroupNameParam, nil) newListPager = &resp d.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.DefaultSecurityRulesClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/dscpconfiguration_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/dscpconfiguration_server.go index 3e89e904e..5de861ba8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/dscpconfiguration_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/dscpconfiguration_server.go @@ -107,7 +107,7 @@ func (d *DscpConfigurationServerTransport) dispatchBeginCreateOrUpdate(req *http } beginCreateOrUpdate := d.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/dscpConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/dscpConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -117,15 +117,15 @@ func (d *DscpConfigurationServerTransport) dispatchBeginCreateOrUpdate(req *http if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - dscpConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("dscpConfigurationName")]) + dscpConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("dscpConfigurationName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, dscpConfigurationNameUnescaped, body, nil) + respr, errRespr := d.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, dscpConfigurationNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -155,21 +155,21 @@ func (d *DscpConfigurationServerTransport) dispatchBeginDelete(req *http.Request } beginDelete := d.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/dscpConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/dscpConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - dscpConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("dscpConfigurationName")]) + dscpConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("dscpConfigurationName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, dscpConfigurationNameUnescaped, nil) + respr, errRespr := d.srv.BeginDelete(req.Context(), resourceGroupNameParam, dscpConfigurationNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,21 +197,21 @@ func (d *DscpConfigurationServerTransport) dispatchGet(req *http.Request) (*http if d.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/dscpConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/dscpConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - dscpConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("dscpConfigurationName")]) + dscpConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("dscpConfigurationName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.Get(req.Context(), resourceGroupNameUnescaped, dscpConfigurationNameUnescaped, nil) + respr, errRespr := d.srv.Get(req.Context(), resourceGroupNameParam, dscpConfigurationNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -232,17 +232,17 @@ func (d *DscpConfigurationServerTransport) dispatchNewListPager(req *http.Reques } newListPager := d.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/dscpConfigurations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/dscpConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := d.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := d.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp d.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.DscpConfigurationClientListResponse, createLink func() string) { @@ -269,7 +269,7 @@ func (d *DscpConfigurationServerTransport) dispatchNewListAllPager(req *http.Req } newListAllPager := d.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/dscpConfigurations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/dscpConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecircuitauthorizations_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecircuitauthorizations_server.go index 731d32000..358426637 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecircuitauthorizations_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecircuitauthorizations_server.go @@ -99,7 +99,7 @@ func (e *ExpressRouteCircuitAuthorizationsServerTransport) dispatchBeginCreateOr } beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (e *ExpressRouteCircuitAuthorizationsServerTransport) dispatchBeginCreateOr if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - authorizationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("authorizationName")]) + authorizationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("authorizationName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, authorizationNameUnescaped, body, nil) + respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, circuitNameParam, authorizationNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (e *ExpressRouteCircuitAuthorizationsServerTransport) dispatchBeginDelete(r } beginDelete := e.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - authorizationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("authorizationName")]) + authorizationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("authorizationName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, authorizationNameUnescaped, nil) + respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameParam, circuitNameParam, authorizationNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (e *ExpressRouteCircuitAuthorizationsServerTransport) dispatchGet(req *http if e.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - authorizationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("authorizationName")]) + authorizationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("authorizationName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, authorizationNameUnescaped, nil) + respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameParam, circuitNameParam, authorizationNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (e *ExpressRouteCircuitAuthorizationsServerTransport) dispatchNewListPager( } newListPager := e.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - resp := e.srv.NewListPager(resourceGroupNameUnescaped, circuitNameUnescaped, nil) + resp := e.srv.NewListPager(resourceGroupNameParam, circuitNameParam, nil) newListPager = &resp e.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRouteCircuitAuthorizationsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecircuitconnections_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecircuitconnections_server.go index cb13e3a8d..de1e1657f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecircuitconnections_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecircuitconnections_server.go @@ -99,7 +99,7 @@ func (e *ExpressRouteCircuitConnectionsServerTransport) dispatchBeginCreateOrUpd } beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { @@ -109,23 +109,23 @@ func (e *ExpressRouteCircuitConnectionsServerTransport) dispatchBeginCreateOrUpd if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, peeringNameUnescaped, connectionNameUnescaped, body, nil) + respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, circuitNameParam, peeringNameParam, connectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -155,29 +155,29 @@ func (e *ExpressRouteCircuitConnectionsServerTransport) dispatchBeginDelete(req } beginDelete := e.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, peeringNameUnescaped, connectionNameUnescaped, nil) + respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameParam, circuitNameParam, peeringNameParam, connectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -205,29 +205,29 @@ func (e *ExpressRouteCircuitConnectionsServerTransport) dispatchGet(req *http.Re if e.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, peeringNameUnescaped, connectionNameUnescaped, nil) + respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameParam, circuitNameParam, peeringNameParam, connectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -248,25 +248,25 @@ func (e *ExpressRouteCircuitConnectionsServerTransport) dispatchNewListPager(req } newListPager := e.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - resp := e.srv.NewListPager(resourceGroupNameUnescaped, circuitNameUnescaped, peeringNameUnescaped, nil) + resp := e.srv.NewListPager(resourceGroupNameParam, circuitNameParam, peeringNameParam, nil) newListPager = &resp e.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRouteCircuitConnectionsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecircuitpeerings_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecircuitpeerings_server.go index 94a064294..e11c03e5f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecircuitpeerings_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecircuitpeerings_server.go @@ -99,7 +99,7 @@ func (e *ExpressRouteCircuitPeeringsServerTransport) dispatchBeginCreateOrUpdate } beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (e *ExpressRouteCircuitPeeringsServerTransport) dispatchBeginCreateOrUpdate if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, peeringNameUnescaped, body, nil) + respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, circuitNameParam, peeringNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (e *ExpressRouteCircuitPeeringsServerTransport) dispatchBeginDelete(req *ht } beginDelete := e.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, peeringNameUnescaped, nil) + respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameParam, circuitNameParam, peeringNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (e *ExpressRouteCircuitPeeringsServerTransport) dispatchGet(req *http.Reque if e.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, peeringNameUnescaped, nil) + respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameParam, circuitNameParam, peeringNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (e *ExpressRouteCircuitPeeringsServerTransport) dispatchNewListPager(req *h } newListPager := e.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - resp := e.srv.NewListPager(resourceGroupNameUnescaped, circuitNameUnescaped, nil) + resp := e.srv.NewListPager(resourceGroupNameParam, circuitNameParam, nil) newListPager = &resp e.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRouteCircuitPeeringsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecircuits_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecircuits_server.go index f4491da91..00a8a93d2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecircuits_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecircuits_server.go @@ -149,7 +149,7 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchBeginCreateOrUpdate(req *h } beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -159,15 +159,15 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchBeginCreateOrUpdate(req *h if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, body, nil) + respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, circuitNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,21 +197,21 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchBeginDelete(req *http.Requ } beginDelete := e.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, nil) + respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameParam, circuitNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -239,21 +239,21 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchGet(req *http.Request) (*h if e.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, nil) + respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameParam, circuitNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -272,25 +272,25 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchGetPeeringStats(req *http. if e.srv.GetPeeringStats == nil { return nil, &nonRetriableError{errors.New("fake for method GetPeeringStats not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stats` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stats` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.GetPeeringStats(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, peeringNameUnescaped, nil) + respr, errRespr := e.srv.GetPeeringStats(req.Context(), resourceGroupNameParam, circuitNameParam, peeringNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -309,21 +309,21 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchGetStats(req *http.Request if e.srv.GetStats == nil { return nil, &nonRetriableError{errors.New("fake for method GetStats not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stats` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stats` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.GetStats(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, nil) + respr, errRespr := e.srv.GetStats(req.Context(), resourceGroupNameParam, circuitNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -344,17 +344,17 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchNewListPager(req *http.Req } newListPager := e.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := e.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := e.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp e.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRouteCircuitsClientListResponse, createLink func() string) { @@ -381,7 +381,7 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchNewListAllPager(req *http. } newListAllPager := e.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -414,29 +414,29 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchBeginListArpTable(req *htt } beginListArpTable := e.beginListArpTable.get(req) if beginListArpTable == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/arpTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/arpTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - devicePathUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("devicePath")]) + devicePathParam, err := url.PathUnescape(matches[regex.SubexpIndex("devicePath")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginListArpTable(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, peeringNameUnescaped, devicePathUnescaped, nil) + respr, errRespr := e.srv.BeginListArpTable(req.Context(), resourceGroupNameParam, circuitNameParam, peeringNameParam, devicePathParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -466,29 +466,29 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchBeginListRoutesTable(req * } beginListRoutesTable := e.beginListRoutesTable.get(req) if beginListRoutesTable == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - devicePathUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("devicePath")]) + devicePathParam, err := url.PathUnescape(matches[regex.SubexpIndex("devicePath")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginListRoutesTable(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, peeringNameUnescaped, devicePathUnescaped, nil) + respr, errRespr := e.srv.BeginListRoutesTable(req.Context(), resourceGroupNameParam, circuitNameParam, peeringNameParam, devicePathParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -518,29 +518,29 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchBeginListRoutesTableSummar } beginListRoutesTableSummary := e.beginListRoutesTableSummary.get(req) if beginListRoutesTableSummary == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTablesSummary/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTablesSummary/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - devicePathUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("devicePath")]) + devicePathParam, err := url.PathUnescape(matches[regex.SubexpIndex("devicePath")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginListRoutesTableSummary(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, peeringNameUnescaped, devicePathUnescaped, nil) + respr, errRespr := e.srv.BeginListRoutesTableSummary(req.Context(), resourceGroupNameParam, circuitNameParam, peeringNameParam, devicePathParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -568,7 +568,7 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchUpdateTags(req *http.Reque if e.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -578,15 +578,15 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchUpdateTags(req *http.Reque if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, body, nil) + respr, errRespr := e.srv.UpdateTags(req.Context(), resourceGroupNameParam, circuitNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteconnections_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteconnections_server.go index 46c9fb970..48e96852e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteconnections_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteconnections_server.go @@ -96,7 +96,7 @@ func (e *ExpressRouteConnectionsServerTransport) dispatchBeginCreateOrUpdate(req } beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/expressRouteConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/expressRouteConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -106,19 +106,19 @@ func (e *ExpressRouteConnectionsServerTransport) dispatchBeginCreateOrUpdate(req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRouteGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRouteGatewayName")]) + expressRouteGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRouteGatewayName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, expressRouteGatewayNameUnescaped, connectionNameUnescaped, body, nil) + respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, expressRouteGatewayNameParam, connectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -148,25 +148,25 @@ func (e *ExpressRouteConnectionsServerTransport) dispatchBeginDelete(req *http.R } beginDelete := e.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/expressRouteConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/expressRouteConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRouteGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRouteGatewayName")]) + expressRouteGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRouteGatewayName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, expressRouteGatewayNameUnescaped, connectionNameUnescaped, nil) + respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameParam, expressRouteGatewayNameParam, connectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -194,25 +194,25 @@ func (e *ExpressRouteConnectionsServerTransport) dispatchGet(req *http.Request) if e.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/expressRouteConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/expressRouteConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRouteGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRouteGatewayName")]) + expressRouteGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRouteGatewayName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameUnescaped, expressRouteGatewayNameUnescaped, connectionNameUnescaped, nil) + respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameParam, expressRouteGatewayNameParam, connectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -231,21 +231,21 @@ func (e *ExpressRouteConnectionsServerTransport) dispatchList(req *http.Request) if e.srv.List == nil { return nil, &nonRetriableError{errors.New("fake for method List not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/expressRouteConnections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/expressRouteConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRouteGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRouteGatewayName")]) + expressRouteGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRouteGatewayName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.List(req.Context(), resourceGroupNameUnescaped, expressRouteGatewayNameUnescaped, nil) + respr, errRespr := e.srv.List(req.Context(), resourceGroupNameParam, expressRouteGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecrossconnectionpeerings_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecrossconnectionpeerings_server.go index 6dbee136e..870926934 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecrossconnectionpeerings_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecrossconnectionpeerings_server.go @@ -99,7 +99,7 @@ func (e *ExpressRouteCrossConnectionPeeringsServerTransport) dispatchBeginCreate } beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (e *ExpressRouteCrossConnectionPeeringsServerTransport) dispatchBeginCreate if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - crossConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) + crossConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, crossConnectionNameUnescaped, peeringNameUnescaped, body, nil) + respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, crossConnectionNameParam, peeringNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (e *ExpressRouteCrossConnectionPeeringsServerTransport) dispatchBeginDelete } beginDelete := e.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - crossConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) + crossConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, crossConnectionNameUnescaped, peeringNameUnescaped, nil) + respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameParam, crossConnectionNameParam, peeringNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (e *ExpressRouteCrossConnectionPeeringsServerTransport) dispatchGet(req *ht if e.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - crossConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) + crossConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameUnescaped, crossConnectionNameUnescaped, peeringNameUnescaped, nil) + respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameParam, crossConnectionNameParam, peeringNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (e *ExpressRouteCrossConnectionPeeringsServerTransport) dispatchNewListPage } newListPager := e.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - crossConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) + crossConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) if err != nil { return nil, err } - resp := e.srv.NewListPager(resourceGroupNameUnescaped, crossConnectionNameUnescaped, nil) + resp := e.srv.NewListPager(resourceGroupNameParam, crossConnectionNameParam, nil) newListPager = &resp e.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRouteCrossConnectionPeeringsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecrossconnections_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecrossconnections_server.go index 86aad4e6b..457a74e14 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecrossconnections_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutecrossconnections_server.go @@ -129,7 +129,7 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchBeginCreateOrUpdat } beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -139,15 +139,15 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchBeginCreateOrUpdat if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - crossConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) + crossConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, crossConnectionNameUnescaped, body, nil) + respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, crossConnectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -175,21 +175,21 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchGet(req *http.Requ if e.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - crossConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) + crossConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameUnescaped, crossConnectionNameUnescaped, nil) + respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameParam, crossConnectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -210,7 +210,7 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchNewListPager(req * } newListPager := e.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCrossConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -243,29 +243,29 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchBeginListArpTable( } beginListArpTable := e.beginListArpTable.get(req) if beginListArpTable == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/arpTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/arpTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - crossConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) + crossConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - devicePathUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("devicePath")]) + devicePathParam, err := url.PathUnescape(matches[regex.SubexpIndex("devicePath")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginListArpTable(req.Context(), resourceGroupNameUnescaped, crossConnectionNameUnescaped, peeringNameUnescaped, devicePathUnescaped, nil) + respr, errRespr := e.srv.BeginListArpTable(req.Context(), resourceGroupNameParam, crossConnectionNameParam, peeringNameParam, devicePathParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -295,17 +295,17 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchNewListByResourceG } newListByResourceGroupPager := e.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCrossConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := e.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := e.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp e.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.ExpressRouteCrossConnectionsClientListByResourceGroupResponse, createLink func() string) { @@ -332,29 +332,29 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchBeginListRoutesTab } beginListRoutesTable := e.beginListRoutesTable.get(req) if beginListRoutesTable == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - crossConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) + crossConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - devicePathUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("devicePath")]) + devicePathParam, err := url.PathUnescape(matches[regex.SubexpIndex("devicePath")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginListRoutesTable(req.Context(), resourceGroupNameUnescaped, crossConnectionNameUnescaped, peeringNameUnescaped, devicePathUnescaped, nil) + respr, errRespr := e.srv.BeginListRoutesTable(req.Context(), resourceGroupNameParam, crossConnectionNameParam, peeringNameParam, devicePathParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -384,29 +384,29 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchBeginListRoutesTab } beginListRoutesTableSummary := e.beginListRoutesTableSummary.get(req) if beginListRoutesTableSummary == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTablesSummary/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTablesSummary/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - crossConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) + crossConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - devicePathUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("devicePath")]) + devicePathParam, err := url.PathUnescape(matches[regex.SubexpIndex("devicePath")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginListRoutesTableSummary(req.Context(), resourceGroupNameUnescaped, crossConnectionNameUnescaped, peeringNameUnescaped, devicePathUnescaped, nil) + respr, errRespr := e.srv.BeginListRoutesTableSummary(req.Context(), resourceGroupNameParam, crossConnectionNameParam, peeringNameParam, devicePathParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -434,7 +434,7 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchUpdateTags(req *ht if e.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -444,15 +444,15 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchUpdateTags(req *ht if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - crossConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) + crossConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("crossConnectionName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, crossConnectionNameUnescaped, body, nil) + respr, errRespr := e.srv.UpdateTags(req.Context(), resourceGroupNameParam, crossConnectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutegateways_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutegateways_server.go index 11df6c502..15c3103da 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutegateways_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutegateways_server.go @@ -110,7 +110,7 @@ func (e *ExpressRouteGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *h } beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -120,15 +120,15 @@ func (e *ExpressRouteGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *h if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRouteGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRouteGatewayName")]) + expressRouteGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRouteGatewayName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, expressRouteGatewayNameUnescaped, body, nil) + respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, expressRouteGatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -158,21 +158,21 @@ func (e *ExpressRouteGatewaysServerTransport) dispatchBeginDelete(req *http.Requ } beginDelete := e.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRouteGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRouteGatewayName")]) + expressRouteGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRouteGatewayName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, expressRouteGatewayNameUnescaped, nil) + respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameParam, expressRouteGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -200,21 +200,21 @@ func (e *ExpressRouteGatewaysServerTransport) dispatchGet(req *http.Request) (*h if e.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRouteGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRouteGatewayName")]) + expressRouteGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRouteGatewayName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameUnescaped, expressRouteGatewayNameUnescaped, nil) + respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameParam, expressRouteGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -233,17 +233,17 @@ func (e *ExpressRouteGatewaysServerTransport) dispatchListByResourceGroup(req *h if e.srv.ListByResourceGroup == nil { return nil, &nonRetriableError{errors.New("fake for method ListByResourceGroup not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteGateways` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.ListByResourceGroup(req.Context(), resourceGroupNameUnescaped, nil) + respr, errRespr := e.srv.ListByResourceGroup(req.Context(), resourceGroupNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -262,7 +262,7 @@ func (e *ExpressRouteGatewaysServerTransport) dispatchListBySubscription(req *ht if e.srv.ListBySubscription == nil { return nil, &nonRetriableError{errors.New("fake for method ListBySubscription not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteGateways` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -289,7 +289,7 @@ func (e *ExpressRouteGatewaysServerTransport) dispatchBeginUpdateTags(req *http. } beginUpdateTags := e.beginUpdateTags.get(req) if beginUpdateTags == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -299,15 +299,15 @@ func (e *ExpressRouteGatewaysServerTransport) dispatchBeginUpdateTags(req *http. if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRouteGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRouteGatewayName")]) + expressRouteGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRouteGatewayName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginUpdateTags(req.Context(), resourceGroupNameUnescaped, expressRouteGatewayNameUnescaped, body, nil) + respr, errRespr := e.srv.BeginUpdateTags(req.Context(), resourceGroupNameParam, expressRouteGatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutelinks_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutelinks_server.go index 439d0ec8d..269ffaef8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutelinks_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressroutelinks_server.go @@ -81,25 +81,25 @@ func (e *ExpressRouteLinksServerTransport) dispatchGet(req *http.Request) (*http if e.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ExpressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/links/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ExpressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/links/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRoutePortNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) + expressRoutePortNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) if err != nil { return nil, err } - linkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("linkName")]) + linkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("linkName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameUnescaped, expressRoutePortNameUnescaped, linkNameUnescaped, nil) + respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameParam, expressRoutePortNameParam, linkNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -120,21 +120,21 @@ func (e *ExpressRouteLinksServerTransport) dispatchNewListPager(req *http.Reques } newListPager := e.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ExpressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/links` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ExpressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/links` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRoutePortNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) + expressRoutePortNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) if err != nil { return nil, err } - resp := e.srv.NewListPager(resourceGroupNameUnescaped, expressRoutePortNameUnescaped, nil) + resp := e.srv.NewListPager(resourceGroupNameParam, expressRoutePortNameParam, nil) newListPager = &resp e.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRouteLinksClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteportauthorizations_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteportauthorizations_server.go index 2f7154cac..0d578804c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteportauthorizations_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteportauthorizations_server.go @@ -99,7 +99,7 @@ func (e *ExpressRoutePortAuthorizationsServerTransport) dispatchBeginCreateOrUpd } beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (e *ExpressRoutePortAuthorizationsServerTransport) dispatchBeginCreateOrUpd if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRoutePortNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) + expressRoutePortNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) if err != nil { return nil, err } - authorizationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("authorizationName")]) + authorizationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("authorizationName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, expressRoutePortNameUnescaped, authorizationNameUnescaped, body, nil) + respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, expressRoutePortNameParam, authorizationNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (e *ExpressRoutePortAuthorizationsServerTransport) dispatchBeginDelete(req } beginDelete := e.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRoutePortNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) + expressRoutePortNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) if err != nil { return nil, err } - authorizationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("authorizationName")]) + authorizationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("authorizationName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, expressRoutePortNameUnescaped, authorizationNameUnescaped, nil) + respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameParam, expressRoutePortNameParam, authorizationNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (e *ExpressRoutePortAuthorizationsServerTransport) dispatchGet(req *http.Re if e.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRoutePortNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) + expressRoutePortNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) if err != nil { return nil, err } - authorizationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("authorizationName")]) + authorizationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("authorizationName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameUnescaped, expressRoutePortNameUnescaped, authorizationNameUnescaped, nil) + respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameParam, expressRoutePortNameParam, authorizationNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (e *ExpressRoutePortAuthorizationsServerTransport) dispatchNewListPager(req } newListPager := e.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRoutePortNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) + expressRoutePortNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) if err != nil { return nil, err } - resp := e.srv.NewListPager(resourceGroupNameUnescaped, expressRoutePortNameUnescaped, nil) + resp := e.srv.NewListPager(resourceGroupNameParam, expressRoutePortNameParam, nil) newListPager = &resp e.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRoutePortAuthorizationsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteports_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteports_server.go index d791eb094..7c3f6a281 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteports_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteports_server.go @@ -119,7 +119,7 @@ func (e *ExpressRoutePortsServerTransport) dispatchBeginCreateOrUpdate(req *http } beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ExpressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ExpressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -129,15 +129,15 @@ func (e *ExpressRoutePortsServerTransport) dispatchBeginCreateOrUpdate(req *http if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRoutePortNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) + expressRoutePortNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, expressRoutePortNameUnescaped, body, nil) + respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, expressRoutePortNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -167,21 +167,21 @@ func (e *ExpressRoutePortsServerTransport) dispatchBeginDelete(req *http.Request } beginDelete := e.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ExpressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ExpressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRoutePortNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) + expressRoutePortNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, expressRoutePortNameUnescaped, nil) + respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameParam, expressRoutePortNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -209,7 +209,7 @@ func (e *ExpressRoutePortsServerTransport) dispatchGenerateLOA(req *http.Request if e.srv.GenerateLOA == nil { return nil, &nonRetriableError{errors.New("fake for method GenerateLOA not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/generateLoa` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/generateLoa` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -219,15 +219,15 @@ func (e *ExpressRoutePortsServerTransport) dispatchGenerateLOA(req *http.Request if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRoutePortNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) + expressRoutePortNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.GenerateLOA(req.Context(), resourceGroupNameUnescaped, expressRoutePortNameUnescaped, body, nil) + respr, errRespr := e.srv.GenerateLOA(req.Context(), resourceGroupNameParam, expressRoutePortNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -246,21 +246,21 @@ func (e *ExpressRoutePortsServerTransport) dispatchGet(req *http.Request) (*http if e.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ExpressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ExpressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRoutePortNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) + expressRoutePortNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameUnescaped, expressRoutePortNameUnescaped, nil) + respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameParam, expressRoutePortNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -281,7 +281,7 @@ func (e *ExpressRoutePortsServerTransport) dispatchNewListPager(req *http.Reques } newListPager := e.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ExpressRoutePorts` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ExpressRoutePorts` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -314,17 +314,17 @@ func (e *ExpressRoutePortsServerTransport) dispatchNewListByResourceGroupPager(r } newListByResourceGroupPager := e.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ExpressRoutePorts` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ExpressRoutePorts` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := e.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := e.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp e.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.ExpressRoutePortsClientListByResourceGroupResponse, createLink func() string) { @@ -349,7 +349,7 @@ func (e *ExpressRoutePortsServerTransport) dispatchUpdateTags(req *http.Request) if e.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ExpressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ExpressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -359,15 +359,15 @@ func (e *ExpressRoutePortsServerTransport) dispatchUpdateTags(req *http.Request) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - expressRoutePortNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) + expressRoutePortNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("expressRoutePortName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, expressRoutePortNameUnescaped, body, nil) + respr, errRespr := e.srv.UpdateTags(req.Context(), resourceGroupNameParam, expressRoutePortNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteportslocations_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteportslocations_server.go index d05bbb970..0ee661141 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteportslocations_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteportslocations_server.go @@ -81,17 +81,17 @@ func (e *ExpressRoutePortsLocationsServerTransport) dispatchGet(req *http.Reques if e.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ExpressRoutePortsLocations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ExpressRoutePortsLocations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - locationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("locationName")]) + locationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("locationName")]) if err != nil { return nil, err } - respr, errRespr := e.srv.Get(req.Context(), locationNameUnescaped, nil) + respr, errRespr := e.srv.Get(req.Context(), locationNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -112,7 +112,7 @@ func (e *ExpressRoutePortsLocationsServerTransport) dispatchNewListPager(req *ht } newListPager := e.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ExpressRoutePortsLocations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ExpressRoutePortsLocations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteproviderportslocation_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteproviderportslocation_server.go index 399a6f7eb..82545cdb9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteproviderportslocation_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteproviderportslocation_server.go @@ -70,7 +70,7 @@ func (e *ExpressRouteProviderPortsLocationServerTransport) dispatchList(req *htt if e.srv.List == nil { return nil, &nonRetriableError{errors.New("fake for method List not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteProviderPorts` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteProviderPorts` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteserviceproviders_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteserviceproviders_server.go index 933854e27..c62b406c4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteserviceproviders_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/expressrouteserviceproviders_server.go @@ -75,7 +75,7 @@ func (e *ExpressRouteServiceProvidersServerTransport) dispatchNewListPager(req * } newListPager := e.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteServiceProviders` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteServiceProviders` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicies_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicies_server.go index 890b417e4..f6d670c46 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicies_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicies_server.go @@ -113,7 +113,7 @@ func (f *FirewallPoliciesServerTransport) dispatchBeginCreateOrUpdate(req *http. } beginCreateOrUpdate := f.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (f *FirewallPoliciesServerTransport) dispatchBeginCreateOrUpdate(req *http. if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - firewallPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) + firewallPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) if err != nil { return nil, err } - respr, errRespr := f.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, firewallPolicyNameUnescaped, body, nil) + respr, errRespr := f.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, firewallPolicyNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (f *FirewallPoliciesServerTransport) dispatchBeginDelete(req *http.Request) } beginDelete := f.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - firewallPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) + firewallPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) if err != nil { return nil, err } - respr, errRespr := f.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, firewallPolicyNameUnescaped, nil) + respr, errRespr := f.srv.BeginDelete(req.Context(), resourceGroupNameParam, firewallPolicyNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,18 +203,18 @@ func (f *FirewallPoliciesServerTransport) dispatchGet(req *http.Request) (*http. if f.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - firewallPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) + firewallPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) if err != nil { return nil, err } @@ -229,7 +229,7 @@ func (f *FirewallPoliciesServerTransport) dispatchGet(req *http.Request) (*http. Expand: expandParam, } } - respr, errRespr := f.srv.Get(req.Context(), resourceGroupNameUnescaped, firewallPolicyNameUnescaped, options) + respr, errRespr := f.srv.Get(req.Context(), resourceGroupNameParam, firewallPolicyNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -250,17 +250,17 @@ func (f *FirewallPoliciesServerTransport) dispatchNewListPager(req *http.Request } newListPager := f.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/firewallPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := f.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := f.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp f.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.FirewallPoliciesClientListResponse, createLink func() string) { @@ -287,7 +287,7 @@ func (f *FirewallPoliciesServerTransport) dispatchNewListAllPager(req *http.Requ } newListAllPager := f.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/firewallPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -318,7 +318,7 @@ func (f *FirewallPoliciesServerTransport) dispatchUpdateTags(req *http.Request) if f.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -328,15 +328,15 @@ func (f *FirewallPoliciesServerTransport) dispatchUpdateTags(req *http.Request) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - firewallPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) + firewallPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) if err != nil { return nil, err } - respr, errRespr := f.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, firewallPolicyNameUnescaped, body, nil) + respr, errRespr := f.srv.UpdateTags(req.Context(), resourceGroupNameParam, firewallPolicyNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicyidpssignatures_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicyidpssignatures_server.go index 79924789f..924ca9ccf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicyidpssignatures_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicyidpssignatures_server.go @@ -70,7 +70,7 @@ func (f *FirewallPolicyIdpsSignaturesServerTransport) dispatchList(req *http.Req if f.srv.List == nil { return nil, &nonRetriableError{errors.New("fake for method List not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listIdpsSignatures` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listIdpsSignatures` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -80,15 +80,15 @@ func (f *FirewallPolicyIdpsSignaturesServerTransport) dispatchList(req *http.Req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - firewallPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) + firewallPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) if err != nil { return nil, err } - respr, errRespr := f.srv.List(req.Context(), resourceGroupNameUnescaped, firewallPolicyNameUnescaped, body, nil) + respr, errRespr := f.srv.List(req.Context(), resourceGroupNameParam, firewallPolicyNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicyidpssignaturesfiltervalues_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicyidpssignaturesfiltervalues_server.go index f60ae6b74..070a65f0f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicyidpssignaturesfiltervalues_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicyidpssignaturesfiltervalues_server.go @@ -70,7 +70,7 @@ func (f *FirewallPolicyIdpsSignaturesFilterValuesServerTransport) dispatchList(r if f.srv.List == nil { return nil, &nonRetriableError{errors.New("fake for method List not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listIdpsFilterOptions` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listIdpsFilterOptions` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -80,15 +80,15 @@ func (f *FirewallPolicyIdpsSignaturesFilterValuesServerTransport) dispatchList(r if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - firewallPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) + firewallPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) if err != nil { return nil, err } - respr, errRespr := f.srv.List(req.Context(), resourceGroupNameUnescaped, firewallPolicyNameUnescaped, body, nil) + respr, errRespr := f.srv.List(req.Context(), resourceGroupNameParam, firewallPolicyNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicyidpssignaturesoverrides_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicyidpssignaturesoverrides_server.go index 827443ace..98ff6f46c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicyidpssignaturesoverrides_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicyidpssignaturesoverrides_server.go @@ -88,21 +88,21 @@ func (f *FirewallPolicyIdpsSignaturesOverridesServerTransport) dispatchGet(req * if f.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/signatureOverrides/default` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/signatureOverrides/default` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - firewallPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) + firewallPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) if err != nil { return nil, err } - respr, errRespr := f.srv.Get(req.Context(), resourceGroupNameUnescaped, firewallPolicyNameUnescaped, nil) + respr, errRespr := f.srv.Get(req.Context(), resourceGroupNameParam, firewallPolicyNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -121,21 +121,21 @@ func (f *FirewallPolicyIdpsSignaturesOverridesServerTransport) dispatchList(req if f.srv.List == nil { return nil, &nonRetriableError{errors.New("fake for method List not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/signatureOverrides` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/signatureOverrides` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - firewallPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) + firewallPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) if err != nil { return nil, err } - respr, errRespr := f.srv.List(req.Context(), resourceGroupNameUnescaped, firewallPolicyNameUnescaped, nil) + respr, errRespr := f.srv.List(req.Context(), resourceGroupNameParam, firewallPolicyNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -154,7 +154,7 @@ func (f *FirewallPolicyIdpsSignaturesOverridesServerTransport) dispatchPatch(req if f.srv.Patch == nil { return nil, &nonRetriableError{errors.New("fake for method Patch not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/signatureOverrides/default` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/signatureOverrides/default` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -164,15 +164,15 @@ func (f *FirewallPolicyIdpsSignaturesOverridesServerTransport) dispatchPatch(req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - firewallPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) + firewallPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) if err != nil { return nil, err } - respr, errRespr := f.srv.Patch(req.Context(), resourceGroupNameUnescaped, firewallPolicyNameUnescaped, body, nil) + respr, errRespr := f.srv.Patch(req.Context(), resourceGroupNameParam, firewallPolicyNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -191,7 +191,7 @@ func (f *FirewallPolicyIdpsSignaturesOverridesServerTransport) dispatchPut(req * if f.srv.Put == nil { return nil, &nonRetriableError{errors.New("fake for method Put not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/signatureOverrides/default` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/signatureOverrides/default` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -201,15 +201,15 @@ func (f *FirewallPolicyIdpsSignaturesOverridesServerTransport) dispatchPut(req * if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - firewallPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) + firewallPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) if err != nil { return nil, err } - respr, errRespr := f.srv.Put(req.Context(), resourceGroupNameUnescaped, firewallPolicyNameUnescaped, body, nil) + respr, errRespr := f.srv.Put(req.Context(), resourceGroupNameParam, firewallPolicyNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicyrulecollectiongroups_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicyrulecollectiongroups_server.go index 0e6f40162..bd2d10733 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicyrulecollectiongroups_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/firewallpolicyrulecollectiongroups_server.go @@ -99,7 +99,7 @@ func (f *FirewallPolicyRuleCollectionGroupsServerTransport) dispatchBeginCreateO } beginCreateOrUpdate := f.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollectionGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollectionGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (f *FirewallPolicyRuleCollectionGroupsServerTransport) dispatchBeginCreateO if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - firewallPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) + firewallPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) if err != nil { return nil, err } - ruleCollectionGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionGroupName")]) + ruleCollectionGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionGroupName")]) if err != nil { return nil, err } - respr, errRespr := f.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, firewallPolicyNameUnescaped, ruleCollectionGroupNameUnescaped, body, nil) + respr, errRespr := f.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, firewallPolicyNameParam, ruleCollectionGroupNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (f *FirewallPolicyRuleCollectionGroupsServerTransport) dispatchBeginDelete( } beginDelete := f.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollectionGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollectionGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - firewallPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) + firewallPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) if err != nil { return nil, err } - ruleCollectionGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionGroupName")]) + ruleCollectionGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionGroupName")]) if err != nil { return nil, err } - respr, errRespr := f.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, firewallPolicyNameUnescaped, ruleCollectionGroupNameUnescaped, nil) + respr, errRespr := f.srv.BeginDelete(req.Context(), resourceGroupNameParam, firewallPolicyNameParam, ruleCollectionGroupNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (f *FirewallPolicyRuleCollectionGroupsServerTransport) dispatchGet(req *htt if f.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollectionGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollectionGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - firewallPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) + firewallPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) if err != nil { return nil, err } - ruleCollectionGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionGroupName")]) + ruleCollectionGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionGroupName")]) if err != nil { return nil, err } - respr, errRespr := f.srv.Get(req.Context(), resourceGroupNameUnescaped, firewallPolicyNameUnescaped, ruleCollectionGroupNameUnescaped, nil) + respr, errRespr := f.srv.Get(req.Context(), resourceGroupNameParam, firewallPolicyNameParam, ruleCollectionGroupNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (f *FirewallPolicyRuleCollectionGroupsServerTransport) dispatchNewListPager } newListPager := f.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollectionGroups` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollectionGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - firewallPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) + firewallPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("firewallPolicyName")]) if err != nil { return nil, err } - resp := f.srv.NewListPager(resourceGroupNameUnescaped, firewallPolicyNameUnescaped, nil) + resp := f.srv.NewListPager(resourceGroupNameParam, firewallPolicyNameParam, nil) newListPager = &resp f.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.FirewallPolicyRuleCollectionGroupsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/flowlogs_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/flowlogs_server.go index b6f78c577..b466a7ea9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/flowlogs_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/flowlogs_server.go @@ -105,7 +105,7 @@ func (f *FlowLogsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) } beginCreateOrUpdate := f.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/flowLogs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/flowLogs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -115,19 +115,19 @@ func (f *FlowLogsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - flowLogNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("flowLogName")]) + flowLogNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("flowLogName")]) if err != nil { return nil, err } - respr, errRespr := f.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, flowLogNameUnescaped, body, nil) + respr, errRespr := f.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, networkWatcherNameParam, flowLogNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -157,25 +157,25 @@ func (f *FlowLogsServerTransport) dispatchBeginDelete(req *http.Request) (*http. } beginDelete := f.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/flowLogs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/flowLogs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - flowLogNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("flowLogName")]) + flowLogNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("flowLogName")]) if err != nil { return nil, err } - respr, errRespr := f.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, flowLogNameUnescaped, nil) + respr, errRespr := f.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkWatcherNameParam, flowLogNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,25 +203,25 @@ func (f *FlowLogsServerTransport) dispatchGet(req *http.Request) (*http.Response if f.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/flowLogs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/flowLogs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - flowLogNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("flowLogName")]) + flowLogNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("flowLogName")]) if err != nil { return nil, err } - respr, errRespr := f.srv.Get(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, flowLogNameUnescaped, nil) + respr, errRespr := f.srv.Get(req.Context(), resourceGroupNameParam, networkWatcherNameParam, flowLogNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -242,21 +242,21 @@ func (f *FlowLogsServerTransport) dispatchNewListPager(req *http.Request) (*http } newListPager := f.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/flowLogs` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/flowLogs` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - resp := f.srv.NewListPager(resourceGroupNameUnescaped, networkWatcherNameUnescaped, nil) + resp := f.srv.NewListPager(resourceGroupNameParam, networkWatcherNameParam, nil) newListPager = &resp f.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.FlowLogsClientListResponse, createLink func() string) { @@ -281,7 +281,7 @@ func (f *FlowLogsServerTransport) dispatchUpdateTags(req *http.Request) (*http.R if f.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/flowLogs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/flowLogs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -291,19 +291,19 @@ func (f *FlowLogsServerTransport) dispatchUpdateTags(req *http.Request) (*http.R if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - flowLogNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("flowLogName")]) + flowLogNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("flowLogName")]) if err != nil { return nil, err } - respr, errRespr := f.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, flowLogNameUnescaped, body, nil) + respr, errRespr := f.srv.UpdateTags(req.Context(), resourceGroupNameParam, networkWatcherNameParam, flowLogNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/groups_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/groups_server.go index 7e93884de..d1c2ad262 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/groups_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/groups_server.go @@ -96,7 +96,7 @@ func (g *GroupsServerTransport) dispatchCreateOrUpdate(req *http.Request) (*http if g.srv.CreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdate not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -106,15 +106,15 @@ func (g *GroupsServerTransport) dispatchCreateOrUpdate(req *http.Request) (*http if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - networkGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkGroupName")]) + networkGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkGroupName")]) if err != nil { return nil, err } @@ -125,7 +125,7 @@ func (g *GroupsServerTransport) dispatchCreateOrUpdate(req *http.Request) (*http IfMatch: ifMatchParam, } } - respr, errRespr := g.srv.CreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, networkGroupNameUnescaped, body, options) + respr, errRespr := g.srv.CreateOrUpdate(req.Context(), resourceGroupNameParam, networkManagerNameParam, networkGroupNameParam, body, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -149,22 +149,22 @@ func (g *GroupsServerTransport) dispatchBeginDelete(req *http.Request) (*http.Re } beginDelete := g.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - networkGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkGroupName")]) + networkGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkGroupName")]) if err != nil { return nil, err } @@ -182,7 +182,7 @@ func (g *GroupsServerTransport) dispatchBeginDelete(req *http.Request) (*http.Re Force: forceParam, } } - respr, errRespr := g.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, networkGroupNameUnescaped, options) + respr, errRespr := g.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkManagerNameParam, networkGroupNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -210,25 +210,25 @@ func (g *GroupsServerTransport) dispatchGet(req *http.Request) (*http.Response, if g.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - networkGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkGroupName")]) + networkGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkGroupName")]) if err != nil { return nil, err } - respr, errRespr := g.srv.Get(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, networkGroupNameUnescaped, nil) + respr, errRespr := g.srv.Get(req.Context(), resourceGroupNameParam, networkManagerNameParam, networkGroupNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -249,18 +249,18 @@ func (g *GroupsServerTransport) dispatchNewListPager(req *http.Request) (*http.R } newListPager := g.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } @@ -290,7 +290,7 @@ func (g *GroupsServerTransport) dispatchNewListPager(req *http.Request) (*http.R SkipToken: skipTokenParam, } } - resp := g.srv.NewListPager(resourceGroupNameUnescaped, networkManagerNameUnescaped, options) + resp := g.srv.NewListPager(resourceGroupNameParam, networkManagerNameParam, options) newListPager = &resp g.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.GroupsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/hubroutetables_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/hubroutetables_server.go index eab87a5e0..a088362a4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/hubroutetables_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/hubroutetables_server.go @@ -99,7 +99,7 @@ func (h *HubRouteTablesServerTransport) dispatchBeginCreateOrUpdate(req *http.Re } beginCreateOrUpdate := h.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubRouteTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubRouteTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (h *HubRouteTablesServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - routeTableNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) + routeTableNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) if err != nil { return nil, err } - respr, errRespr := h.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, routeTableNameUnescaped, body, nil) + respr, errRespr := h.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, virtualHubNameParam, routeTableNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (h *HubRouteTablesServerTransport) dispatchBeginDelete(req *http.Request) ( } beginDelete := h.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubRouteTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubRouteTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - routeTableNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) + routeTableNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) if err != nil { return nil, err } - respr, errRespr := h.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, routeTableNameUnescaped, nil) + respr, errRespr := h.srv.BeginDelete(req.Context(), resourceGroupNameParam, virtualHubNameParam, routeTableNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (h *HubRouteTablesServerTransport) dispatchGet(req *http.Request) (*http.Re if h.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubRouteTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubRouteTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - routeTableNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) + routeTableNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) if err != nil { return nil, err } - respr, errRespr := h.srv.Get(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, routeTableNameUnescaped, nil) + respr, errRespr := h.srv.Get(req.Context(), resourceGroupNameParam, virtualHubNameParam, routeTableNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (h *HubRouteTablesServerTransport) dispatchNewListPager(req *http.Request) } newListPager := h.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubRouteTables` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubRouteTables` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - resp := h.srv.NewListPager(resourceGroupNameUnescaped, virtualHubNameUnescaped, nil) + resp := h.srv.NewListPager(resourceGroupNameParam, virtualHubNameParam, nil) newListPager = &resp h.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.HubRouteTablesClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/hubvirtualnetworkconnections_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/hubvirtualnetworkconnections_server.go index 0ddbd3a37..6a825306e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/hubvirtualnetworkconnections_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/hubvirtualnetworkconnections_server.go @@ -99,7 +99,7 @@ func (h *HubVirtualNetworkConnectionsServerTransport) dispatchBeginCreateOrUpdat } beginCreateOrUpdate := h.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubVirtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubVirtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (h *HubVirtualNetworkConnectionsServerTransport) dispatchBeginCreateOrUpdat if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := h.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, connectionNameUnescaped, body, nil) + respr, errRespr := h.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, virtualHubNameParam, connectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (h *HubVirtualNetworkConnectionsServerTransport) dispatchBeginDelete(req *h } beginDelete := h.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubVirtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubVirtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := h.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, connectionNameUnescaped, nil) + respr, errRespr := h.srv.BeginDelete(req.Context(), resourceGroupNameParam, virtualHubNameParam, connectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (h *HubVirtualNetworkConnectionsServerTransport) dispatchGet(req *http.Requ if h.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubVirtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubVirtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := h.srv.Get(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, connectionNameUnescaped, nil) + respr, errRespr := h.srv.Get(req.Context(), resourceGroupNameParam, virtualHubNameParam, connectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (h *HubVirtualNetworkConnectionsServerTransport) dispatchNewListPager(req * } newListPager := h.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubVirtualNetworkConnections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubVirtualNetworkConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - resp := h.srv.NewListPager(resourceGroupNameUnescaped, virtualHubNameUnescaped, nil) + resp := h.srv.NewListPager(resourceGroupNameParam, virtualHubNameParam, nil) newListPager = &resp h.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.HubVirtualNetworkConnectionsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/inboundnatrules_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/inboundnatrules_server.go index dcb254576..dc8621932 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/inboundnatrules_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/inboundnatrules_server.go @@ -99,7 +99,7 @@ func (i *InboundNatRulesServerTransport) dispatchBeginCreateOrUpdate(req *http.R } beginCreateOrUpdate := i.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundNatRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundNatRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (i *InboundNatRulesServerTransport) dispatchBeginCreateOrUpdate(req *http.R if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - inboundNatRuleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("inboundNatRuleName")]) + inboundNatRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("inboundNatRuleName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, loadBalancerNameUnescaped, inboundNatRuleNameUnescaped, body, nil) + respr, errRespr := i.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, loadBalancerNameParam, inboundNatRuleNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (i *InboundNatRulesServerTransport) dispatchBeginDelete(req *http.Request) } beginDelete := i.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundNatRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundNatRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - inboundNatRuleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("inboundNatRuleName")]) + inboundNatRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("inboundNatRuleName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, loadBalancerNameUnescaped, inboundNatRuleNameUnescaped, nil) + respr, errRespr := i.srv.BeginDelete(req.Context(), resourceGroupNameParam, loadBalancerNameParam, inboundNatRuleNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,22 +197,22 @@ func (i *InboundNatRulesServerTransport) dispatchGet(req *http.Request) (*http.R if i.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundNatRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundNatRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - inboundNatRuleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("inboundNatRuleName")]) + inboundNatRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("inboundNatRuleName")]) if err != nil { return nil, err } @@ -227,7 +227,7 @@ func (i *InboundNatRulesServerTransport) dispatchGet(req *http.Request) (*http.R Expand: expandParam, } } - respr, errRespr := i.srv.Get(req.Context(), resourceGroupNameUnescaped, loadBalancerNameUnescaped, inboundNatRuleNameUnescaped, options) + respr, errRespr := i.srv.Get(req.Context(), resourceGroupNameParam, loadBalancerNameParam, inboundNatRuleNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -248,21 +248,21 @@ func (i *InboundNatRulesServerTransport) dispatchNewListPager(req *http.Request) } newListPager := i.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundNatRules` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundNatRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - resp := i.srv.NewListPager(resourceGroupNameUnescaped, loadBalancerNameUnescaped, nil) + resp := i.srv.NewListPager(resourceGroupNameParam, loadBalancerNameParam, nil) newListPager = &resp i.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.InboundNatRulesClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/inboundsecurityrule_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/inboundsecurityrule_server.go index 8766b60c3..6900531fc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/inboundsecurityrule_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/inboundsecurityrule_server.go @@ -76,7 +76,7 @@ func (i *InboundSecurityRuleServerTransport) dispatchBeginCreateOrUpdate(req *ht } beginCreateOrUpdate := i.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundSecurityRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundSecurityRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -86,19 +86,19 @@ func (i *InboundSecurityRuleServerTransport) dispatchBeginCreateOrUpdate(req *ht if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkVirtualApplianceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) + networkVirtualApplianceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) if err != nil { return nil, err } - ruleCollectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionName")]) + ruleCollectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ruleCollectionName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkVirtualApplianceNameUnescaped, ruleCollectionNameUnescaped, body, nil) + respr, errRespr := i.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, networkVirtualApplianceNameParam, ruleCollectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/interfaceipconfigurations_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/interfaceipconfigurations_server.go index 25da317f9..6190556b4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/interfaceipconfigurations_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/interfaceipconfigurations_server.go @@ -81,25 +81,25 @@ func (i *InterfaceIPConfigurationsServerTransport) dispatchGet(req *http.Request if i.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } - ipConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigurationName")]) + ipConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigurationName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.Get(req.Context(), resourceGroupNameUnescaped, networkInterfaceNameUnescaped, ipConfigurationNameUnescaped, nil) + respr, errRespr := i.srv.Get(req.Context(), resourceGroupNameParam, networkInterfaceNameParam, ipConfigurationNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -120,21 +120,21 @@ func (i *InterfaceIPConfigurationsServerTransport) dispatchNewListPager(req *htt } newListPager := i.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } - resp := i.srv.NewListPager(resourceGroupNameUnescaped, networkInterfaceNameUnescaped, nil) + resp := i.srv.NewListPager(resourceGroupNameParam, networkInterfaceNameParam, nil) newListPager = &resp i.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.InterfaceIPConfigurationsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/interfaceloadbalancers_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/interfaceloadbalancers_server.go index 02cdb39e5..b43b668e4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/interfaceloadbalancers_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/interfaceloadbalancers_server.go @@ -76,21 +76,21 @@ func (i *InterfaceLoadBalancersServerTransport) dispatchNewListPager(req *http.R } newListPager := i.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/loadBalancers` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/loadBalancers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } - resp := i.srv.NewListPager(resourceGroupNameUnescaped, networkInterfaceNameUnescaped, nil) + resp := i.srv.NewListPager(resourceGroupNameParam, networkInterfaceNameParam, nil) newListPager = &resp i.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.InterfaceLoadBalancersClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/interfaces_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/interfaces_server.go index 0078203d3..8d4a46be1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/interfaces_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/interfaces_server.go @@ -187,7 +187,7 @@ func (i *InterfacesServerTransport) dispatchBeginCreateOrUpdate(req *http.Reques } beginCreateOrUpdate := i.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -197,15 +197,15 @@ func (i *InterfacesServerTransport) dispatchBeginCreateOrUpdate(req *http.Reques if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkInterfaceNameUnescaped, body, nil) + respr, errRespr := i.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, networkInterfaceNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -235,21 +235,21 @@ func (i *InterfacesServerTransport) dispatchBeginDelete(req *http.Request) (*htt } beginDelete := i.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkInterfaceNameUnescaped, nil) + respr, errRespr := i.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkInterfaceNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -277,18 +277,18 @@ func (i *InterfacesServerTransport) dispatchGet(req *http.Request) (*http.Respon if i.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } @@ -303,7 +303,7 @@ func (i *InterfacesServerTransport) dispatchGet(req *http.Request) (*http.Respon Expand: expandParam, } } - respr, errRespr := i.srv.Get(req.Context(), resourceGroupNameUnescaped, networkInterfaceNameUnescaped, options) + respr, errRespr := i.srv.Get(req.Context(), resourceGroupNameParam, networkInterfaceNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -322,26 +322,26 @@ func (i *InterfacesServerTransport) dispatchGetCloudServiceNetworkInterface(req if i.srv.GetCloudServiceNetworkInterface == nil { return nil, &nonRetriableError{errors.New("fake for method GetCloudServiceNetworkInterface not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/roleInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/roleInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - cloudServiceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("cloudServiceName")]) + cloudServiceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("cloudServiceName")]) if err != nil { return nil, err } - roleInstanceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("roleInstanceName")]) + roleInstanceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("roleInstanceName")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } @@ -356,7 +356,7 @@ func (i *InterfacesServerTransport) dispatchGetCloudServiceNetworkInterface(req Expand: expandParam, } } - respr, errRespr := i.srv.GetCloudServiceNetworkInterface(req.Context(), resourceGroupNameUnescaped, cloudServiceNameUnescaped, roleInstanceNameUnescaped, networkInterfaceNameUnescaped, options) + respr, errRespr := i.srv.GetCloudServiceNetworkInterface(req.Context(), resourceGroupNameParam, cloudServiceNameParam, roleInstanceNameParam, networkInterfaceNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -377,21 +377,21 @@ func (i *InterfacesServerTransport) dispatchBeginGetEffectiveRouteTable(req *htt } beginGetEffectiveRouteTable := i.beginGetEffectiveRouteTable.get(req) if beginGetEffectiveRouteTable == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/effectiveRouteTable` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/effectiveRouteTable` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.BeginGetEffectiveRouteTable(req.Context(), resourceGroupNameUnescaped, networkInterfaceNameUnescaped, nil) + respr, errRespr := i.srv.BeginGetEffectiveRouteTable(req.Context(), resourceGroupNameParam, networkInterfaceNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -419,30 +419,30 @@ func (i *InterfacesServerTransport) dispatchGetVirtualMachineScaleSetIPConfigura if i.srv.GetVirtualMachineScaleSetIPConfiguration == nil { return nil, &nonRetriableError{errors.New("fake for method GetVirtualMachineScaleSetIPConfiguration not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/microsoft.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/microsoft\.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 6 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualMachineScaleSetNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualMachineScaleSetName")]) + virtualMachineScaleSetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualMachineScaleSetName")]) if err != nil { return nil, err } - virtualmachineIndexUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualmachineIndex")]) + virtualmachineIndexParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualmachineIndex")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } - ipConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigurationName")]) + ipConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigurationName")]) if err != nil { return nil, err } @@ -457,7 +457,7 @@ func (i *InterfacesServerTransport) dispatchGetVirtualMachineScaleSetIPConfigura Expand: expandParam, } } - respr, errRespr := i.srv.GetVirtualMachineScaleSetIPConfiguration(req.Context(), resourceGroupNameUnescaped, virtualMachineScaleSetNameUnescaped, virtualmachineIndexUnescaped, networkInterfaceNameUnescaped, ipConfigurationNameUnescaped, options) + respr, errRespr := i.srv.GetVirtualMachineScaleSetIPConfiguration(req.Context(), resourceGroupNameParam, virtualMachineScaleSetNameParam, virtualmachineIndexParam, networkInterfaceNameParam, ipConfigurationNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -476,26 +476,26 @@ func (i *InterfacesServerTransport) dispatchGetVirtualMachineScaleSetNetworkInte if i.srv.GetVirtualMachineScaleSetNetworkInterface == nil { return nil, &nonRetriableError{errors.New("fake for method GetVirtualMachineScaleSetNetworkInterface not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/microsoft.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/microsoft\.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualMachineScaleSetNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualMachineScaleSetName")]) + virtualMachineScaleSetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualMachineScaleSetName")]) if err != nil { return nil, err } - virtualmachineIndexUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualmachineIndex")]) + virtualmachineIndexParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualmachineIndex")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } @@ -510,7 +510,7 @@ func (i *InterfacesServerTransport) dispatchGetVirtualMachineScaleSetNetworkInte Expand: expandParam, } } - respr, errRespr := i.srv.GetVirtualMachineScaleSetNetworkInterface(req.Context(), resourceGroupNameUnescaped, virtualMachineScaleSetNameUnescaped, virtualmachineIndexUnescaped, networkInterfaceNameUnescaped, options) + respr, errRespr := i.srv.GetVirtualMachineScaleSetNetworkInterface(req.Context(), resourceGroupNameParam, virtualMachineScaleSetNameParam, virtualmachineIndexParam, networkInterfaceNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -531,17 +531,17 @@ func (i *InterfacesServerTransport) dispatchNewListPager(req *http.Request) (*ht } newListPager := i.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkInterfaces` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := i.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := i.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp i.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.InterfacesClientListResponse, createLink func() string) { @@ -568,7 +568,7 @@ func (i *InterfacesServerTransport) dispatchNewListAllPager(req *http.Request) ( } newListAllPager := i.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkInterfaces` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -601,21 +601,21 @@ func (i *InterfacesServerTransport) dispatchNewListCloudServiceNetworkInterfaces } newListCloudServiceNetworkInterfacesPager := i.newListCloudServiceNetworkInterfacesPager.get(req) if newListCloudServiceNetworkInterfacesPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - cloudServiceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("cloudServiceName")]) + cloudServiceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("cloudServiceName")]) if err != nil { return nil, err } - resp := i.srv.NewListCloudServiceNetworkInterfacesPager(resourceGroupNameUnescaped, cloudServiceNameUnescaped, nil) + resp := i.srv.NewListCloudServiceNetworkInterfacesPager(resourceGroupNameParam, cloudServiceNameParam, nil) newListCloudServiceNetworkInterfacesPager = &resp i.newListCloudServiceNetworkInterfacesPager.add(req, newListCloudServiceNetworkInterfacesPager) server.PagerResponderInjectNextLinks(newListCloudServiceNetworkInterfacesPager, req, func(page *armnetwork.InterfacesClientListCloudServiceNetworkInterfacesResponse, createLink func() string) { @@ -642,25 +642,25 @@ func (i *InterfacesServerTransport) dispatchNewListCloudServiceRoleInstanceNetwo } newListCloudServiceRoleInstanceNetworkInterfacesPager := i.newListCloudServiceRoleInstanceNetworkInterfacesPager.get(req) if newListCloudServiceRoleInstanceNetworkInterfacesPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/roleInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/roleInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - cloudServiceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("cloudServiceName")]) + cloudServiceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("cloudServiceName")]) if err != nil { return nil, err } - roleInstanceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("roleInstanceName")]) + roleInstanceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("roleInstanceName")]) if err != nil { return nil, err } - resp := i.srv.NewListCloudServiceRoleInstanceNetworkInterfacesPager(resourceGroupNameUnescaped, cloudServiceNameUnescaped, roleInstanceNameUnescaped, nil) + resp := i.srv.NewListCloudServiceRoleInstanceNetworkInterfacesPager(resourceGroupNameParam, cloudServiceNameParam, roleInstanceNameParam, nil) newListCloudServiceRoleInstanceNetworkInterfacesPager = &resp i.newListCloudServiceRoleInstanceNetworkInterfacesPager.add(req, newListCloudServiceRoleInstanceNetworkInterfacesPager) server.PagerResponderInjectNextLinks(newListCloudServiceRoleInstanceNetworkInterfacesPager, req, func(page *armnetwork.InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse, createLink func() string) { @@ -687,21 +687,21 @@ func (i *InterfacesServerTransport) dispatchBeginListEffectiveNetworkSecurityGro } beginListEffectiveNetworkSecurityGroups := i.beginListEffectiveNetworkSecurityGroups.get(req) if beginListEffectiveNetworkSecurityGroups == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/effectiveNetworkSecurityGroups` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/effectiveNetworkSecurityGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.BeginListEffectiveNetworkSecurityGroups(req.Context(), resourceGroupNameUnescaped, networkInterfaceNameUnescaped, nil) + respr, errRespr := i.srv.BeginListEffectiveNetworkSecurityGroups(req.Context(), resourceGroupNameParam, networkInterfaceNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -731,26 +731,26 @@ func (i *InterfacesServerTransport) dispatchNewListVirtualMachineScaleSetIPConfi } newListVirtualMachineScaleSetIPConfigurationsPager := i.newListVirtualMachineScaleSetIPConfigurationsPager.get(req) if newListVirtualMachineScaleSetIPConfigurationsPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/microsoft.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/microsoft\.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualMachineScaleSetNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualMachineScaleSetName")]) + virtualMachineScaleSetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualMachineScaleSetName")]) if err != nil { return nil, err } - virtualmachineIndexUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualmachineIndex")]) + virtualmachineIndexParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualmachineIndex")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } @@ -765,7 +765,7 @@ func (i *InterfacesServerTransport) dispatchNewListVirtualMachineScaleSetIPConfi Expand: expandParam, } } - resp := i.srv.NewListVirtualMachineScaleSetIPConfigurationsPager(resourceGroupNameUnescaped, virtualMachineScaleSetNameUnescaped, virtualmachineIndexUnescaped, networkInterfaceNameUnescaped, options) + resp := i.srv.NewListVirtualMachineScaleSetIPConfigurationsPager(resourceGroupNameParam, virtualMachineScaleSetNameParam, virtualmachineIndexParam, networkInterfaceNameParam, options) newListVirtualMachineScaleSetIPConfigurationsPager = &resp i.newListVirtualMachineScaleSetIPConfigurationsPager.add(req, newListVirtualMachineScaleSetIPConfigurationsPager) server.PagerResponderInjectNextLinks(newListVirtualMachineScaleSetIPConfigurationsPager, req, func(page *armnetwork.InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse, createLink func() string) { @@ -792,21 +792,21 @@ func (i *InterfacesServerTransport) dispatchNewListVirtualMachineScaleSetNetwork } newListVirtualMachineScaleSetNetworkInterfacesPager := i.newListVirtualMachineScaleSetNetworkInterfacesPager.get(req) if newListVirtualMachineScaleSetNetworkInterfacesPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/microsoft.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/microsoft\.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualMachineScaleSetNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualMachineScaleSetName")]) + virtualMachineScaleSetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualMachineScaleSetName")]) if err != nil { return nil, err } - resp := i.srv.NewListVirtualMachineScaleSetNetworkInterfacesPager(resourceGroupNameUnescaped, virtualMachineScaleSetNameUnescaped, nil) + resp := i.srv.NewListVirtualMachineScaleSetNetworkInterfacesPager(resourceGroupNameParam, virtualMachineScaleSetNameParam, nil) newListVirtualMachineScaleSetNetworkInterfacesPager = &resp i.newListVirtualMachineScaleSetNetworkInterfacesPager.add(req, newListVirtualMachineScaleSetNetworkInterfacesPager) server.PagerResponderInjectNextLinks(newListVirtualMachineScaleSetNetworkInterfacesPager, req, func(page *armnetwork.InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse, createLink func() string) { @@ -833,25 +833,25 @@ func (i *InterfacesServerTransport) dispatchNewListVirtualMachineScaleSetVMNetwo } newListVirtualMachineScaleSetVMNetworkInterfacesPager := i.newListVirtualMachineScaleSetVMNetworkInterfacesPager.get(req) if newListVirtualMachineScaleSetVMNetworkInterfacesPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/microsoft.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/microsoft\.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualMachineScaleSetNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualMachineScaleSetName")]) + virtualMachineScaleSetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualMachineScaleSetName")]) if err != nil { return nil, err } - virtualmachineIndexUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualmachineIndex")]) + virtualmachineIndexParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualmachineIndex")]) if err != nil { return nil, err } - resp := i.srv.NewListVirtualMachineScaleSetVMNetworkInterfacesPager(resourceGroupNameUnescaped, virtualMachineScaleSetNameUnescaped, virtualmachineIndexUnescaped, nil) + resp := i.srv.NewListVirtualMachineScaleSetVMNetworkInterfacesPager(resourceGroupNameParam, virtualMachineScaleSetNameParam, virtualmachineIndexParam, nil) newListVirtualMachineScaleSetVMNetworkInterfacesPager = &resp i.newListVirtualMachineScaleSetVMNetworkInterfacesPager.add(req, newListVirtualMachineScaleSetVMNetworkInterfacesPager) server.PagerResponderInjectNextLinks(newListVirtualMachineScaleSetVMNetworkInterfacesPager, req, func(page *armnetwork.InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse, createLink func() string) { @@ -876,7 +876,7 @@ func (i *InterfacesServerTransport) dispatchUpdateTags(req *http.Request) (*http if i.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -886,15 +886,15 @@ func (i *InterfacesServerTransport) dispatchUpdateTags(req *http.Request) (*http if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, networkInterfaceNameUnescaped, body, nil) + respr, errRespr := i.srv.UpdateTags(req.Context(), resourceGroupNameParam, networkInterfaceNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/interfacetapconfigurations_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/interfacetapconfigurations_server.go index a0ed98c73..f8d407eee 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/interfacetapconfigurations_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/interfacetapconfigurations_server.go @@ -99,7 +99,7 @@ func (i *InterfaceTapConfigurationsServerTransport) dispatchBeginCreateOrUpdate( } beginCreateOrUpdate := i.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tapConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tapConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (i *InterfaceTapConfigurationsServerTransport) dispatchBeginCreateOrUpdate( if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } - tapConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("tapConfigurationName")]) + tapConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("tapConfigurationName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkInterfaceNameUnescaped, tapConfigurationNameUnescaped, body, nil) + respr, errRespr := i.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, networkInterfaceNameParam, tapConfigurationNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (i *InterfaceTapConfigurationsServerTransport) dispatchBeginDelete(req *htt } beginDelete := i.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tapConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tapConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } - tapConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("tapConfigurationName")]) + tapConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("tapConfigurationName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkInterfaceNameUnescaped, tapConfigurationNameUnescaped, nil) + respr, errRespr := i.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkInterfaceNameParam, tapConfigurationNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (i *InterfaceTapConfigurationsServerTransport) dispatchGet(req *http.Reques if i.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tapConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tapConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } - tapConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("tapConfigurationName")]) + tapConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("tapConfigurationName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.Get(req.Context(), resourceGroupNameUnescaped, networkInterfaceNameUnescaped, tapConfigurationNameUnescaped, nil) + respr, errRespr := i.srv.Get(req.Context(), resourceGroupNameParam, networkInterfaceNameParam, tapConfigurationNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (i *InterfaceTapConfigurationsServerTransport) dispatchNewListPager(req *ht } newListPager := i.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tapConfigurations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tapConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } - resp := i.srv.NewListPager(resourceGroupNameUnescaped, networkInterfaceNameUnescaped, nil) + resp := i.srv.NewListPager(resourceGroupNameParam, networkInterfaceNameParam, nil) newListPager = &resp i.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.InterfaceTapConfigurationsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/internal.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/internal.go index 03b635903..e0173df3f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/internal.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/internal.go @@ -9,11 +9,10 @@ package fake import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "io" "net/http" "reflect" - "regexp" - "strings" "sync" ) @@ -25,11 +24,13 @@ func (nonRetriableError) NonRetriable() { // marker method } -func getOptional[T any](v T) *T { - if reflect.ValueOf(v).IsZero() { - return nil +func contains[T comparable](s []T, v T) bool { + for _, vv := range s { + if vv == v { + return true + } } - return &v + return false } func getHeaderValue(h http.Header, k string) string { @@ -40,6 +41,13 @@ func getHeaderValue(h http.Header, k string) string { return v[0] } +func getOptional[T any](v T) *T { + if reflect.ValueOf(v).IsZero() { + return nil + } + return &v +} + func parseOptional[T any](v string, parse func(v string) (T, error)) (*T, error) { if v == "" { return nil, nil @@ -51,14 +59,6 @@ func parseOptional[T any](v string, parse func(v string) (T, error)) (*T, error) return &t, err } -func parseWithCast[T any](v string, parse func(v string) (T, error)) (T, error) { - t, err := parse(v) - if err != nil { - return *new(T), err - } - return t, err -} - func readRequestBody(req *http.Request) ([]byte, error) { if req.Body == nil { return nil, nil @@ -71,15 +71,6 @@ func readRequestBody(req *http.Request) ([]byte, error) { return body, nil } -func contains[T comparable](s []T, v T) bool { - for _, vv := range s { - if vv == v { - return true - } - } - return false -} - func newTracker[T any]() *tracker[T] { return &tracker[T]{ items: map[string]*T{}, @@ -91,20 +82,10 @@ type tracker[T any] struct { mu sync.Mutex } -func (p *tracker[T]) key(req *http.Request) string { - path := req.URL.Path - if match, _ := regexp.Match(`/page_\d+$`, []byte(path)); match { - path = path[:strings.LastIndex(path, "/")] - } else if strings.HasSuffix(path, "/get/fake/status") { - path = path[:len(path)-16] - } - return path -} - func (p *tracker[T]) get(req *http.Request) *T { p.mu.Lock() defer p.mu.Unlock() - if item, ok := p.items[p.key(req)]; ok { + if item, ok := p.items[server.SanitizePagerPollerPath(req.URL.Path)]; ok { return item } return nil @@ -113,11 +94,11 @@ func (p *tracker[T]) get(req *http.Request) *T { func (p *tracker[T]) add(req *http.Request, item *T) { p.mu.Lock() defer p.mu.Unlock() - p.items[p.key(req)] = item + p.items[server.SanitizePagerPollerPath(req.URL.Path)] = item } func (p *tracker[T]) remove(req *http.Request) { p.mu.Lock() defer p.mu.Unlock() - delete(p.items, p.key(req)) + delete(p.items, server.SanitizePagerPollerPath(req.URL.Path)) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/ipallocations_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/ipallocations_server.go index b0e151571..8515ff9aa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/ipallocations_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/ipallocations_server.go @@ -113,7 +113,7 @@ func (i *IPAllocationsServerTransport) dispatchBeginCreateOrUpdate(req *http.Req } beginCreateOrUpdate := i.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/IpAllocations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/IpAllocations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (i *IPAllocationsServerTransport) dispatchBeginCreateOrUpdate(req *http.Req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - ipAllocationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ipAllocationName")]) + ipAllocationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ipAllocationName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, ipAllocationNameUnescaped, body, nil) + respr, errRespr := i.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, ipAllocationNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (i *IPAllocationsServerTransport) dispatchBeginDelete(req *http.Request) (* } beginDelete := i.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/IpAllocations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/IpAllocations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - ipAllocationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ipAllocationName")]) + ipAllocationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ipAllocationName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, ipAllocationNameUnescaped, nil) + respr, errRespr := i.srv.BeginDelete(req.Context(), resourceGroupNameParam, ipAllocationNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,18 +203,18 @@ func (i *IPAllocationsServerTransport) dispatchGet(req *http.Request) (*http.Res if i.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/IpAllocations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/IpAllocations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - ipAllocationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ipAllocationName")]) + ipAllocationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ipAllocationName")]) if err != nil { return nil, err } @@ -229,7 +229,7 @@ func (i *IPAllocationsServerTransport) dispatchGet(req *http.Request) (*http.Res Expand: expandParam, } } - respr, errRespr := i.srv.Get(req.Context(), resourceGroupNameUnescaped, ipAllocationNameUnescaped, options) + respr, errRespr := i.srv.Get(req.Context(), resourceGroupNameParam, ipAllocationNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -250,7 +250,7 @@ func (i *IPAllocationsServerTransport) dispatchNewListPager(req *http.Request) ( } newListPager := i.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/IpAllocations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/IpAllocations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -283,17 +283,17 @@ func (i *IPAllocationsServerTransport) dispatchNewListByResourceGroupPager(req * } newListByResourceGroupPager := i.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/IpAllocations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/IpAllocations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := i.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := i.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp i.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.IPAllocationsClientListByResourceGroupResponse, createLink func() string) { @@ -318,7 +318,7 @@ func (i *IPAllocationsServerTransport) dispatchUpdateTags(req *http.Request) (*h if i.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/IpAllocations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/IpAllocations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -328,15 +328,15 @@ func (i *IPAllocationsServerTransport) dispatchUpdateTags(req *http.Request) (*h if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - ipAllocationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ipAllocationName")]) + ipAllocationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ipAllocationName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, ipAllocationNameUnescaped, body, nil) + respr, errRespr := i.srv.UpdateTags(req.Context(), resourceGroupNameParam, ipAllocationNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/ipgroups_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/ipgroups_server.go index 2229e56fd..6c1a4dd33 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/ipgroups_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/ipgroups_server.go @@ -113,7 +113,7 @@ func (i *IPGroupsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) } beginCreateOrUpdate := i.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ipGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ipGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (i *IPGroupsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - ipGroupsNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ipGroupsName")]) + ipGroupsNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ipGroupsName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, ipGroupsNameUnescaped, body, nil) + respr, errRespr := i.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, ipGroupsNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (i *IPGroupsServerTransport) dispatchBeginDelete(req *http.Request) (*http. } beginDelete := i.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ipGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ipGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - ipGroupsNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ipGroupsName")]) + ipGroupsNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ipGroupsName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, ipGroupsNameUnescaped, nil) + respr, errRespr := i.srv.BeginDelete(req.Context(), resourceGroupNameParam, ipGroupsNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,18 +203,18 @@ func (i *IPGroupsServerTransport) dispatchGet(req *http.Request) (*http.Response if i.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ipGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ipGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - ipGroupsNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ipGroupsName")]) + ipGroupsNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ipGroupsName")]) if err != nil { return nil, err } @@ -229,7 +229,7 @@ func (i *IPGroupsServerTransport) dispatchGet(req *http.Request) (*http.Response Expand: expandParam, } } - respr, errRespr := i.srv.Get(req.Context(), resourceGroupNameUnescaped, ipGroupsNameUnescaped, options) + respr, errRespr := i.srv.Get(req.Context(), resourceGroupNameParam, ipGroupsNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -250,7 +250,7 @@ func (i *IPGroupsServerTransport) dispatchNewListPager(req *http.Request) (*http } newListPager := i.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ipGroups` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ipGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -283,17 +283,17 @@ func (i *IPGroupsServerTransport) dispatchNewListByResourceGroupPager(req *http. } newListByResourceGroupPager := i.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ipGroups` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ipGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := i.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := i.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp i.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.IPGroupsClientListByResourceGroupResponse, createLink func() string) { @@ -318,7 +318,7 @@ func (i *IPGroupsServerTransport) dispatchUpdateGroups(req *http.Request) (*http if i.srv.UpdateGroups == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateGroups not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ipGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ipGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -328,15 +328,15 @@ func (i *IPGroupsServerTransport) dispatchUpdateGroups(req *http.Request) (*http if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - ipGroupsNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ipGroupsName")]) + ipGroupsNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ipGroupsName")]) if err != nil { return nil, err } - respr, errRespr := i.srv.UpdateGroups(req.Context(), resourceGroupNameUnescaped, ipGroupsNameUnescaped, body, nil) + respr, errRespr := i.srv.UpdateGroups(req.Context(), resourceGroupNameParam, ipGroupsNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancerbackendaddresspools_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancerbackendaddresspools_server.go index cd8b233d2..cfff701cc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancerbackendaddresspools_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancerbackendaddresspools_server.go @@ -99,7 +99,7 @@ func (l *LoadBalancerBackendAddressPoolsServerTransport) dispatchBeginCreateOrUp } beginCreateOrUpdate := l.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backendAddressPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backendAddressPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (l *LoadBalancerBackendAddressPoolsServerTransport) dispatchBeginCreateOrUp if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - backendAddressPoolNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("backendAddressPoolName")]) + backendAddressPoolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("backendAddressPoolName")]) if err != nil { return nil, err } - respr, errRespr := l.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, loadBalancerNameUnescaped, backendAddressPoolNameUnescaped, body, nil) + respr, errRespr := l.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, loadBalancerNameParam, backendAddressPoolNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (l *LoadBalancerBackendAddressPoolsServerTransport) dispatchBeginDelete(req } beginDelete := l.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backendAddressPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backendAddressPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - backendAddressPoolNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("backendAddressPoolName")]) + backendAddressPoolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("backendAddressPoolName")]) if err != nil { return nil, err } - respr, errRespr := l.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, loadBalancerNameUnescaped, backendAddressPoolNameUnescaped, nil) + respr, errRespr := l.srv.BeginDelete(req.Context(), resourceGroupNameParam, loadBalancerNameParam, backendAddressPoolNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (l *LoadBalancerBackendAddressPoolsServerTransport) dispatchGet(req *http.R if l.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backendAddressPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backendAddressPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - backendAddressPoolNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("backendAddressPoolName")]) + backendAddressPoolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("backendAddressPoolName")]) if err != nil { return nil, err } - respr, errRespr := l.srv.Get(req.Context(), resourceGroupNameUnescaped, loadBalancerNameUnescaped, backendAddressPoolNameUnescaped, nil) + respr, errRespr := l.srv.Get(req.Context(), resourceGroupNameParam, loadBalancerNameParam, backendAddressPoolNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (l *LoadBalancerBackendAddressPoolsServerTransport) dispatchNewListPager(re } newListPager := l.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backendAddressPools` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backendAddressPools` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - resp := l.srv.NewListPager(resourceGroupNameUnescaped, loadBalancerNameUnescaped, nil) + resp := l.srv.NewListPager(resourceGroupNameParam, loadBalancerNameParam, nil) newListPager = &resp l.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.LoadBalancerBackendAddressPoolsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancerfrontendipconfigurations_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancerfrontendipconfigurations_server.go index 618683d1a..356d59170 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancerfrontendipconfigurations_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancerfrontendipconfigurations_server.go @@ -81,25 +81,25 @@ func (l *LoadBalancerFrontendIPConfigurationsServerTransport) dispatchGet(req *h if l.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/frontendIPConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/frontendIPConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - frontendIPConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("frontendIPConfigurationName")]) + frontendIPConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("frontendIPConfigurationName")]) if err != nil { return nil, err } - respr, errRespr := l.srv.Get(req.Context(), resourceGroupNameUnescaped, loadBalancerNameUnescaped, frontendIPConfigurationNameUnescaped, nil) + respr, errRespr := l.srv.Get(req.Context(), resourceGroupNameParam, loadBalancerNameParam, frontendIPConfigurationNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -120,21 +120,21 @@ func (l *LoadBalancerFrontendIPConfigurationsServerTransport) dispatchNewListPag } newListPager := l.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/frontendIPConfigurations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/frontendIPConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - resp := l.srv.NewListPager(resourceGroupNameUnescaped, loadBalancerNameUnescaped, nil) + resp := l.srv.NewListPager(resourceGroupNameParam, loadBalancerNameParam, nil) newListPager = &resp l.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.LoadBalancerFrontendIPConfigurationsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancerloadbalancingrules_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancerloadbalancingrules_server.go index 5ec69a4f0..518b85fc3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancerloadbalancingrules_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancerloadbalancingrules_server.go @@ -81,25 +81,25 @@ func (l *LoadBalancerLoadBalancingRulesServerTransport) dispatchGet(req *http.Re if l.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/loadBalancingRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/loadBalancingRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - loadBalancingRuleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancingRuleName")]) + loadBalancingRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancingRuleName")]) if err != nil { return nil, err } - respr, errRespr := l.srv.Get(req.Context(), resourceGroupNameUnescaped, loadBalancerNameUnescaped, loadBalancingRuleNameUnescaped, nil) + respr, errRespr := l.srv.Get(req.Context(), resourceGroupNameParam, loadBalancerNameParam, loadBalancingRuleNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -120,21 +120,21 @@ func (l *LoadBalancerLoadBalancingRulesServerTransport) dispatchNewListPager(req } newListPager := l.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/loadBalancingRules` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/loadBalancingRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - resp := l.srv.NewListPager(resourceGroupNameUnescaped, loadBalancerNameUnescaped, nil) + resp := l.srv.NewListPager(resourceGroupNameParam, loadBalancerNameParam, nil) newListPager = &resp l.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.LoadBalancerLoadBalancingRulesClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancernetworkinterfaces_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancernetworkinterfaces_server.go index 01c6dc75b..693ff0b99 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancernetworkinterfaces_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancernetworkinterfaces_server.go @@ -76,21 +76,21 @@ func (l *LoadBalancerNetworkInterfacesServerTransport) dispatchNewListPager(req } newListPager := l.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - resp := l.srv.NewListPager(resourceGroupNameUnescaped, loadBalancerNameUnescaped, nil) + resp := l.srv.NewListPager(resourceGroupNameParam, loadBalancerNameParam, nil) newListPager = &resp l.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.LoadBalancerNetworkInterfacesClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalanceroutboundrules_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalanceroutboundrules_server.go index 69d7760df..d38864d96 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalanceroutboundrules_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalanceroutboundrules_server.go @@ -81,25 +81,25 @@ func (l *LoadBalancerOutboundRulesServerTransport) dispatchGet(req *http.Request if l.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/outboundRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/outboundRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - outboundRuleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("outboundRuleName")]) + outboundRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("outboundRuleName")]) if err != nil { return nil, err } - respr, errRespr := l.srv.Get(req.Context(), resourceGroupNameUnescaped, loadBalancerNameUnescaped, outboundRuleNameUnescaped, nil) + respr, errRespr := l.srv.Get(req.Context(), resourceGroupNameParam, loadBalancerNameParam, outboundRuleNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -120,21 +120,21 @@ func (l *LoadBalancerOutboundRulesServerTransport) dispatchNewListPager(req *htt } newListPager := l.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/outboundRules` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/outboundRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - resp := l.srv.NewListPager(resourceGroupNameUnescaped, loadBalancerNameUnescaped, nil) + resp := l.srv.NewListPager(resourceGroupNameParam, loadBalancerNameParam, nil) newListPager = &resp l.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.LoadBalancerOutboundRulesClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancerprobes_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancerprobes_server.go index 7aac74e1f..040097ff2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancerprobes_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancerprobes_server.go @@ -81,25 +81,25 @@ func (l *LoadBalancerProbesServerTransport) dispatchGet(req *http.Request) (*htt if l.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/probes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/probes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - probeNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("probeName")]) + probeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("probeName")]) if err != nil { return nil, err } - respr, errRespr := l.srv.Get(req.Context(), resourceGroupNameUnescaped, loadBalancerNameUnescaped, probeNameUnescaped, nil) + respr, errRespr := l.srv.Get(req.Context(), resourceGroupNameParam, loadBalancerNameParam, probeNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -120,21 +120,21 @@ func (l *LoadBalancerProbesServerTransport) dispatchNewListPager(req *http.Reque } newListPager := l.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/probes` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/probes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - resp := l.srv.NewListPager(resourceGroupNameUnescaped, loadBalancerNameUnescaped, nil) + resp := l.srv.NewListPager(resourceGroupNameParam, loadBalancerNameParam, nil) newListPager = &resp l.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.LoadBalancerProbesClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancers_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancers_server.go index 01e4d2eb5..c06091488 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancers_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/loadbalancers_server.go @@ -136,7 +136,7 @@ func (l *LoadBalancersServerTransport) dispatchBeginCreateOrUpdate(req *http.Req } beginCreateOrUpdate := l.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -146,15 +146,15 @@ func (l *LoadBalancersServerTransport) dispatchBeginCreateOrUpdate(req *http.Req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - respr, errRespr := l.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, loadBalancerNameUnescaped, body, nil) + respr, errRespr := l.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, loadBalancerNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -184,21 +184,21 @@ func (l *LoadBalancersServerTransport) dispatchBeginDelete(req *http.Request) (* } beginDelete := l.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - respr, errRespr := l.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, loadBalancerNameUnescaped, nil) + respr, errRespr := l.srv.BeginDelete(req.Context(), resourceGroupNameParam, loadBalancerNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -226,18 +226,18 @@ func (l *LoadBalancersServerTransport) dispatchGet(req *http.Request) (*http.Res if l.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } @@ -252,7 +252,7 @@ func (l *LoadBalancersServerTransport) dispatchGet(req *http.Request) (*http.Res Expand: expandParam, } } - respr, errRespr := l.srv.Get(req.Context(), resourceGroupNameUnescaped, loadBalancerNameUnescaped, options) + respr, errRespr := l.srv.Get(req.Context(), resourceGroupNameParam, loadBalancerNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -273,17 +273,17 @@ func (l *LoadBalancersServerTransport) dispatchNewListPager(req *http.Request) ( } newListPager := l.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := l.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := l.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp l.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.LoadBalancersClientListResponse, createLink func() string) { @@ -310,7 +310,7 @@ func (l *LoadBalancersServerTransport) dispatchNewListAllPager(req *http.Request } newListAllPager := l.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -343,7 +343,7 @@ func (l *LoadBalancersServerTransport) dispatchBeginListInboundNatRulePortMappin } beginListInboundNatRulePortMappings := l.beginListInboundNatRulePortMappings.get(req) if beginListInboundNatRulePortMappings == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backendAddressPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/queryInboundNatRulePortMapping` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backendAddressPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/queryInboundNatRulePortMapping` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -353,19 +353,19 @@ func (l *LoadBalancersServerTransport) dispatchBeginListInboundNatRulePortMappin if err != nil { return nil, err } - groupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) + groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - backendPoolNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("backendPoolName")]) + backendPoolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("backendPoolName")]) if err != nil { return nil, err } - respr, errRespr := l.srv.BeginListInboundNatRulePortMappings(req.Context(), groupNameUnescaped, loadBalancerNameUnescaped, backendPoolNameUnescaped, body, nil) + respr, errRespr := l.srv.BeginListInboundNatRulePortMappings(req.Context(), groupNameParam, loadBalancerNameParam, backendPoolNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -393,7 +393,7 @@ func (l *LoadBalancersServerTransport) dispatchMigrateToIPBased(req *http.Reques if l.srv.MigrateToIPBased == nil { return nil, &nonRetriableError{errors.New("fake for method MigrateToIPBased not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/migrateToIpBased` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/migrateToIpBased` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -403,11 +403,11 @@ func (l *LoadBalancersServerTransport) dispatchMigrateToIPBased(req *http.Reques if err != nil { return nil, err } - groupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) + groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } @@ -417,7 +417,7 @@ func (l *LoadBalancersServerTransport) dispatchMigrateToIPBased(req *http.Reques Parameters: &body, } } - respr, errRespr := l.srv.MigrateToIPBased(req.Context(), groupNameUnescaped, loadBalancerNameUnescaped, options) + respr, errRespr := l.srv.MigrateToIPBased(req.Context(), groupNameParam, loadBalancerNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -438,7 +438,7 @@ func (l *LoadBalancersServerTransport) dispatchBeginSwapPublicIPAddresses(req *h } beginSwapPublicIPAddresses := l.beginSwapPublicIPAddresses.get(req) if beginSwapPublicIPAddresses == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/setLoadBalancerFrontendPublicIpAddresses` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/setLoadBalancerFrontendPublicIpAddresses` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { @@ -448,11 +448,11 @@ func (l *LoadBalancersServerTransport) dispatchBeginSwapPublicIPAddresses(req *h if err != nil { return nil, err } - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } - respr, errRespr := l.srv.BeginSwapPublicIPAddresses(req.Context(), locationUnescaped, body, nil) + respr, errRespr := l.srv.BeginSwapPublicIPAddresses(req.Context(), locationParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -480,7 +480,7 @@ func (l *LoadBalancersServerTransport) dispatchUpdateTags(req *http.Request) (*h if l.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -490,15 +490,15 @@ func (l *LoadBalancersServerTransport) dispatchUpdateTags(req *http.Request) (*h if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - loadBalancerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) + loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) if err != nil { return nil, err } - respr, errRespr := l.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, loadBalancerNameUnescaped, body, nil) + respr, errRespr := l.srv.UpdateTags(req.Context(), resourceGroupNameParam, loadBalancerNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/localnetworkgateways_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/localnetworkgateways_server.go index df4d6cc26..defa8574e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/localnetworkgateways_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/localnetworkgateways_server.go @@ -105,7 +105,7 @@ func (l *LocalNetworkGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *h } beginCreateOrUpdate := l.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/localNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/localNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -115,15 +115,15 @@ func (l *LocalNetworkGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *h if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - localNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("localNetworkGatewayName")]) + localNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("localNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := l.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, localNetworkGatewayNameUnescaped, body, nil) + respr, errRespr := l.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, localNetworkGatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -153,21 +153,21 @@ func (l *LocalNetworkGatewaysServerTransport) dispatchBeginDelete(req *http.Requ } beginDelete := l.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/localNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/localNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - localNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("localNetworkGatewayName")]) + localNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("localNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := l.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, localNetworkGatewayNameUnescaped, nil) + respr, errRespr := l.srv.BeginDelete(req.Context(), resourceGroupNameParam, localNetworkGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -195,21 +195,21 @@ func (l *LocalNetworkGatewaysServerTransport) dispatchGet(req *http.Request) (*h if l.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/localNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/localNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - localNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("localNetworkGatewayName")]) + localNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("localNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := l.srv.Get(req.Context(), resourceGroupNameUnescaped, localNetworkGatewayNameUnescaped, nil) + respr, errRespr := l.srv.Get(req.Context(), resourceGroupNameParam, localNetworkGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -230,17 +230,17 @@ func (l *LocalNetworkGatewaysServerTransport) dispatchNewListPager(req *http.Req } newListPager := l.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/localNetworkGateways` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/localNetworkGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := l.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := l.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp l.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.LocalNetworkGatewaysClientListResponse, createLink func() string) { @@ -265,7 +265,7 @@ func (l *LocalNetworkGatewaysServerTransport) dispatchUpdateTags(req *http.Reque if l.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/localNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/localNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -275,15 +275,15 @@ func (l *LocalNetworkGatewaysServerTransport) dispatchUpdateTags(req *http.Reque if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - localNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("localNetworkGatewayName")]) + localNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("localNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := l.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, localNetworkGatewayNameUnescaped, body, nil) + respr, errRespr := l.srv.UpdateTags(req.Context(), resourceGroupNameParam, localNetworkGatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/management_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/management_server.go index 983514909..20b3c3eda 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/management_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/management_server.go @@ -158,22 +158,22 @@ func (m *ManagementServerTransport) dispatchCheckDNSNameAvailability(req *http.R if m.srv.CheckDNSNameAvailability == nil { return nil, &nonRetriableError{errors.New("fake for method CheckDNSNameAvailability not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/CheckDnsNameAvailability` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/CheckDnsNameAvailability` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } - domainNameLabelUnescaped, err := url.QueryUnescape(qp.Get("domainNameLabel")) + domainNameLabelParam, err := url.QueryUnescape(qp.Get("domainNameLabel")) if err != nil { return nil, err } - respr, errRespr := m.srv.CheckDNSNameAvailability(req.Context(), locationUnescaped, domainNameLabelUnescaped, nil) + respr, errRespr := m.srv.CheckDNSNameAvailability(req.Context(), locationParam, domainNameLabelParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -194,7 +194,7 @@ func (m *ManagementServerTransport) dispatchBeginDeleteBastionShareableLink(req } beginDeleteBastionShareableLink := m.beginDeleteBastionShareableLink.get(req) if beginDeleteBastionShareableLink == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deleteShareableLinks` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deleteShareableLinks` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -204,15 +204,15 @@ func (m *ManagementServerTransport) dispatchBeginDeleteBastionShareableLink(req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - bastionHostNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) + bastionHostNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) if err != nil { return nil, err } - respr, errRespr := m.srv.BeginDeleteBastionShareableLink(req.Context(), resourceGroupNameUnescaped, bastionHostNameUnescaped, body, nil) + respr, errRespr := m.srv.BeginDeleteBastionShareableLink(req.Context(), resourceGroupNameParam, bastionHostNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -242,7 +242,7 @@ func (m *ManagementServerTransport) dispatchNewDisconnectActiveSessionsPager(req } newDisconnectActiveSessionsPager := m.newDisconnectActiveSessionsPager.get(req) if newDisconnectActiveSessionsPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/disconnectActiveSessions` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/disconnectActiveSessions` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -252,15 +252,15 @@ func (m *ManagementServerTransport) dispatchNewDisconnectActiveSessionsPager(req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - bastionHostNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) + bastionHostNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) if err != nil { return nil, err } - resp := m.srv.NewDisconnectActiveSessionsPager(resourceGroupNameUnescaped, bastionHostNameUnescaped, body, nil) + resp := m.srv.NewDisconnectActiveSessionsPager(resourceGroupNameParam, bastionHostNameParam, body, nil) newDisconnectActiveSessionsPager = &resp m.newDisconnectActiveSessionsPager.add(req, newDisconnectActiveSessionsPager) server.PagerResponderInjectNextLinks(newDisconnectActiveSessionsPager, req, func(page *armnetwork.ManagementClientDisconnectActiveSessionsResponse, createLink func() string) { @@ -285,17 +285,17 @@ func (m *ManagementServerTransport) dispatchExpressRouteProviderPort(req *http.R if m.srv.ExpressRouteProviderPort == nil { return nil, &nonRetriableError{errors.New("fake for method ExpressRouteProviderPort not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteProviderPorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteProviderPorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - providerportUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("providerport")]) + providerportParam, err := url.PathUnescape(matches[regex.SubexpIndex("providerport")]) if err != nil { return nil, err } - respr, errRespr := m.srv.ExpressRouteProviderPort(req.Context(), providerportUnescaped, nil) + respr, errRespr := m.srv.ExpressRouteProviderPort(req.Context(), providerportParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -316,7 +316,7 @@ func (m *ManagementServerTransport) dispatchBeginGeneratevirtualwanvpnserverconf } beginGeneratevirtualwanvpnserverconfigurationvpnprofile := m.beginGeneratevirtualwanvpnserverconfigurationvpnprofile.get(req) if beginGeneratevirtualwanvpnserverconfigurationvpnprofile == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/GenerateVpnProfile` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/GenerateVpnProfile` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -326,15 +326,15 @@ func (m *ManagementServerTransport) dispatchBeginGeneratevirtualwanvpnserverconf if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualWANNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualWANName")]) + virtualWANNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualWANName")]) if err != nil { return nil, err } - respr, errRespr := m.srv.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile(req.Context(), resourceGroupNameUnescaped, virtualWANNameUnescaped, body, nil) + respr, errRespr := m.srv.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile(req.Context(), resourceGroupNameParam, virtualWANNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -364,21 +364,21 @@ func (m *ManagementServerTransport) dispatchBeginGetActiveSessions(req *http.Req } beginGetActiveSessions := m.beginGetActiveSessions.get(req) if beginGetActiveSessions == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getActiveSessions` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getActiveSessions` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - bastionHostNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) + bastionHostNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) if err != nil { return nil, err } - respr, errRespr := m.srv.BeginGetActiveSessions(req.Context(), resourceGroupNameUnescaped, bastionHostNameUnescaped, nil) + respr, errRespr := m.srv.BeginGetActiveSessions(req.Context(), resourceGroupNameParam, bastionHostNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -408,7 +408,7 @@ func (m *ManagementServerTransport) dispatchNewGetBastionShareableLinkPager(req } newGetBastionShareableLinkPager := m.newGetBastionShareableLinkPager.get(req) if newGetBastionShareableLinkPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getShareableLinks` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getShareableLinks` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -418,15 +418,15 @@ func (m *ManagementServerTransport) dispatchNewGetBastionShareableLinkPager(req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - bastionHostNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) + bastionHostNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) if err != nil { return nil, err } - resp := m.srv.NewGetBastionShareableLinkPager(resourceGroupNameUnescaped, bastionHostNameUnescaped, body, nil) + resp := m.srv.NewGetBastionShareableLinkPager(resourceGroupNameParam, bastionHostNameParam, body, nil) newGetBastionShareableLinkPager = &resp m.newGetBastionShareableLinkPager.add(req, newGetBastionShareableLinkPager) server.PagerResponderInjectNextLinks(newGetBastionShareableLinkPager, req, func(page *armnetwork.ManagementClientGetBastionShareableLinkResponse, createLink func() string) { @@ -451,7 +451,7 @@ func (m *ManagementServerTransport) dispatchListActiveConnectivityConfigurations if m.srv.ListActiveConnectivityConfigurations == nil { return nil, &nonRetriableError{errors.New("fake for method ListActiveConnectivityConfigurations not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listActiveConnectivityConfigurations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listActiveConnectivityConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -462,11 +462,11 @@ func (m *ManagementServerTransport) dispatchListActiveConnectivityConfigurations if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } @@ -490,7 +490,7 @@ func (m *ManagementServerTransport) dispatchListActiveConnectivityConfigurations Top: topParam, } } - respr, errRespr := m.srv.ListActiveConnectivityConfigurations(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, body, options) + respr, errRespr := m.srv.ListActiveConnectivityConfigurations(req.Context(), resourceGroupNameParam, networkManagerNameParam, body, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -509,7 +509,7 @@ func (m *ManagementServerTransport) dispatchListActiveSecurityAdminRules(req *ht if m.srv.ListActiveSecurityAdminRules == nil { return nil, &nonRetriableError{errors.New("fake for method ListActiveSecurityAdminRules not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listActiveSecurityAdminRules` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listActiveSecurityAdminRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -520,11 +520,11 @@ func (m *ManagementServerTransport) dispatchListActiveSecurityAdminRules(req *ht if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } @@ -548,7 +548,7 @@ func (m *ManagementServerTransport) dispatchListActiveSecurityAdminRules(req *ht Top: topParam, } } - respr, errRespr := m.srv.ListActiveSecurityAdminRules(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, body, options) + respr, errRespr := m.srv.ListActiveSecurityAdminRules(req.Context(), resourceGroupNameParam, networkManagerNameParam, body, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -567,7 +567,7 @@ func (m *ManagementServerTransport) dispatchListNetworkManagerEffectiveConnectiv if m.srv.ListNetworkManagerEffectiveConnectivityConfigurations == nil { return nil, &nonRetriableError{errors.New("fake for method ListNetworkManagerEffectiveConnectivityConfigurations not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listNetworkManagerEffectiveConnectivityConfigurations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listNetworkManagerEffectiveConnectivityConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -578,11 +578,11 @@ func (m *ManagementServerTransport) dispatchListNetworkManagerEffectiveConnectiv if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } @@ -606,7 +606,7 @@ func (m *ManagementServerTransport) dispatchListNetworkManagerEffectiveConnectiv Top: topParam, } } - respr, errRespr := m.srv.ListNetworkManagerEffectiveConnectivityConfigurations(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, body, options) + respr, errRespr := m.srv.ListNetworkManagerEffectiveConnectivityConfigurations(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, body, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -625,7 +625,7 @@ func (m *ManagementServerTransport) dispatchListNetworkManagerEffectiveSecurityA if m.srv.ListNetworkManagerEffectiveSecurityAdminRules == nil { return nil, &nonRetriableError{errors.New("fake for method ListNetworkManagerEffectiveSecurityAdminRules not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listNetworkManagerEffectiveSecurityAdminRules` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listNetworkManagerEffectiveSecurityAdminRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -636,11 +636,11 @@ func (m *ManagementServerTransport) dispatchListNetworkManagerEffectiveSecurityA if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } @@ -664,7 +664,7 @@ func (m *ManagementServerTransport) dispatchListNetworkManagerEffectiveSecurityA Top: topParam, } } - respr, errRespr := m.srv.ListNetworkManagerEffectiveSecurityAdminRules(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, body, options) + respr, errRespr := m.srv.ListNetworkManagerEffectiveSecurityAdminRules(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, body, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -685,7 +685,7 @@ func (m *ManagementServerTransport) dispatchBeginPutBastionShareableLink(req *ht } beginPutBastionShareableLink := m.beginPutBastionShareableLink.get(req) if beginPutBastionShareableLink == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/createShareableLinks` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/createShareableLinks` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -695,15 +695,15 @@ func (m *ManagementServerTransport) dispatchBeginPutBastionShareableLink(req *ht if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - bastionHostNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) + bastionHostNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("bastionHostName")]) if err != nil { return nil, err } - respr, errRespr := m.srv.BeginPutBastionShareableLink(req.Context(), resourceGroupNameUnescaped, bastionHostNameUnescaped, body, nil) + respr, errRespr := m.srv.BeginPutBastionShareableLink(req.Context(), resourceGroupNameParam, bastionHostNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -731,21 +731,21 @@ func (m *ManagementServerTransport) dispatchSupportedSecurityProviders(req *http if m.srv.SupportedSecurityProviders == nil { return nil, &nonRetriableError{errors.New("fake for method SupportedSecurityProviders not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/supportedSecurityProviders` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/supportedSecurityProviders` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualWANNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualWANName")]) + virtualWANNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualWANName")]) if err != nil { return nil, err } - respr, errRespr := m.srv.SupportedSecurityProviders(req.Context(), resourceGroupNameUnescaped, virtualWANNameUnescaped, nil) + respr, errRespr := m.srv.SupportedSecurityProviders(req.Context(), resourceGroupNameParam, virtualWANNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/managementgroupnetworkmanagerconnections_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/managementgroupnetworkmanagerconnections_server.go index bf64f4897..1ce7b2c13 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/managementgroupnetworkmanagerconnections_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/managementgroupnetworkmanagerconnections_server.go @@ -94,7 +94,7 @@ func (m *ManagementGroupNetworkManagerConnectionsServerTransport) dispatchCreate if m.srv.CreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdate not implemented")} } - const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagerConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/providers/Microsoft\.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagerConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { @@ -104,15 +104,15 @@ func (m *ManagementGroupNetworkManagerConnectionsServerTransport) dispatchCreate if err != nil { return nil, err } - managementGroupIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("managementGroupId")]) + managementGroupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("managementGroupId")]) if err != nil { return nil, err } - networkManagerConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerConnectionName")]) + networkManagerConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerConnectionName")]) if err != nil { return nil, err } - respr, errRespr := m.srv.CreateOrUpdate(req.Context(), managementGroupIDUnescaped, networkManagerConnectionNameUnescaped, body, nil) + respr, errRespr := m.srv.CreateOrUpdate(req.Context(), managementGroupIDParam, networkManagerConnectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -131,21 +131,21 @@ func (m *ManagementGroupNetworkManagerConnectionsServerTransport) dispatchDelete if m.srv.Delete == nil { return nil, &nonRetriableError{errors.New("fake for method Delete not implemented")} } - const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagerConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/providers/Microsoft\.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagerConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - managementGroupIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("managementGroupId")]) + managementGroupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("managementGroupId")]) if err != nil { return nil, err } - networkManagerConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerConnectionName")]) + networkManagerConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerConnectionName")]) if err != nil { return nil, err } - respr, errRespr := m.srv.Delete(req.Context(), managementGroupIDUnescaped, networkManagerConnectionNameUnescaped, nil) + respr, errRespr := m.srv.Delete(req.Context(), managementGroupIDParam, networkManagerConnectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -164,21 +164,21 @@ func (m *ManagementGroupNetworkManagerConnectionsServerTransport) dispatchGet(re if m.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagerConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/providers/Microsoft\.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagerConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - managementGroupIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("managementGroupId")]) + managementGroupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("managementGroupId")]) if err != nil { return nil, err } - networkManagerConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerConnectionName")]) + networkManagerConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerConnectionName")]) if err != nil { return nil, err } - respr, errRespr := m.srv.Get(req.Context(), managementGroupIDUnescaped, networkManagerConnectionNameUnescaped, nil) + respr, errRespr := m.srv.Get(req.Context(), managementGroupIDParam, networkManagerConnectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -199,14 +199,14 @@ func (m *ManagementGroupNetworkManagerConnectionsServerTransport) dispatchNewLis } newListPager := m.newListPager.get(req) if newListPager == nil { - const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagerConnections` + const regexStr = `/providers/Microsoft\.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagerConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - managementGroupIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("managementGroupId")]) + managementGroupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("managementGroupId")]) if err != nil { return nil, err } @@ -236,7 +236,7 @@ func (m *ManagementGroupNetworkManagerConnectionsServerTransport) dispatchNewLis SkipToken: skipTokenParam, } } - resp := m.srv.NewListPager(managementGroupIDUnescaped, options) + resp := m.srv.NewListPager(managementGroupIDParam, options) newListPager = &resp m.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ManagementGroupNetworkManagerConnectionsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/managercommits_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/managercommits_server.go index 0bb69b7fb..0d2e55e3b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/managercommits_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/managercommits_server.go @@ -76,7 +76,7 @@ func (m *ManagerCommitsServerTransport) dispatchBeginPost(req *http.Request) (*h } beginPost := m.beginPost.get(req) if beginPost == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/commit` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/commit` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -86,15 +86,15 @@ func (m *ManagerCommitsServerTransport) dispatchBeginPost(req *http.Request) (*h if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - respr, errRespr := m.srv.BeginPost(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, body, nil) + respr, errRespr := m.srv.BeginPost(req.Context(), resourceGroupNameParam, networkManagerNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/managerdeploymentstatus_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/managerdeploymentstatus_server.go index 7a1b9c627..d672820d3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/managerdeploymentstatus_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/managerdeploymentstatus_server.go @@ -71,7 +71,7 @@ func (m *ManagerDeploymentStatusServerTransport) dispatchList(req *http.Request) if m.srv.List == nil { return nil, &nonRetriableError{errors.New("fake for method List not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listDeploymentStatus` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listDeploymentStatus` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -82,11 +82,11 @@ func (m *ManagerDeploymentStatusServerTransport) dispatchList(req *http.Request) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } @@ -110,7 +110,7 @@ func (m *ManagerDeploymentStatusServerTransport) dispatchList(req *http.Request) Top: topParam, } } - respr, errRespr := m.srv.List(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, body, options) + respr, errRespr := m.srv.List(req.Context(), resourceGroupNameParam, networkManagerNameParam, body, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/managers_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/managers_server.go index 2e8544b13..74afa7a6f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/managers_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/managers_server.go @@ -110,7 +110,7 @@ func (m *ManagersServerTransport) dispatchCreateOrUpdate(req *http.Request) (*ht if m.srv.CreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdate not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -120,15 +120,15 @@ func (m *ManagersServerTransport) dispatchCreateOrUpdate(req *http.Request) (*ht if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - respr, errRespr := m.srv.CreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, body, nil) + respr, errRespr := m.srv.CreateOrUpdate(req.Context(), resourceGroupNameParam, networkManagerNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -149,18 +149,18 @@ func (m *ManagersServerTransport) dispatchBeginDelete(req *http.Request) (*http. } beginDelete := m.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } @@ -178,7 +178,7 @@ func (m *ManagersServerTransport) dispatchBeginDelete(req *http.Request) (*http. Force: forceParam, } } - respr, errRespr := m.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, options) + respr, errRespr := m.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkManagerNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -206,21 +206,21 @@ func (m *ManagersServerTransport) dispatchGet(req *http.Request) (*http.Response if m.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - respr, errRespr := m.srv.Get(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, nil) + respr, errRespr := m.srv.Get(req.Context(), resourceGroupNameParam, networkManagerNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -241,14 +241,14 @@ func (m *ManagersServerTransport) dispatchNewListPager(req *http.Request) (*http } newListPager := m.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } @@ -278,7 +278,7 @@ func (m *ManagersServerTransport) dispatchNewListPager(req *http.Request) (*http SkipToken: skipTokenParam, } } - resp := m.srv.NewListPager(resourceGroupNameUnescaped, options) + resp := m.srv.NewListPager(resourceGroupNameParam, options) newListPager = &resp m.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ManagersClientListResponse, createLink func() string) { @@ -305,7 +305,7 @@ func (m *ManagersServerTransport) dispatchNewListBySubscriptionPager(req *http.R } newListBySubscriptionPager := m.newListBySubscriptionPager.get(req) if newListBySubscriptionPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -363,7 +363,7 @@ func (m *ManagersServerTransport) dispatchPatch(req *http.Request) (*http.Respon if m.srv.Patch == nil { return nil, &nonRetriableError{errors.New("fake for method Patch not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -373,15 +373,15 @@ func (m *ManagersServerTransport) dispatchPatch(req *http.Request) (*http.Respon if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - respr, errRespr := m.srv.Patch(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, body, nil) + respr, errRespr := m.srv.Patch(req.Context(), resourceGroupNameParam, networkManagerNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/natgateways_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/natgateways_server.go index 0fb46b7d6..fae876cba 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/natgateways_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/natgateways_server.go @@ -113,7 +113,7 @@ func (n *NatGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque } beginCreateOrUpdate := n.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/natGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/natGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (n *NatGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - natGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("natGatewayName")]) + natGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("natGatewayName")]) if err != nil { return nil, err } - respr, errRespr := n.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, natGatewayNameUnescaped, body, nil) + respr, errRespr := n.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, natGatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (n *NatGatewaysServerTransport) dispatchBeginDelete(req *http.Request) (*ht } beginDelete := n.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/natGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/natGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - natGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("natGatewayName")]) + natGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("natGatewayName")]) if err != nil { return nil, err } - respr, errRespr := n.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, natGatewayNameUnescaped, nil) + respr, errRespr := n.srv.BeginDelete(req.Context(), resourceGroupNameParam, natGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,18 +203,18 @@ func (n *NatGatewaysServerTransport) dispatchGet(req *http.Request) (*http.Respo if n.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/natGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/natGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - natGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("natGatewayName")]) + natGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("natGatewayName")]) if err != nil { return nil, err } @@ -229,7 +229,7 @@ func (n *NatGatewaysServerTransport) dispatchGet(req *http.Request) (*http.Respo Expand: expandParam, } } - respr, errRespr := n.srv.Get(req.Context(), resourceGroupNameUnescaped, natGatewayNameUnescaped, options) + respr, errRespr := n.srv.Get(req.Context(), resourceGroupNameParam, natGatewayNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -250,17 +250,17 @@ func (n *NatGatewaysServerTransport) dispatchNewListPager(req *http.Request) (*h } newListPager := n.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/natGateways` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/natGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := n.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := n.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp n.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.NatGatewaysClientListResponse, createLink func() string) { @@ -287,7 +287,7 @@ func (n *NatGatewaysServerTransport) dispatchNewListAllPager(req *http.Request) } newListAllPager := n.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/natGateways` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/natGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -318,7 +318,7 @@ func (n *NatGatewaysServerTransport) dispatchUpdateTags(req *http.Request) (*htt if n.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/natGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/natGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -328,15 +328,15 @@ func (n *NatGatewaysServerTransport) dispatchUpdateTags(req *http.Request) (*htt if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - natGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("natGatewayName")]) + natGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("natGatewayName")]) if err != nil { return nil, err } - respr, errRespr := n.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, natGatewayNameUnescaped, body, nil) + respr, errRespr := n.srv.UpdateTags(req.Context(), resourceGroupNameParam, natGatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/natrules_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/natrules_server.go index 0a71c1039..b5784c90f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/natrules_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/natrules_server.go @@ -99,7 +99,7 @@ func (n *NatRulesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) } beginCreateOrUpdate := n.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (n *NatRulesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - natRuleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("natRuleName")]) + natRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("natRuleName")]) if err != nil { return nil, err } - respr, errRespr := n.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, natRuleNameUnescaped, body, nil) + respr, errRespr := n.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, gatewayNameParam, natRuleNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (n *NatRulesServerTransport) dispatchBeginDelete(req *http.Request) (*http. } beginDelete := n.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - natRuleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("natRuleName")]) + natRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("natRuleName")]) if err != nil { return nil, err } - respr, errRespr := n.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, natRuleNameUnescaped, nil) + respr, errRespr := n.srv.BeginDelete(req.Context(), resourceGroupNameParam, gatewayNameParam, natRuleNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (n *NatRulesServerTransport) dispatchGet(req *http.Request) (*http.Response if n.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - natRuleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("natRuleName")]) + natRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("natRuleName")]) if err != nil { return nil, err } - respr, errRespr := n.srv.Get(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, natRuleNameUnescaped, nil) + respr, errRespr := n.srv.Get(req.Context(), resourceGroupNameParam, gatewayNameParam, natRuleNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (n *NatRulesServerTransport) dispatchNewListByVPNGatewayPager(req *http.Req } newListByVPNGatewayPager := n.newListByVPNGatewayPager.get(req) if newListByVPNGatewayPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - resp := n.srv.NewListByVPNGatewayPager(resourceGroupNameUnescaped, gatewayNameUnescaped, nil) + resp := n.srv.NewListByVPNGatewayPager(resourceGroupNameParam, gatewayNameParam, nil) newListByVPNGatewayPager = &resp n.newListByVPNGatewayPager.add(req, newListByVPNGatewayPager) server.PagerResponderInjectNextLinks(newListByVPNGatewayPager, req, func(page *armnetwork.NatRulesClientListByVPNGatewayResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/p2svpngateways_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/p2svpngateways_server.go index 807270224..569729e7d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/p2svpngateways_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/p2svpngateways_server.go @@ -155,7 +155,7 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *http.Re } beginCreateOrUpdate := p.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -165,15 +165,15 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, body, nil) + respr, errRespr := p.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, gatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,21 +203,21 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginDelete(req *http.Request) ( } beginDelete := p.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, nil) + respr, errRespr := p.srv.BeginDelete(req.Context(), resourceGroupNameParam, gatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -247,7 +247,7 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginDisconnectP2SVPNConnections } beginDisconnectP2SVPNConnections := p.beginDisconnectP2SVPNConnections.get(req) if beginDisconnectP2SVPNConnections == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/disconnectP2sVpnConnections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/disconnectP2sVpnConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -257,15 +257,15 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginDisconnectP2SVPNConnections if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - p2SVPNGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("p2sVpnGatewayName")]) + p2SVPNGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("p2sVpnGatewayName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginDisconnectP2SVPNConnections(req.Context(), resourceGroupNameUnescaped, p2SVPNGatewayNameUnescaped, body, nil) + respr, errRespr := p.srv.BeginDisconnectP2SVPNConnections(req.Context(), resourceGroupNameParam, p2SVPNGatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -295,7 +295,7 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginGenerateVPNProfile(req *htt } beginGenerateVPNProfile := p.beginGenerateVPNProfile.get(req) if beginGenerateVPNProfile == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/generatevpnprofile` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/generatevpnprofile` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -305,15 +305,15 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginGenerateVPNProfile(req *htt if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginGenerateVPNProfile(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, body, nil) + respr, errRespr := p.srv.BeginGenerateVPNProfile(req.Context(), resourceGroupNameParam, gatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -341,21 +341,21 @@ func (p *P2SVPNGatewaysServerTransport) dispatchGet(req *http.Request) (*http.Re if p.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, nil) + respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameParam, gatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -376,21 +376,21 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginGetP2SVPNConnectionHealth(r } beginGetP2SVPNConnectionHealth := p.beginGetP2SVPNConnectionHealth.get(req) if beginGetP2SVPNConnectionHealth == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getP2sVpnConnectionHealth` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getP2sVpnConnectionHealth` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginGetP2SVPNConnectionHealth(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, nil) + respr, errRespr := p.srv.BeginGetP2SVPNConnectionHealth(req.Context(), resourceGroupNameParam, gatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -420,7 +420,7 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginGetP2SVPNConnectionHealthDe } beginGetP2SVPNConnectionHealthDetailed := p.beginGetP2SVPNConnectionHealthDetailed.get(req) if beginGetP2SVPNConnectionHealthDetailed == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getP2sVpnConnectionHealthDetailed` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getP2sVpnConnectionHealthDetailed` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -430,15 +430,15 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginGetP2SVPNConnectionHealthDe if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginGetP2SVPNConnectionHealthDetailed(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, body, nil) + respr, errRespr := p.srv.BeginGetP2SVPNConnectionHealthDetailed(req.Context(), resourceGroupNameParam, gatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -468,7 +468,7 @@ func (p *P2SVPNGatewaysServerTransport) dispatchNewListPager(req *http.Request) } newListPager := p.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/p2svpnGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -501,17 +501,17 @@ func (p *P2SVPNGatewaysServerTransport) dispatchNewListByResourceGroupPager(req } newListByResourceGroupPager := p.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/p2svpnGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := p.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := p.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp p.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.P2SVPNGatewaysClientListByResourceGroupResponse, createLink func() string) { @@ -538,21 +538,21 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginReset(req *http.Request) (* } beginReset := p.beginReset.get(req) if beginReset == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/reset` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/reset` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginReset(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, nil) + respr, errRespr := p.srv.BeginReset(req.Context(), resourceGroupNameParam, gatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -582,7 +582,7 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginUpdateTags(req *http.Reques } beginUpdateTags := p.beginUpdateTags.get(req) if beginUpdateTags == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -592,15 +592,15 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginUpdateTags(req *http.Reques if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginUpdateTags(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, body, nil) + respr, errRespr := p.srv.BeginUpdateTags(req.Context(), resourceGroupNameParam, gatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/packetcaptures_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/packetcaptures_server.go index 6656521e3..fae214a26 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/packetcaptures_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/packetcaptures_server.go @@ -114,7 +114,7 @@ func (p *PacketCapturesServerTransport) dispatchBeginCreate(req *http.Request) ( } beginCreate := p.beginCreate.get(req) if beginCreate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCaptures/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCaptures/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -124,19 +124,19 @@ func (p *PacketCapturesServerTransport) dispatchBeginCreate(req *http.Request) ( if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - packetCaptureNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("packetCaptureName")]) + packetCaptureNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("packetCaptureName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginCreate(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, packetCaptureNameUnescaped, body, nil) + respr, errRespr := p.srv.BeginCreate(req.Context(), resourceGroupNameParam, networkWatcherNameParam, packetCaptureNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -166,25 +166,25 @@ func (p *PacketCapturesServerTransport) dispatchBeginDelete(req *http.Request) ( } beginDelete := p.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCaptures/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCaptures/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - packetCaptureNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("packetCaptureName")]) + packetCaptureNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("packetCaptureName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, packetCaptureNameUnescaped, nil) + respr, errRespr := p.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkWatcherNameParam, packetCaptureNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -212,25 +212,25 @@ func (p *PacketCapturesServerTransport) dispatchGet(req *http.Request) (*http.Re if p.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCaptures/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCaptures/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - packetCaptureNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("packetCaptureName")]) + packetCaptureNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("packetCaptureName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, packetCaptureNameUnescaped, nil) + respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameParam, networkWatcherNameParam, packetCaptureNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -251,25 +251,25 @@ func (p *PacketCapturesServerTransport) dispatchBeginGetStatus(req *http.Request } beginGetStatus := p.beginGetStatus.get(req) if beginGetStatus == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCaptures/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/queryStatus` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCaptures/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/queryStatus` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - packetCaptureNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("packetCaptureName")]) + packetCaptureNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("packetCaptureName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginGetStatus(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, packetCaptureNameUnescaped, nil) + respr, errRespr := p.srv.BeginGetStatus(req.Context(), resourceGroupNameParam, networkWatcherNameParam, packetCaptureNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -299,21 +299,21 @@ func (p *PacketCapturesServerTransport) dispatchNewListPager(req *http.Request) } newListPager := p.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCaptures` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCaptures` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - resp := p.srv.NewListPager(resourceGroupNameUnescaped, networkWatcherNameUnescaped, nil) + resp := p.srv.NewListPager(resourceGroupNameParam, networkWatcherNameParam, nil) newListPager = &resp p.newListPager.add(req, newListPager) } @@ -337,25 +337,25 @@ func (p *PacketCapturesServerTransport) dispatchBeginStop(req *http.Request) (*h } beginStop := p.beginStop.get(req) if beginStop == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCaptures/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stop` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCaptures/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stop` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - packetCaptureNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("packetCaptureName")]) + packetCaptureNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("packetCaptureName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginStop(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, packetCaptureNameUnescaped, nil) + respr, errRespr := p.srv.BeginStop(req.Context(), resourceGroupNameParam, networkWatcherNameParam, packetCaptureNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/peerexpressroutecircuitconnections_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/peerexpressroutecircuitconnections_server.go index 4d9acfa09..c5fcccc1d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/peerexpressroutecircuitconnections_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/peerexpressroutecircuitconnections_server.go @@ -81,29 +81,29 @@ func (p *PeerExpressRouteCircuitConnectionsServerTransport) dispatchGet(req *htt if p.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameUnescaped, circuitNameUnescaped, peeringNameUnescaped, connectionNameUnescaped, nil) + respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameParam, circuitNameParam, peeringNameParam, connectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -124,25 +124,25 @@ func (p *PeerExpressRouteCircuitConnectionsServerTransport) dispatchNewListPager } newListPager := p.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerConnections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - circuitNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) + circuitNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("circuitName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - resp := p.srv.NewListPager(resourceGroupNameUnescaped, circuitNameUnescaped, peeringNameUnescaped, nil) + resp := p.srv.NewListPager(resourceGroupNameParam, circuitNameParam, peeringNameParam, nil) newListPager = &resp p.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.PeerExpressRouteCircuitConnectionsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/polymorphic_helpers.go index 3f3d65794..866e9603b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/polymorphic_helpers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/polymorphic_helpers.go @@ -13,48 +13,6 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4" ) -func unmarshalActiveBaseSecurityAdminRuleClassification(rawMsg json.RawMessage) (armnetwork.ActiveBaseSecurityAdminRuleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b armnetwork.ActiveBaseSecurityAdminRuleClassification - switch m["kind"] { - case string(armnetwork.EffectiveAdminRuleKindCustom): - b = &armnetwork.ActiveSecurityAdminRule{} - case string(armnetwork.EffectiveAdminRuleKindDefault): - b = &armnetwork.ActiveDefaultSecurityAdminRule{} - default: - b = &armnetwork.ActiveBaseSecurityAdminRule{} - } - if err := json.Unmarshal(rawMsg, b); err != nil { - return nil, err - } - return b, nil -} - -func unmarshalActiveBaseSecurityAdminRuleClassificationArray(rawMsg json.RawMessage) ([]armnetwork.ActiveBaseSecurityAdminRuleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]armnetwork.ActiveBaseSecurityAdminRuleClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalActiveBaseSecurityAdminRuleClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - func unmarshalBaseAdminRuleClassification(rawMsg json.RawMessage) (armnetwork.BaseAdminRuleClassification, error) { if rawMsg == nil { return nil, nil @@ -77,150 +35,3 @@ func unmarshalBaseAdminRuleClassification(rawMsg json.RawMessage) (armnetwork.Ba } return b, nil } - -func unmarshalBaseAdminRuleClassificationArray(rawMsg json.RawMessage) ([]armnetwork.BaseAdminRuleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]armnetwork.BaseAdminRuleClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalBaseAdminRuleClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalEffectiveBaseSecurityAdminRuleClassification(rawMsg json.RawMessage) (armnetwork.EffectiveBaseSecurityAdminRuleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b armnetwork.EffectiveBaseSecurityAdminRuleClassification - switch m["kind"] { - case string(armnetwork.EffectiveAdminRuleKindCustom): - b = &armnetwork.EffectiveSecurityAdminRule{} - case string(armnetwork.EffectiveAdminRuleKindDefault): - b = &armnetwork.EffectiveDefaultSecurityAdminRule{} - default: - b = &armnetwork.EffectiveBaseSecurityAdminRule{} - } - if err := json.Unmarshal(rawMsg, b); err != nil { - return nil, err - } - return b, nil -} - -func unmarshalEffectiveBaseSecurityAdminRuleClassificationArray(rawMsg json.RawMessage) ([]armnetwork.EffectiveBaseSecurityAdminRuleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]armnetwork.EffectiveBaseSecurityAdminRuleClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalEffectiveBaseSecurityAdminRuleClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalFirewallPolicyRuleClassification(rawMsg json.RawMessage) (armnetwork.FirewallPolicyRuleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b armnetwork.FirewallPolicyRuleClassification - switch m["ruleType"] { - case string(armnetwork.FirewallPolicyRuleTypeApplicationRule): - b = &armnetwork.ApplicationRule{} - case string(armnetwork.FirewallPolicyRuleTypeNatRule): - b = &armnetwork.NatRule{} - case string(armnetwork.FirewallPolicyRuleTypeNetworkRule): - b = &armnetwork.Rule{} - default: - b = &armnetwork.FirewallPolicyRule{} - } - if err := json.Unmarshal(rawMsg, b); err != nil { - return nil, err - } - return b, nil -} - -func unmarshalFirewallPolicyRuleClassificationArray(rawMsg json.RawMessage) ([]armnetwork.FirewallPolicyRuleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]armnetwork.FirewallPolicyRuleClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalFirewallPolicyRuleClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalFirewallPolicyRuleCollectionClassification(rawMsg json.RawMessage) (armnetwork.FirewallPolicyRuleCollectionClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b armnetwork.FirewallPolicyRuleCollectionClassification - switch m["ruleCollectionType"] { - case string(armnetwork.FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection): - b = &armnetwork.FirewallPolicyFilterRuleCollection{} - case string(armnetwork.FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection): - b = &armnetwork.FirewallPolicyNatRuleCollection{} - default: - b = &armnetwork.FirewallPolicyRuleCollection{} - } - if err := json.Unmarshal(rawMsg, b); err != nil { - return nil, err - } - return b, nil -} - -func unmarshalFirewallPolicyRuleCollectionClassificationArray(rawMsg json.RawMessage) ([]armnetwork.FirewallPolicyRuleCollectionClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]armnetwork.FirewallPolicyRuleCollectionClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalFirewallPolicyRuleCollectionClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/privatednszonegroups_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/privatednszonegroups_server.go index 62666c9db..55e2b053a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/privatednszonegroups_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/privatednszonegroups_server.go @@ -99,7 +99,7 @@ func (p *PrivateDNSZoneGroupsServerTransport) dispatchBeginCreateOrUpdate(req *h } beginCreateOrUpdate := p.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateDnsZoneGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateDnsZoneGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (p *PrivateDNSZoneGroupsServerTransport) dispatchBeginCreateOrUpdate(req *h if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - privateEndpointNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointName")]) + privateEndpointNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointName")]) if err != nil { return nil, err } - privateDNSZoneGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("privateDnsZoneGroupName")]) + privateDNSZoneGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateDnsZoneGroupName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, privateEndpointNameUnescaped, privateDNSZoneGroupNameUnescaped, body, nil) + respr, errRespr := p.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, privateEndpointNameParam, privateDNSZoneGroupNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (p *PrivateDNSZoneGroupsServerTransport) dispatchBeginDelete(req *http.Requ } beginDelete := p.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateDnsZoneGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateDnsZoneGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - privateEndpointNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointName")]) + privateEndpointNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointName")]) if err != nil { return nil, err } - privateDNSZoneGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("privateDnsZoneGroupName")]) + privateDNSZoneGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateDnsZoneGroupName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, privateEndpointNameUnescaped, privateDNSZoneGroupNameUnescaped, nil) + respr, errRespr := p.srv.BeginDelete(req.Context(), resourceGroupNameParam, privateEndpointNameParam, privateDNSZoneGroupNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (p *PrivateDNSZoneGroupsServerTransport) dispatchGet(req *http.Request) (*h if p.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateDnsZoneGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateDnsZoneGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - privateEndpointNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointName")]) + privateEndpointNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointName")]) if err != nil { return nil, err } - privateDNSZoneGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("privateDnsZoneGroupName")]) + privateDNSZoneGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateDnsZoneGroupName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameUnescaped, privateEndpointNameUnescaped, privateDNSZoneGroupNameUnescaped, nil) + respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameParam, privateEndpointNameParam, privateDNSZoneGroupNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (p *PrivateDNSZoneGroupsServerTransport) dispatchNewListPager(req *http.Req } newListPager := p.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateDnsZoneGroups` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateDnsZoneGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - privateEndpointNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointName")]) + privateEndpointNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointName")]) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := p.srv.NewListPager(privateEndpointNameUnescaped, resourceGroupNameUnescaped, nil) + resp := p.srv.NewListPager(privateEndpointNameParam, resourceGroupNameParam, nil) newListPager = &resp p.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.PrivateDNSZoneGroupsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/privateendpoints_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/privateendpoints_server.go index 382f99b08..cf00697f7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/privateendpoints_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/privateendpoints_server.go @@ -107,7 +107,7 @@ func (p *PrivateEndpointsServerTransport) dispatchBeginCreateOrUpdate(req *http. } beginCreateOrUpdate := p.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -117,15 +117,15 @@ func (p *PrivateEndpointsServerTransport) dispatchBeginCreateOrUpdate(req *http. if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - privateEndpointNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointName")]) + privateEndpointNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, privateEndpointNameUnescaped, body, nil) + respr, errRespr := p.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, privateEndpointNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -155,21 +155,21 @@ func (p *PrivateEndpointsServerTransport) dispatchBeginDelete(req *http.Request) } beginDelete := p.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - privateEndpointNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointName")]) + privateEndpointNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, privateEndpointNameUnescaped, nil) + respr, errRespr := p.srv.BeginDelete(req.Context(), resourceGroupNameParam, privateEndpointNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,18 +197,18 @@ func (p *PrivateEndpointsServerTransport) dispatchGet(req *http.Request) (*http. if p.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - privateEndpointNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointName")]) + privateEndpointNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointName")]) if err != nil { return nil, err } @@ -223,7 +223,7 @@ func (p *PrivateEndpointsServerTransport) dispatchGet(req *http.Request) (*http. Expand: expandParam, } } - respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameUnescaped, privateEndpointNameUnescaped, options) + respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameParam, privateEndpointNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -244,17 +244,17 @@ func (p *PrivateEndpointsServerTransport) dispatchNewListPager(req *http.Request } newListPager := p.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateEndpoints` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateEndpoints` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := p.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := p.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp p.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.PrivateEndpointsClientListResponse, createLink func() string) { @@ -281,7 +281,7 @@ func (p *PrivateEndpointsServerTransport) dispatchNewListBySubscriptionPager(req } newListBySubscriptionPager := p.newListBySubscriptionPager.get(req) if newListBySubscriptionPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateEndpoints` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateEndpoints` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/privatelinkservices_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/privatelinkservices_server.go index 76da31ec8..49b8769df 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/privatelinkservices_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/privatelinkservices_server.go @@ -167,7 +167,7 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginCheckPrivateLinkServic } beginCheckPrivateLinkServiceVisibility := p.beginCheckPrivateLinkServiceVisibility.get(req) if beginCheckPrivateLinkServiceVisibility == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/checkPrivateLinkServiceVisibility` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/checkPrivateLinkServiceVisibility` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { @@ -177,11 +177,11 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginCheckPrivateLinkServic if err != nil { return nil, err } - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginCheckPrivateLinkServiceVisibility(req.Context(), locationUnescaped, body, nil) + respr, errRespr := p.srv.BeginCheckPrivateLinkServiceVisibility(req.Context(), locationParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -211,7 +211,7 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginCheckPrivateLinkServic } beginCheckPrivateLinkServiceVisibilityByResourceGroup := p.beginCheckPrivateLinkServiceVisibilityByResourceGroup.get(req) if beginCheckPrivateLinkServiceVisibilityByResourceGroup == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/checkPrivateLinkServiceVisibility` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/checkPrivateLinkServiceVisibility` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -221,15 +221,15 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginCheckPrivateLinkServic if err != nil { return nil, err } - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginCheckPrivateLinkServiceVisibilityByResourceGroup(req.Context(), locationUnescaped, resourceGroupNameUnescaped, body, nil) + respr, errRespr := p.srv.BeginCheckPrivateLinkServiceVisibilityByResourceGroup(req.Context(), locationParam, resourceGroupNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -259,7 +259,7 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginCreateOrUpdate(req *ht } beginCreateOrUpdate := p.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -269,15 +269,15 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginCreateOrUpdate(req *ht if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - serviceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceName")]) + serviceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, serviceNameUnescaped, body, nil) + respr, errRespr := p.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, serviceNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -307,21 +307,21 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginDelete(req *http.Reque } beginDelete := p.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - serviceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceName")]) + serviceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, serviceNameUnescaped, nil) + respr, errRespr := p.srv.BeginDelete(req.Context(), resourceGroupNameParam, serviceNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -351,25 +351,25 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginDeletePrivateEndpointC } beginDeletePrivateEndpointConnection := p.beginDeletePrivateEndpointConnection.get(req) if beginDeletePrivateEndpointConnection == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - serviceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceName")]) + serviceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceName")]) if err != nil { return nil, err } - peConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peConnectionName")]) + peConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peConnectionName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginDeletePrivateEndpointConnection(req.Context(), resourceGroupNameUnescaped, serviceNameUnescaped, peConnectionNameUnescaped, nil) + respr, errRespr := p.srv.BeginDeletePrivateEndpointConnection(req.Context(), resourceGroupNameParam, serviceNameParam, peConnectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -397,18 +397,18 @@ func (p *PrivateLinkServicesServerTransport) dispatchGet(req *http.Request) (*ht if p.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - serviceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceName")]) + serviceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceName")]) if err != nil { return nil, err } @@ -423,7 +423,7 @@ func (p *PrivateLinkServicesServerTransport) dispatchGet(req *http.Request) (*ht Expand: expandParam, } } - respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameUnescaped, serviceNameUnescaped, options) + respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameParam, serviceNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -442,22 +442,22 @@ func (p *PrivateLinkServicesServerTransport) dispatchGetPrivateEndpointConnectio if p.srv.GetPrivateEndpointConnection == nil { return nil, &nonRetriableError{errors.New("fake for method GetPrivateEndpointConnection not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - serviceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceName")]) + serviceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceName")]) if err != nil { return nil, err } - peConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peConnectionName")]) + peConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peConnectionName")]) if err != nil { return nil, err } @@ -472,7 +472,7 @@ func (p *PrivateLinkServicesServerTransport) dispatchGetPrivateEndpointConnectio Expand: expandParam, } } - respr, errRespr := p.srv.GetPrivateEndpointConnection(req.Context(), resourceGroupNameUnescaped, serviceNameUnescaped, peConnectionNameUnescaped, options) + respr, errRespr := p.srv.GetPrivateEndpointConnection(req.Context(), resourceGroupNameParam, serviceNameParam, peConnectionNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -493,17 +493,17 @@ func (p *PrivateLinkServicesServerTransport) dispatchNewListPager(req *http.Requ } newListPager := p.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateLinkServices` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateLinkServices` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := p.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := p.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp p.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.PrivateLinkServicesClientListResponse, createLink func() string) { @@ -530,17 +530,17 @@ func (p *PrivateLinkServicesServerTransport) dispatchNewListAutoApprovedPrivateL } newListAutoApprovedPrivateLinkServicesPager := p.newListAutoApprovedPrivateLinkServicesPager.get(req) if newListAutoApprovedPrivateLinkServicesPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/autoApprovedPrivateLinkServices` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/autoApprovedPrivateLinkServices` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } - resp := p.srv.NewListAutoApprovedPrivateLinkServicesPager(locationUnescaped, nil) + resp := p.srv.NewListAutoApprovedPrivateLinkServicesPager(locationParam, nil) newListAutoApprovedPrivateLinkServicesPager = &resp p.newListAutoApprovedPrivateLinkServicesPager.add(req, newListAutoApprovedPrivateLinkServicesPager) server.PagerResponderInjectNextLinks(newListAutoApprovedPrivateLinkServicesPager, req, func(page *armnetwork.PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse, createLink func() string) { @@ -567,21 +567,21 @@ func (p *PrivateLinkServicesServerTransport) dispatchNewListAutoApprovedPrivateL } newListAutoApprovedPrivateLinkServicesByResourceGroupPager := p.newListAutoApprovedPrivateLinkServicesByResourceGroupPager.get(req) if newListAutoApprovedPrivateLinkServicesByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/autoApprovedPrivateLinkServices` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/autoApprovedPrivateLinkServices` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := p.srv.NewListAutoApprovedPrivateLinkServicesByResourceGroupPager(locationUnescaped, resourceGroupNameUnescaped, nil) + resp := p.srv.NewListAutoApprovedPrivateLinkServicesByResourceGroupPager(locationParam, resourceGroupNameParam, nil) newListAutoApprovedPrivateLinkServicesByResourceGroupPager = &resp p.newListAutoApprovedPrivateLinkServicesByResourceGroupPager.add(req, newListAutoApprovedPrivateLinkServicesByResourceGroupPager) server.PagerResponderInjectNextLinks(newListAutoApprovedPrivateLinkServicesByResourceGroupPager, req, func(page *armnetwork.PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse, createLink func() string) { @@ -608,7 +608,7 @@ func (p *PrivateLinkServicesServerTransport) dispatchNewListBySubscriptionPager( } newListBySubscriptionPager := p.newListBySubscriptionPager.get(req) if newListBySubscriptionPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateLinkServices` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateLinkServices` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -641,21 +641,21 @@ func (p *PrivateLinkServicesServerTransport) dispatchNewListPrivateEndpointConne } newListPrivateEndpointConnectionsPager := p.newListPrivateEndpointConnectionsPager.get(req) if newListPrivateEndpointConnectionsPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - serviceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceName")]) + serviceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceName")]) if err != nil { return nil, err } - resp := p.srv.NewListPrivateEndpointConnectionsPager(resourceGroupNameUnescaped, serviceNameUnescaped, nil) + resp := p.srv.NewListPrivateEndpointConnectionsPager(resourceGroupNameParam, serviceNameParam, nil) newListPrivateEndpointConnectionsPager = &resp p.newListPrivateEndpointConnectionsPager.add(req, newListPrivateEndpointConnectionsPager) server.PagerResponderInjectNextLinks(newListPrivateEndpointConnectionsPager, req, func(page *armnetwork.PrivateLinkServicesClientListPrivateEndpointConnectionsResponse, createLink func() string) { @@ -680,7 +680,7 @@ func (p *PrivateLinkServicesServerTransport) dispatchUpdatePrivateEndpointConnec if p.srv.UpdatePrivateEndpointConnection == nil { return nil, &nonRetriableError{errors.New("fake for method UpdatePrivateEndpointConnection not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -690,19 +690,19 @@ func (p *PrivateLinkServicesServerTransport) dispatchUpdatePrivateEndpointConnec if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - serviceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceName")]) + serviceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceName")]) if err != nil { return nil, err } - peConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peConnectionName")]) + peConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peConnectionName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.UpdatePrivateEndpointConnection(req.Context(), resourceGroupNameUnescaped, serviceNameUnescaped, peConnectionNameUnescaped, body, nil) + respr, errRespr := p.srv.UpdatePrivateEndpointConnection(req.Context(), resourceGroupNameParam, serviceNameParam, peConnectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/profiles_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/profiles_server.go index ce4879384..c6a7e07df 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/profiles_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/profiles_server.go @@ -109,7 +109,7 @@ func (p *ProfilesServerTransport) dispatchCreateOrUpdate(req *http.Request) (*ht if p.srv.CreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdate not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkProfiles/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkProfiles/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -119,15 +119,15 @@ func (p *ProfilesServerTransport) dispatchCreateOrUpdate(req *http.Request) (*ht if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkProfileNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkProfileName")]) + networkProfileNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkProfileName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.CreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkProfileNameUnescaped, body, nil) + respr, errRespr := p.srv.CreateOrUpdate(req.Context(), resourceGroupNameParam, networkProfileNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -148,21 +148,21 @@ func (p *ProfilesServerTransport) dispatchBeginDelete(req *http.Request) (*http. } beginDelete := p.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkProfiles/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkProfiles/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkProfileNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkProfileName")]) + networkProfileNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkProfileName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkProfileNameUnescaped, nil) + respr, errRespr := p.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkProfileNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -190,18 +190,18 @@ func (p *ProfilesServerTransport) dispatchGet(req *http.Request) (*http.Response if p.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkProfiles/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkProfiles/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkProfileNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkProfileName")]) + networkProfileNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkProfileName")]) if err != nil { return nil, err } @@ -216,7 +216,7 @@ func (p *ProfilesServerTransport) dispatchGet(req *http.Request) (*http.Response Expand: expandParam, } } - respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameUnescaped, networkProfileNameUnescaped, options) + respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameParam, networkProfileNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -237,17 +237,17 @@ func (p *ProfilesServerTransport) dispatchNewListPager(req *http.Request) (*http } newListPager := p.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkProfiles` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkProfiles` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := p.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := p.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp p.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ProfilesClientListResponse, createLink func() string) { @@ -274,7 +274,7 @@ func (p *ProfilesServerTransport) dispatchNewListAllPager(req *http.Request) (*h } newListAllPager := p.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkProfiles` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkProfiles` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -305,7 +305,7 @@ func (p *ProfilesServerTransport) dispatchUpdateTags(req *http.Request) (*http.R if p.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkProfiles/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkProfiles/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -315,15 +315,15 @@ func (p *ProfilesServerTransport) dispatchUpdateTags(req *http.Request) (*http.R if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkProfileNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkProfileName")]) + networkProfileNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkProfileName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, networkProfileNameUnescaped, body, nil) + respr, errRespr := p.srv.UpdateTags(req.Context(), resourceGroupNameParam, networkProfileNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/publicipaddresses_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/publicipaddresses_server.go index 1d8db77f5..5df2c89fb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/publicipaddresses_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/publicipaddresses_server.go @@ -165,7 +165,7 @@ func (p *PublicIPAddressesServerTransport) dispatchBeginCreateOrUpdate(req *http } beginCreateOrUpdate := p.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPAddresses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/publicIPAddresses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -175,15 +175,15 @@ func (p *PublicIPAddressesServerTransport) dispatchBeginCreateOrUpdate(req *http if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - publicIPAddressNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpAddressName")]) + publicIPAddressNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpAddressName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, publicIPAddressNameUnescaped, body, nil) + respr, errRespr := p.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, publicIPAddressNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -213,21 +213,21 @@ func (p *PublicIPAddressesServerTransport) dispatchBeginDdosProtectionStatus(req } beginDdosProtectionStatus := p.beginDdosProtectionStatus.get(req) if beginDdosProtectionStatus == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPAddresses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ddosProtectionStatus` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/publicIPAddresses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ddosProtectionStatus` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - publicIPAddressNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpAddressName")]) + publicIPAddressNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpAddressName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginDdosProtectionStatus(req.Context(), resourceGroupNameUnescaped, publicIPAddressNameUnescaped, nil) + respr, errRespr := p.srv.BeginDdosProtectionStatus(req.Context(), resourceGroupNameParam, publicIPAddressNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -257,21 +257,21 @@ func (p *PublicIPAddressesServerTransport) dispatchBeginDelete(req *http.Request } beginDelete := p.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPAddresses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/publicIPAddresses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - publicIPAddressNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpAddressName")]) + publicIPAddressNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpAddressName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, publicIPAddressNameUnescaped, nil) + respr, errRespr := p.srv.BeginDelete(req.Context(), resourceGroupNameParam, publicIPAddressNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -299,18 +299,18 @@ func (p *PublicIPAddressesServerTransport) dispatchGet(req *http.Request) (*http if p.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPAddresses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/publicIPAddresses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - publicIPAddressNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpAddressName")]) + publicIPAddressNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpAddressName")]) if err != nil { return nil, err } @@ -325,7 +325,7 @@ func (p *PublicIPAddressesServerTransport) dispatchGet(req *http.Request) (*http Expand: expandParam, } } - respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameUnescaped, publicIPAddressNameUnescaped, options) + respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameParam, publicIPAddressNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -344,34 +344,34 @@ func (p *PublicIPAddressesServerTransport) dispatchGetCloudServicePublicIPAddres if p.srv.GetCloudServicePublicIPAddress == nil { return nil, &nonRetriableError{errors.New("fake for method GetCloudServicePublicIPAddress not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/roleInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipconfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicipaddresses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/roleInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipconfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicipaddresses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 7 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - cloudServiceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("cloudServiceName")]) + cloudServiceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("cloudServiceName")]) if err != nil { return nil, err } - roleInstanceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("roleInstanceName")]) + roleInstanceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("roleInstanceName")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } - ipConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigurationName")]) + ipConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigurationName")]) if err != nil { return nil, err } - publicIPAddressNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpAddressName")]) + publicIPAddressNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpAddressName")]) if err != nil { return nil, err } @@ -386,7 +386,7 @@ func (p *PublicIPAddressesServerTransport) dispatchGetCloudServicePublicIPAddres Expand: expandParam, } } - respr, errRespr := p.srv.GetCloudServicePublicIPAddress(req.Context(), resourceGroupNameUnescaped, cloudServiceNameUnescaped, roleInstanceNameUnescaped, networkInterfaceNameUnescaped, ipConfigurationNameUnescaped, publicIPAddressNameUnescaped, options) + respr, errRespr := p.srv.GetCloudServicePublicIPAddress(req.Context(), resourceGroupNameParam, cloudServiceNameParam, roleInstanceNameParam, networkInterfaceNameParam, ipConfigurationNameParam, publicIPAddressNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -405,34 +405,34 @@ func (p *PublicIPAddressesServerTransport) dispatchGetVirtualMachineScaleSetPubl if p.srv.GetVirtualMachineScaleSetPublicIPAddress == nil { return nil, &nonRetriableError{errors.New("fake for method GetVirtualMachineScaleSetPublicIPAddress not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipconfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicipaddresses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipconfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicipaddresses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 7 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualMachineScaleSetNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualMachineScaleSetName")]) + virtualMachineScaleSetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualMachineScaleSetName")]) if err != nil { return nil, err } - virtualmachineIndexUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualmachineIndex")]) + virtualmachineIndexParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualmachineIndex")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } - ipConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigurationName")]) + ipConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigurationName")]) if err != nil { return nil, err } - publicIPAddressNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpAddressName")]) + publicIPAddressNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpAddressName")]) if err != nil { return nil, err } @@ -447,7 +447,7 @@ func (p *PublicIPAddressesServerTransport) dispatchGetVirtualMachineScaleSetPubl Expand: expandParam, } } - respr, errRespr := p.srv.GetVirtualMachineScaleSetPublicIPAddress(req.Context(), resourceGroupNameUnescaped, virtualMachineScaleSetNameUnescaped, virtualmachineIndexUnescaped, networkInterfaceNameUnescaped, ipConfigurationNameUnescaped, publicIPAddressNameUnescaped, options) + respr, errRespr := p.srv.GetVirtualMachineScaleSetPublicIPAddress(req.Context(), resourceGroupNameParam, virtualMachineScaleSetNameParam, virtualmachineIndexParam, networkInterfaceNameParam, ipConfigurationNameParam, publicIPAddressNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -468,17 +468,17 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListPager(req *http.Reques } newListPager := p.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPAddresses` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/publicIPAddresses` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := p.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := p.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp p.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.PublicIPAddressesClientListResponse, createLink func() string) { @@ -505,7 +505,7 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListAllPager(req *http.Req } newListAllPager := p.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPAddresses` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/publicIPAddresses` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -538,21 +538,21 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListCloudServicePublicIPAd } newListCloudServicePublicIPAddressesPager := p.newListCloudServicePublicIPAddressesPager.get(req) if newListCloudServicePublicIPAddressesPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicipaddresses` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicipaddresses` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - cloudServiceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("cloudServiceName")]) + cloudServiceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("cloudServiceName")]) if err != nil { return nil, err } - resp := p.srv.NewListCloudServicePublicIPAddressesPager(resourceGroupNameUnescaped, cloudServiceNameUnescaped, nil) + resp := p.srv.NewListCloudServicePublicIPAddressesPager(resourceGroupNameParam, cloudServiceNameParam, nil) newListCloudServicePublicIPAddressesPager = &resp p.newListCloudServicePublicIPAddressesPager.add(req, newListCloudServicePublicIPAddressesPager) server.PagerResponderInjectNextLinks(newListCloudServicePublicIPAddressesPager, req, func(page *armnetwork.PublicIPAddressesClientListCloudServicePublicIPAddressesResponse, createLink func() string) { @@ -579,33 +579,33 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListCloudServiceRoleInstan } newListCloudServiceRoleInstancePublicIPAddressesPager := p.newListCloudServiceRoleInstancePublicIPAddressesPager.get(req) if newListCloudServiceRoleInstancePublicIPAddressesPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/roleInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipconfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicipaddresses` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/roleInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipconfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicipaddresses` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 6 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - cloudServiceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("cloudServiceName")]) + cloudServiceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("cloudServiceName")]) if err != nil { return nil, err } - roleInstanceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("roleInstanceName")]) + roleInstanceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("roleInstanceName")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } - ipConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigurationName")]) + ipConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigurationName")]) if err != nil { return nil, err } - resp := p.srv.NewListCloudServiceRoleInstancePublicIPAddressesPager(resourceGroupNameUnescaped, cloudServiceNameUnescaped, roleInstanceNameUnescaped, networkInterfaceNameUnescaped, ipConfigurationNameUnescaped, nil) + resp := p.srv.NewListCloudServiceRoleInstancePublicIPAddressesPager(resourceGroupNameParam, cloudServiceNameParam, roleInstanceNameParam, networkInterfaceNameParam, ipConfigurationNameParam, nil) newListCloudServiceRoleInstancePublicIPAddressesPager = &resp p.newListCloudServiceRoleInstancePublicIPAddressesPager.add(req, newListCloudServiceRoleInstancePublicIPAddressesPager) server.PagerResponderInjectNextLinks(newListCloudServiceRoleInstancePublicIPAddressesPager, req, func(page *armnetwork.PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse, createLink func() string) { @@ -632,21 +632,21 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListVirtualMachineScaleSet } newListVirtualMachineScaleSetPublicIPAddressesPager := p.newListVirtualMachineScaleSetPublicIPAddressesPager.get(req) if newListVirtualMachineScaleSetPublicIPAddressesPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicipaddresses` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicipaddresses` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualMachineScaleSetNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualMachineScaleSetName")]) + virtualMachineScaleSetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualMachineScaleSetName")]) if err != nil { return nil, err } - resp := p.srv.NewListVirtualMachineScaleSetPublicIPAddressesPager(resourceGroupNameUnescaped, virtualMachineScaleSetNameUnescaped, nil) + resp := p.srv.NewListVirtualMachineScaleSetPublicIPAddressesPager(resourceGroupNameParam, virtualMachineScaleSetNameParam, nil) newListVirtualMachineScaleSetPublicIPAddressesPager = &resp p.newListVirtualMachineScaleSetPublicIPAddressesPager.add(req, newListVirtualMachineScaleSetPublicIPAddressesPager) server.PagerResponderInjectNextLinks(newListVirtualMachineScaleSetPublicIPAddressesPager, req, func(page *armnetwork.PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse, createLink func() string) { @@ -673,33 +673,33 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListVirtualMachineScaleSet } newListVirtualMachineScaleSetVMPublicIPAddressesPager := p.newListVirtualMachineScaleSetVMPublicIPAddressesPager.get(req) if newListVirtualMachineScaleSetVMPublicIPAddressesPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipconfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicipaddresses` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipconfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicipaddresses` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 6 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualMachineScaleSetNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualMachineScaleSetName")]) + virtualMachineScaleSetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualMachineScaleSetName")]) if err != nil { return nil, err } - virtualmachineIndexUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualmachineIndex")]) + virtualmachineIndexParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualmachineIndex")]) if err != nil { return nil, err } - networkInterfaceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) + networkInterfaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkInterfaceName")]) if err != nil { return nil, err } - ipConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigurationName")]) + ipConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigurationName")]) if err != nil { return nil, err } - resp := p.srv.NewListVirtualMachineScaleSetVMPublicIPAddressesPager(resourceGroupNameUnescaped, virtualMachineScaleSetNameUnescaped, virtualmachineIndexUnescaped, networkInterfaceNameUnescaped, ipConfigurationNameUnescaped, nil) + resp := p.srv.NewListVirtualMachineScaleSetVMPublicIPAddressesPager(resourceGroupNameParam, virtualMachineScaleSetNameParam, virtualmachineIndexParam, networkInterfaceNameParam, ipConfigurationNameParam, nil) newListVirtualMachineScaleSetVMPublicIPAddressesPager = &resp p.newListVirtualMachineScaleSetVMPublicIPAddressesPager.add(req, newListVirtualMachineScaleSetVMPublicIPAddressesPager) server.PagerResponderInjectNextLinks(newListVirtualMachineScaleSetVMPublicIPAddressesPager, req, func(page *armnetwork.PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse, createLink func() string) { @@ -724,7 +724,7 @@ func (p *PublicIPAddressesServerTransport) dispatchUpdateTags(req *http.Request) if p.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPAddresses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/publicIPAddresses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -734,15 +734,15 @@ func (p *PublicIPAddressesServerTransport) dispatchUpdateTags(req *http.Request) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - publicIPAddressNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpAddressName")]) + publicIPAddressNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpAddressName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, publicIPAddressNameUnescaped, body, nil) + respr, errRespr := p.srv.UpdateTags(req.Context(), resourceGroupNameParam, publicIPAddressNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/publicipprefixes_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/publicipprefixes_server.go index cdfc41676..e61dd837a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/publicipprefixes_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/publicipprefixes_server.go @@ -113,7 +113,7 @@ func (p *PublicIPPrefixesServerTransport) dispatchBeginCreateOrUpdate(req *http. } beginCreateOrUpdate := p.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/publicIPPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (p *PublicIPPrefixesServerTransport) dispatchBeginCreateOrUpdate(req *http. if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - publicIPPrefixNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpPrefixName")]) + publicIPPrefixNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpPrefixName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, publicIPPrefixNameUnescaped, body, nil) + respr, errRespr := p.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, publicIPPrefixNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (p *PublicIPPrefixesServerTransport) dispatchBeginDelete(req *http.Request) } beginDelete := p.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/publicIPPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - publicIPPrefixNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpPrefixName")]) + publicIPPrefixNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpPrefixName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, publicIPPrefixNameUnescaped, nil) + respr, errRespr := p.srv.BeginDelete(req.Context(), resourceGroupNameParam, publicIPPrefixNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,18 +203,18 @@ func (p *PublicIPPrefixesServerTransport) dispatchGet(req *http.Request) (*http. if p.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/publicIPPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - publicIPPrefixNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpPrefixName")]) + publicIPPrefixNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpPrefixName")]) if err != nil { return nil, err } @@ -229,7 +229,7 @@ func (p *PublicIPPrefixesServerTransport) dispatchGet(req *http.Request) (*http. Expand: expandParam, } } - respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameUnescaped, publicIPPrefixNameUnescaped, options) + respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameParam, publicIPPrefixNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -250,17 +250,17 @@ func (p *PublicIPPrefixesServerTransport) dispatchNewListPager(req *http.Request } newListPager := p.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPPrefixes` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/publicIPPrefixes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := p.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := p.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp p.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.PublicIPPrefixesClientListResponse, createLink func() string) { @@ -287,7 +287,7 @@ func (p *PublicIPPrefixesServerTransport) dispatchNewListAllPager(req *http.Requ } newListAllPager := p.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPPrefixes` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/publicIPPrefixes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -318,7 +318,7 @@ func (p *PublicIPPrefixesServerTransport) dispatchUpdateTags(req *http.Request) if p.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/publicIPPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -328,15 +328,15 @@ func (p *PublicIPPrefixesServerTransport) dispatchUpdateTags(req *http.Request) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - publicIPPrefixNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpPrefixName")]) + publicIPPrefixNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("publicIpPrefixName")]) if err != nil { return nil, err } - respr, errRespr := p.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, publicIPPrefixNameUnescaped, body, nil) + respr, errRespr := p.srv.UpdateTags(req.Context(), resourceGroupNameParam, publicIPPrefixNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/resourcenavigationlinks_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/resourcenavigationlinks_server.go index ceec9bd67..f18addf67 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/resourcenavigationlinks_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/resourcenavigationlinks_server.go @@ -70,25 +70,25 @@ func (r *ResourceNavigationLinksServerTransport) dispatchList(req *http.Request) if r.srv.List == nil { return nil, &nonRetriableError{errors.New("fake for method List not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ResourceNavigationLinks` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ResourceNavigationLinks` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } - subnetNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("subnetName")]) + subnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("subnetName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.List(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, subnetNameUnescaped, nil) + respr, errRespr := r.srv.List(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, subnetNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routefilterrules_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routefilterrules_server.go index c3df45c1f..942b32045 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routefilterrules_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routefilterrules_server.go @@ -99,7 +99,7 @@ func (r *RouteFilterRulesServerTransport) dispatchBeginCreateOrUpdate(req *http. } beginCreateOrUpdate := r.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeFilterRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeFilterRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (r *RouteFilterRulesServerTransport) dispatchBeginCreateOrUpdate(req *http. if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - routeFilterNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeFilterName")]) + routeFilterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeFilterName")]) if err != nil { return nil, err } - ruleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ruleName")]) + ruleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ruleName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, routeFilterNameUnescaped, ruleNameUnescaped, body, nil) + respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, routeFilterNameParam, ruleNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (r *RouteFilterRulesServerTransport) dispatchBeginDelete(req *http.Request) } beginDelete := r.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeFilterRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeFilterRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - routeFilterNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeFilterName")]) + routeFilterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeFilterName")]) if err != nil { return nil, err } - ruleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ruleName")]) + ruleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ruleName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, routeFilterNameUnescaped, ruleNameUnescaped, nil) + respr, errRespr := r.srv.BeginDelete(req.Context(), resourceGroupNameParam, routeFilterNameParam, ruleNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (r *RouteFilterRulesServerTransport) dispatchGet(req *http.Request) (*http. if r.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeFilterRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeFilterRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - routeFilterNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeFilterName")]) + routeFilterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeFilterName")]) if err != nil { return nil, err } - ruleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ruleName")]) + ruleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ruleName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.Get(req.Context(), resourceGroupNameUnescaped, routeFilterNameUnescaped, ruleNameUnescaped, nil) + respr, errRespr := r.srv.Get(req.Context(), resourceGroupNameParam, routeFilterNameParam, ruleNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (r *RouteFilterRulesServerTransport) dispatchNewListByRouteFilterPager(req } newListByRouteFilterPager := r.newListByRouteFilterPager.get(req) if newListByRouteFilterPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeFilterRules` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeFilterRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - routeFilterNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeFilterName")]) + routeFilterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeFilterName")]) if err != nil { return nil, err } - resp := r.srv.NewListByRouteFilterPager(resourceGroupNameUnescaped, routeFilterNameUnescaped, nil) + resp := r.srv.NewListByRouteFilterPager(resourceGroupNameParam, routeFilterNameParam, nil) newListByRouteFilterPager = &resp r.newListByRouteFilterPager.add(req, newListByRouteFilterPager) server.PagerResponderInjectNextLinks(newListByRouteFilterPager, req, func(page *armnetwork.RouteFilterRulesClientListByRouteFilterResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routefilters_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routefilters_server.go index e909eb305..7f73ca50d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routefilters_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routefilters_server.go @@ -113,7 +113,7 @@ func (r *RouteFiltersServerTransport) dispatchBeginCreateOrUpdate(req *http.Requ } beginCreateOrUpdate := r.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (r *RouteFiltersServerTransport) dispatchBeginCreateOrUpdate(req *http.Requ if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - routeFilterNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeFilterName")]) + routeFilterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeFilterName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, routeFilterNameUnescaped, body, nil) + respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, routeFilterNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (r *RouteFiltersServerTransport) dispatchBeginDelete(req *http.Request) (*h } beginDelete := r.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - routeFilterNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeFilterName")]) + routeFilterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeFilterName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, routeFilterNameUnescaped, nil) + respr, errRespr := r.srv.BeginDelete(req.Context(), resourceGroupNameParam, routeFilterNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,18 +203,18 @@ func (r *RouteFiltersServerTransport) dispatchGet(req *http.Request) (*http.Resp if r.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - routeFilterNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeFilterName")]) + routeFilterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeFilterName")]) if err != nil { return nil, err } @@ -229,7 +229,7 @@ func (r *RouteFiltersServerTransport) dispatchGet(req *http.Request) (*http.Resp Expand: expandParam, } } - respr, errRespr := r.srv.Get(req.Context(), resourceGroupNameUnescaped, routeFilterNameUnescaped, options) + respr, errRespr := r.srv.Get(req.Context(), resourceGroupNameParam, routeFilterNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -250,7 +250,7 @@ func (r *RouteFiltersServerTransport) dispatchNewListPager(req *http.Request) (* } newListPager := r.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeFilters` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeFilters` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -283,17 +283,17 @@ func (r *RouteFiltersServerTransport) dispatchNewListByResourceGroupPager(req *h } newListByResourceGroupPager := r.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeFilters` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeFilters` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := r.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := r.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp r.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.RouteFiltersClientListByResourceGroupResponse, createLink func() string) { @@ -318,7 +318,7 @@ func (r *RouteFiltersServerTransport) dispatchUpdateTags(req *http.Request) (*ht if r.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -328,15 +328,15 @@ func (r *RouteFiltersServerTransport) dispatchUpdateTags(req *http.Request) (*ht if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - routeFilterNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeFilterName")]) + routeFilterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeFilterName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, routeFilterNameUnescaped, body, nil) + respr, errRespr := r.srv.UpdateTags(req.Context(), resourceGroupNameParam, routeFilterNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routemaps_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routemaps_server.go index be751b083..6030cc4f6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routemaps_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routemaps_server.go @@ -99,7 +99,7 @@ func (r *RouteMapsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request } beginCreateOrUpdate := r.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeMaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeMaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (r *RouteMapsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - routeMapNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeMapName")]) + routeMapNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeMapName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, routeMapNameUnescaped, body, nil) + respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, virtualHubNameParam, routeMapNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (r *RouteMapsServerTransport) dispatchBeginDelete(req *http.Request) (*http } beginDelete := r.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeMaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeMaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - routeMapNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeMapName")]) + routeMapNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeMapName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, routeMapNameUnescaped, nil) + respr, errRespr := r.srv.BeginDelete(req.Context(), resourceGroupNameParam, virtualHubNameParam, routeMapNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (r *RouteMapsServerTransport) dispatchGet(req *http.Request) (*http.Respons if r.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeMaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeMaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - routeMapNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeMapName")]) + routeMapNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeMapName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.Get(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, routeMapNameUnescaped, nil) + respr, errRespr := r.srv.Get(req.Context(), resourceGroupNameParam, virtualHubNameParam, routeMapNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (r *RouteMapsServerTransport) dispatchNewListPager(req *http.Request) (*htt } newListPager := r.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeMaps` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeMaps` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - resp := r.srv.NewListPager(resourceGroupNameUnescaped, virtualHubNameUnescaped, nil) + resp := r.srv.NewListPager(resourceGroupNameParam, virtualHubNameParam, nil) newListPager = &resp r.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.RouteMapsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routes_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routes_server.go index eacdaeedf..b26835a43 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routes_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routes_server.go @@ -99,7 +99,7 @@ func (r *RoutesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) ( } beginCreateOrUpdate := r.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (r *RoutesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) ( if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - routeTableNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) + routeTableNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) if err != nil { return nil, err } - routeNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeName")]) + routeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, routeTableNameUnescaped, routeNameUnescaped, body, nil) + respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, routeTableNameParam, routeNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (r *RoutesServerTransport) dispatchBeginDelete(req *http.Request) (*http.Re } beginDelete := r.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - routeTableNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) + routeTableNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) if err != nil { return nil, err } - routeNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeName")]) + routeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, routeTableNameUnescaped, routeNameUnescaped, nil) + respr, errRespr := r.srv.BeginDelete(req.Context(), resourceGroupNameParam, routeTableNameParam, routeNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (r *RoutesServerTransport) dispatchGet(req *http.Request) (*http.Response, if r.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - routeTableNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) + routeTableNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) if err != nil { return nil, err } - routeNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeName")]) + routeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.Get(req.Context(), resourceGroupNameUnescaped, routeTableNameUnescaped, routeNameUnescaped, nil) + respr, errRespr := r.srv.Get(req.Context(), resourceGroupNameParam, routeTableNameParam, routeNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (r *RoutesServerTransport) dispatchNewListPager(req *http.Request) (*http.R } newListPager := r.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routes` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - routeTableNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) + routeTableNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) if err != nil { return nil, err } - resp := r.srv.NewListPager(resourceGroupNameUnescaped, routeTableNameUnescaped, nil) + resp := r.srv.NewListPager(resourceGroupNameParam, routeTableNameParam, nil) newListPager = &resp r.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.RoutesClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routetables_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routetables_server.go index f61dd9123..ef2d86433 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routetables_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routetables_server.go @@ -113,7 +113,7 @@ func (r *RouteTablesServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque } beginCreateOrUpdate := r.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (r *RouteTablesServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - routeTableNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) + routeTableNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, routeTableNameUnescaped, body, nil) + respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, routeTableNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (r *RouteTablesServerTransport) dispatchBeginDelete(req *http.Request) (*ht } beginDelete := r.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - routeTableNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) + routeTableNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, routeTableNameUnescaped, nil) + respr, errRespr := r.srv.BeginDelete(req.Context(), resourceGroupNameParam, routeTableNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,18 +203,18 @@ func (r *RouteTablesServerTransport) dispatchGet(req *http.Request) (*http.Respo if r.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - routeTableNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) + routeTableNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) if err != nil { return nil, err } @@ -229,7 +229,7 @@ func (r *RouteTablesServerTransport) dispatchGet(req *http.Request) (*http.Respo Expand: expandParam, } } - respr, errRespr := r.srv.Get(req.Context(), resourceGroupNameUnescaped, routeTableNameUnescaped, options) + respr, errRespr := r.srv.Get(req.Context(), resourceGroupNameParam, routeTableNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -250,17 +250,17 @@ func (r *RouteTablesServerTransport) dispatchNewListPager(req *http.Request) (*h } newListPager := r.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeTables` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeTables` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := r.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := r.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp r.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.RouteTablesClientListResponse, createLink func() string) { @@ -287,7 +287,7 @@ func (r *RouteTablesServerTransport) dispatchNewListAllPager(req *http.Request) } newListAllPager := r.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeTables` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeTables` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -318,7 +318,7 @@ func (r *RouteTablesServerTransport) dispatchUpdateTags(req *http.Request) (*htt if r.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -328,15 +328,15 @@ func (r *RouteTablesServerTransport) dispatchUpdateTags(req *http.Request) (*htt if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - routeTableNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) + routeTableNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, routeTableNameUnescaped, body, nil) + respr, errRespr := r.srv.UpdateTags(req.Context(), resourceGroupNameParam, routeTableNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routingintent_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routingintent_server.go index 26c4468f4..cd4682e17 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routingintent_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/routingintent_server.go @@ -99,7 +99,7 @@ func (r *RoutingIntentServerTransport) dispatchBeginCreateOrUpdate(req *http.Req } beginCreateOrUpdate := r.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routingIntent/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routingIntent/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (r *RoutingIntentServerTransport) dispatchBeginCreateOrUpdate(req *http.Req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - routingIntentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routingIntentName")]) + routingIntentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routingIntentName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, routingIntentNameUnescaped, body, nil) + respr, errRespr := r.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, virtualHubNameParam, routingIntentNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (r *RoutingIntentServerTransport) dispatchBeginDelete(req *http.Request) (* } beginDelete := r.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routingIntent/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routingIntent/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - routingIntentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routingIntentName")]) + routingIntentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routingIntentName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, routingIntentNameUnescaped, nil) + respr, errRespr := r.srv.BeginDelete(req.Context(), resourceGroupNameParam, virtualHubNameParam, routingIntentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (r *RoutingIntentServerTransport) dispatchGet(req *http.Request) (*http.Res if r.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routingIntent/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routingIntent/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - routingIntentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routingIntentName")]) + routingIntentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routingIntentName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.Get(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, routingIntentNameUnescaped, nil) + respr, errRespr := r.srv.Get(req.Context(), resourceGroupNameParam, virtualHubNameParam, routingIntentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (r *RoutingIntentServerTransport) dispatchNewListPager(req *http.Request) ( } newListPager := r.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routingIntent` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routingIntent` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - resp := r.srv.NewListPager(resourceGroupNameUnescaped, virtualHubNameUnescaped, nil) + resp := r.srv.NewListPager(resourceGroupNameParam, virtualHubNameParam, nil) newListPager = &resp r.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.RoutingIntentClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/scopeconnections_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/scopeconnections_server.go index 22f7328aa..a60e45f1e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/scopeconnections_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/scopeconnections_server.go @@ -94,7 +94,7 @@ func (s *ScopeConnectionsServerTransport) dispatchCreateOrUpdate(req *http.Reque if s.srv.CreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdate not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/scopeConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/scopeConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -104,19 +104,19 @@ func (s *ScopeConnectionsServerTransport) dispatchCreateOrUpdate(req *http.Reque if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - scopeConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("scopeConnectionName")]) + scopeConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("scopeConnectionName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.CreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, scopeConnectionNameUnescaped, body, nil) + respr, errRespr := s.srv.CreateOrUpdate(req.Context(), resourceGroupNameParam, networkManagerNameParam, scopeConnectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -135,25 +135,25 @@ func (s *ScopeConnectionsServerTransport) dispatchDelete(req *http.Request) (*ht if s.srv.Delete == nil { return nil, &nonRetriableError{errors.New("fake for method Delete not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/scopeConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/scopeConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - scopeConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("scopeConnectionName")]) + scopeConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("scopeConnectionName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.Delete(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, scopeConnectionNameUnescaped, nil) + respr, errRespr := s.srv.Delete(req.Context(), resourceGroupNameParam, networkManagerNameParam, scopeConnectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -172,25 +172,25 @@ func (s *ScopeConnectionsServerTransport) dispatchGet(req *http.Request) (*http. if s.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/scopeConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/scopeConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - scopeConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("scopeConnectionName")]) + scopeConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("scopeConnectionName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, scopeConnectionNameUnescaped, nil) + respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameParam, networkManagerNameParam, scopeConnectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -211,18 +211,18 @@ func (s *ScopeConnectionsServerTransport) dispatchNewListPager(req *http.Request } newListPager := s.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/scopeConnections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/scopeConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } @@ -252,7 +252,7 @@ func (s *ScopeConnectionsServerTransport) dispatchNewListPager(req *http.Request SkipToken: skipTokenParam, } } - resp := s.srv.NewListPager(resourceGroupNameUnescaped, networkManagerNameUnescaped, options) + resp := s.srv.NewListPager(resourceGroupNameParam, networkManagerNameParam, options) newListPager = &resp s.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ScopeConnectionsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/securityadminconfigurations_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/securityadminconfigurations_server.go index 6f1cf7e02..2daa46b34 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/securityadminconfigurations_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/securityadminconfigurations_server.go @@ -96,7 +96,7 @@ func (s *SecurityAdminConfigurationsServerTransport) dispatchCreateOrUpdate(req if s.srv.CreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdate not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -106,19 +106,19 @@ func (s *SecurityAdminConfigurationsServerTransport) dispatchCreateOrUpdate(req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - configurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) + configurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.CreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, configurationNameUnescaped, body, nil) + respr, errRespr := s.srv.CreateOrUpdate(req.Context(), resourceGroupNameParam, networkManagerNameParam, configurationNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -139,22 +139,22 @@ func (s *SecurityAdminConfigurationsServerTransport) dispatchBeginDelete(req *ht } beginDelete := s.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - configurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) + configurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) if err != nil { return nil, err } @@ -172,7 +172,7 @@ func (s *SecurityAdminConfigurationsServerTransport) dispatchBeginDelete(req *ht Force: forceParam, } } - respr, errRespr := s.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, configurationNameUnescaped, options) + respr, errRespr := s.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkManagerNameParam, configurationNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -200,25 +200,25 @@ func (s *SecurityAdminConfigurationsServerTransport) dispatchGet(req *http.Reque if s.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - configurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) + configurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("configurationName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, configurationNameUnescaped, nil) + respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameParam, networkManagerNameParam, configurationNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -239,18 +239,18 @@ func (s *SecurityAdminConfigurationsServerTransport) dispatchNewListPager(req *h } newListPager := s.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } @@ -280,7 +280,7 @@ func (s *SecurityAdminConfigurationsServerTransport) dispatchNewListPager(req *h SkipToken: skipTokenParam, } } - resp := s.srv.NewListPager(resourceGroupNameUnescaped, networkManagerNameUnescaped, options) + resp := s.srv.NewListPager(resourceGroupNameParam, networkManagerNameParam, options) newListPager = &resp s.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.SecurityAdminConfigurationsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/securitygroups_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/securitygroups_server.go index 0cbecbba7..b7019e4d1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/securitygroups_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/securitygroups_server.go @@ -113,7 +113,7 @@ func (s *SecurityGroupsServerTransport) dispatchBeginCreateOrUpdate(req *http.Re } beginCreateOrUpdate := s.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (s *SecurityGroupsServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkSecurityGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) + networkSecurityGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkSecurityGroupNameUnescaped, body, nil) + respr, errRespr := s.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, networkSecurityGroupNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (s *SecurityGroupsServerTransport) dispatchBeginDelete(req *http.Request) ( } beginDelete := s.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkSecurityGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) + networkSecurityGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkSecurityGroupNameUnescaped, nil) + respr, errRespr := s.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkSecurityGroupNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,18 +203,18 @@ func (s *SecurityGroupsServerTransport) dispatchGet(req *http.Request) (*http.Re if s.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkSecurityGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) + networkSecurityGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) if err != nil { return nil, err } @@ -229,7 +229,7 @@ func (s *SecurityGroupsServerTransport) dispatchGet(req *http.Request) (*http.Re Expand: expandParam, } } - respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameUnescaped, networkSecurityGroupNameUnescaped, options) + respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameParam, networkSecurityGroupNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -250,17 +250,17 @@ func (s *SecurityGroupsServerTransport) dispatchNewListPager(req *http.Request) } newListPager := s.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkSecurityGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := s.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := s.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp s.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.SecurityGroupsClientListResponse, createLink func() string) { @@ -287,7 +287,7 @@ func (s *SecurityGroupsServerTransport) dispatchNewListAllPager(req *http.Reques } newListAllPager := s.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkSecurityGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -318,7 +318,7 @@ func (s *SecurityGroupsServerTransport) dispatchUpdateTags(req *http.Request) (* if s.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -328,15 +328,15 @@ func (s *SecurityGroupsServerTransport) dispatchUpdateTags(req *http.Request) (* if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkSecurityGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) + networkSecurityGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, networkSecurityGroupNameUnescaped, body, nil) + respr, errRespr := s.srv.UpdateTags(req.Context(), resourceGroupNameParam, networkSecurityGroupNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/securitypartnerproviders_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/securitypartnerproviders_server.go index cd425720d..40c931d4e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/securitypartnerproviders_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/securitypartnerproviders_server.go @@ -113,7 +113,7 @@ func (s *SecurityPartnerProvidersServerTransport) dispatchBeginCreateOrUpdate(re } beginCreateOrUpdate := s.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/securityPartnerProviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/securityPartnerProviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (s *SecurityPartnerProvidersServerTransport) dispatchBeginCreateOrUpdate(re if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - securityPartnerProviderNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("securityPartnerProviderName")]) + securityPartnerProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("securityPartnerProviderName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, securityPartnerProviderNameUnescaped, body, nil) + respr, errRespr := s.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, securityPartnerProviderNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (s *SecurityPartnerProvidersServerTransport) dispatchBeginDelete(req *http. } beginDelete := s.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/securityPartnerProviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/securityPartnerProviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - securityPartnerProviderNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("securityPartnerProviderName")]) + securityPartnerProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("securityPartnerProviderName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, securityPartnerProviderNameUnescaped, nil) + respr, errRespr := s.srv.BeginDelete(req.Context(), resourceGroupNameParam, securityPartnerProviderNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,21 +203,21 @@ func (s *SecurityPartnerProvidersServerTransport) dispatchGet(req *http.Request) if s.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/securityPartnerProviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/securityPartnerProviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - securityPartnerProviderNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("securityPartnerProviderName")]) + securityPartnerProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("securityPartnerProviderName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameUnescaped, securityPartnerProviderNameUnescaped, nil) + respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameParam, securityPartnerProviderNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -238,7 +238,7 @@ func (s *SecurityPartnerProvidersServerTransport) dispatchNewListPager(req *http } newListPager := s.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/securityPartnerProviders` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/securityPartnerProviders` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -271,17 +271,17 @@ func (s *SecurityPartnerProvidersServerTransport) dispatchNewListByResourceGroup } newListByResourceGroupPager := s.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/securityPartnerProviders` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/securityPartnerProviders` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := s.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := s.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp s.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.SecurityPartnerProvidersClientListByResourceGroupResponse, createLink func() string) { @@ -306,7 +306,7 @@ func (s *SecurityPartnerProvidersServerTransport) dispatchUpdateTags(req *http.R if s.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/securityPartnerProviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/securityPartnerProviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -316,15 +316,15 @@ func (s *SecurityPartnerProvidersServerTransport) dispatchUpdateTags(req *http.R if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - securityPartnerProviderNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("securityPartnerProviderName")]) + securityPartnerProviderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("securityPartnerProviderName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, securityPartnerProviderNameUnescaped, body, nil) + respr, errRespr := s.srv.UpdateTags(req.Context(), resourceGroupNameParam, securityPartnerProviderNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/securityrules_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/securityrules_server.go index 271383ee8..b295e6366 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/securityrules_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/securityrules_server.go @@ -99,7 +99,7 @@ func (s *SecurityRulesServerTransport) dispatchBeginCreateOrUpdate(req *http.Req } beginCreateOrUpdate := s.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (s *SecurityRulesServerTransport) dispatchBeginCreateOrUpdate(req *http.Req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkSecurityGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) + networkSecurityGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) if err != nil { return nil, err } - securityRuleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("securityRuleName")]) + securityRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("securityRuleName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkSecurityGroupNameUnescaped, securityRuleNameUnescaped, body, nil) + respr, errRespr := s.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, networkSecurityGroupNameParam, securityRuleNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (s *SecurityRulesServerTransport) dispatchBeginDelete(req *http.Request) (* } beginDelete := s.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkSecurityGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) + networkSecurityGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) if err != nil { return nil, err } - securityRuleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("securityRuleName")]) + securityRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("securityRuleName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkSecurityGroupNameUnescaped, securityRuleNameUnescaped, nil) + respr, errRespr := s.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkSecurityGroupNameParam, securityRuleNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (s *SecurityRulesServerTransport) dispatchGet(req *http.Request) (*http.Res if s.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkSecurityGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) + networkSecurityGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) if err != nil { return nil, err } - securityRuleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("securityRuleName")]) + securityRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("securityRuleName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameUnescaped, networkSecurityGroupNameUnescaped, securityRuleNameUnescaped, nil) + respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameParam, networkSecurityGroupNameParam, securityRuleNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (s *SecurityRulesServerTransport) dispatchNewListPager(req *http.Request) ( } newListPager := s.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityRules` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkSecurityGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) + networkSecurityGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityGroupName")]) if err != nil { return nil, err } - resp := s.srv.NewListPager(resourceGroupNameUnescaped, networkSecurityGroupNameUnescaped, nil) + resp := s.srv.NewListPager(resourceGroupNameParam, networkSecurityGroupNameParam, nil) newListPager = &resp s.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.SecurityRulesClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/server_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/server_factory.go new file mode 100644 index 000000000..00ddd9d46 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/server_factory.go @@ -0,0 +1,949 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "errors" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "strings" + "sync" +) + +// ServerFactory is a fake server for instances of the armnetwork.ClientFactory type. +type ServerFactory struct { + AdminRuleCollectionsServer AdminRuleCollectionsServer + AdminRulesServer AdminRulesServer + ApplicationGatewayPrivateEndpointConnectionsServer ApplicationGatewayPrivateEndpointConnectionsServer + ApplicationGatewayPrivateLinkResourcesServer ApplicationGatewayPrivateLinkResourcesServer + ApplicationGatewayWafDynamicManifestsServer ApplicationGatewayWafDynamicManifestsServer + ApplicationGatewayWafDynamicManifestsDefaultServer ApplicationGatewayWafDynamicManifestsDefaultServer + ApplicationGatewaysServer ApplicationGatewaysServer + ApplicationSecurityGroupsServer ApplicationSecurityGroupsServer + AvailableDelegationsServer AvailableDelegationsServer + AvailableEndpointServicesServer AvailableEndpointServicesServer + AvailablePrivateEndpointTypesServer AvailablePrivateEndpointTypesServer + AvailableResourceGroupDelegationsServer AvailableResourceGroupDelegationsServer + AvailableServiceAliasesServer AvailableServiceAliasesServer + AzureFirewallFqdnTagsServer AzureFirewallFqdnTagsServer + AzureFirewallsServer AzureFirewallsServer + BastionHostsServer BastionHostsServer + BgpServiceCommunitiesServer BgpServiceCommunitiesServer + ConfigurationPolicyGroupsServer ConfigurationPolicyGroupsServer + ConnectionMonitorsServer ConnectionMonitorsServer + ConnectivityConfigurationsServer ConnectivityConfigurationsServer + CustomIPPrefixesServer CustomIPPrefixesServer + DdosCustomPoliciesServer DdosCustomPoliciesServer + DdosProtectionPlansServer DdosProtectionPlansServer + DefaultSecurityRulesServer DefaultSecurityRulesServer + DscpConfigurationServer DscpConfigurationServer + ExpressRouteCircuitAuthorizationsServer ExpressRouteCircuitAuthorizationsServer + ExpressRouteCircuitConnectionsServer ExpressRouteCircuitConnectionsServer + ExpressRouteCircuitPeeringsServer ExpressRouteCircuitPeeringsServer + ExpressRouteCircuitsServer ExpressRouteCircuitsServer + ExpressRouteConnectionsServer ExpressRouteConnectionsServer + ExpressRouteCrossConnectionPeeringsServer ExpressRouteCrossConnectionPeeringsServer + ExpressRouteCrossConnectionsServer ExpressRouteCrossConnectionsServer + ExpressRouteGatewaysServer ExpressRouteGatewaysServer + ExpressRouteLinksServer ExpressRouteLinksServer + ExpressRoutePortAuthorizationsServer ExpressRoutePortAuthorizationsServer + ExpressRoutePortsServer ExpressRoutePortsServer + ExpressRoutePortsLocationsServer ExpressRoutePortsLocationsServer + ExpressRouteProviderPortsLocationServer ExpressRouteProviderPortsLocationServer + ExpressRouteServiceProvidersServer ExpressRouteServiceProvidersServer + FirewallPoliciesServer FirewallPoliciesServer + FirewallPolicyIdpsSignaturesServer FirewallPolicyIdpsSignaturesServer + FirewallPolicyIdpsSignaturesFilterValuesServer FirewallPolicyIdpsSignaturesFilterValuesServer + FirewallPolicyIdpsSignaturesOverridesServer FirewallPolicyIdpsSignaturesOverridesServer + FirewallPolicyRuleCollectionGroupsServer FirewallPolicyRuleCollectionGroupsServer + FlowLogsServer FlowLogsServer + GroupsServer GroupsServer + HubRouteTablesServer HubRouteTablesServer + HubVirtualNetworkConnectionsServer HubVirtualNetworkConnectionsServer + IPAllocationsServer IPAllocationsServer + IPGroupsServer IPGroupsServer + InboundNatRulesServer InboundNatRulesServer + InboundSecurityRuleServer InboundSecurityRuleServer + InterfaceIPConfigurationsServer InterfaceIPConfigurationsServer + InterfaceLoadBalancersServer InterfaceLoadBalancersServer + InterfaceTapConfigurationsServer InterfaceTapConfigurationsServer + InterfacesServer InterfacesServer + LoadBalancerBackendAddressPoolsServer LoadBalancerBackendAddressPoolsServer + LoadBalancerFrontendIPConfigurationsServer LoadBalancerFrontendIPConfigurationsServer + LoadBalancerLoadBalancingRulesServer LoadBalancerLoadBalancingRulesServer + LoadBalancerNetworkInterfacesServer LoadBalancerNetworkInterfacesServer + LoadBalancerOutboundRulesServer LoadBalancerOutboundRulesServer + LoadBalancerProbesServer LoadBalancerProbesServer + LoadBalancersServer LoadBalancersServer + LocalNetworkGatewaysServer LocalNetworkGatewaysServer + ManagementServer ManagementServer + ManagementGroupNetworkManagerConnectionsServer ManagementGroupNetworkManagerConnectionsServer + ManagerCommitsServer ManagerCommitsServer + ManagerDeploymentStatusServer ManagerDeploymentStatusServer + ManagersServer ManagersServer + NatGatewaysServer NatGatewaysServer + NatRulesServer NatRulesServer + OperationsServer OperationsServer + P2SVPNGatewaysServer P2SVPNGatewaysServer + PacketCapturesServer PacketCapturesServer + PeerExpressRouteCircuitConnectionsServer PeerExpressRouteCircuitConnectionsServer + PrivateDNSZoneGroupsServer PrivateDNSZoneGroupsServer + PrivateEndpointsServer PrivateEndpointsServer + PrivateLinkServicesServer PrivateLinkServicesServer + ProfilesServer ProfilesServer + PublicIPAddressesServer PublicIPAddressesServer + PublicIPPrefixesServer PublicIPPrefixesServer + ResourceNavigationLinksServer ResourceNavigationLinksServer + RouteFilterRulesServer RouteFilterRulesServer + RouteFiltersServer RouteFiltersServer + RouteMapsServer RouteMapsServer + RouteTablesServer RouteTablesServer + RoutesServer RoutesServer + RoutingIntentServer RoutingIntentServer + ScopeConnectionsServer ScopeConnectionsServer + SecurityAdminConfigurationsServer SecurityAdminConfigurationsServer + SecurityGroupsServer SecurityGroupsServer + SecurityPartnerProvidersServer SecurityPartnerProvidersServer + SecurityRulesServer SecurityRulesServer + ServiceAssociationLinksServer ServiceAssociationLinksServer + ServiceEndpointPoliciesServer ServiceEndpointPoliciesServer + ServiceEndpointPolicyDefinitionsServer ServiceEndpointPolicyDefinitionsServer + ServiceTagInformationServer ServiceTagInformationServer + ServiceTagsServer ServiceTagsServer + StaticMembersServer StaticMembersServer + SubnetsServer SubnetsServer + SubscriptionNetworkManagerConnectionsServer SubscriptionNetworkManagerConnectionsServer + UsagesServer UsagesServer + VPNConnectionsServer VPNConnectionsServer + VPNGatewaysServer VPNGatewaysServer + VPNLinkConnectionsServer VPNLinkConnectionsServer + VPNServerConfigurationsAssociatedWithVirtualWanServer VPNServerConfigurationsAssociatedWithVirtualWanServer + VPNServerConfigurationsServer VPNServerConfigurationsServer + VPNSiteLinkConnectionsServer VPNSiteLinkConnectionsServer + VPNSiteLinksServer VPNSiteLinksServer + VPNSitesServer VPNSitesServer + VPNSitesConfigurationServer VPNSitesConfigurationServer + VipSwapServer VipSwapServer + VirtualApplianceConnectionsServer VirtualApplianceConnectionsServer + VirtualApplianceSKUsServer VirtualApplianceSKUsServer + VirtualApplianceSitesServer VirtualApplianceSitesServer + VirtualAppliancesServer VirtualAppliancesServer + VirtualHubBgpConnectionServer VirtualHubBgpConnectionServer + VirtualHubBgpConnectionsServer VirtualHubBgpConnectionsServer + VirtualHubIPConfigurationServer VirtualHubIPConfigurationServer + VirtualHubRouteTableV2SServer VirtualHubRouteTableV2SServer + VirtualHubsServer VirtualHubsServer + VirtualNetworkGatewayConnectionsServer VirtualNetworkGatewayConnectionsServer + VirtualNetworkGatewayNatRulesServer VirtualNetworkGatewayNatRulesServer + VirtualNetworkGatewaysServer VirtualNetworkGatewaysServer + VirtualNetworkPeeringsServer VirtualNetworkPeeringsServer + VirtualNetworkTapsServer VirtualNetworkTapsServer + VirtualNetworksServer VirtualNetworksServer + VirtualRouterPeeringsServer VirtualRouterPeeringsServer + VirtualRoutersServer VirtualRoutersServer + VirtualWansServer VirtualWansServer + WatchersServer WatchersServer + WebApplicationFirewallPoliciesServer WebApplicationFirewallPoliciesServer + WebCategoriesServer WebCategoriesServer +} + +// NewServerFactoryTransport creates a new instance of ServerFactoryTransport with the provided implementation. +// The returned ServerFactoryTransport instance is connected to an instance of armnetwork.ClientFactory via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewServerFactoryTransport(srv *ServerFactory) *ServerFactoryTransport { + return &ServerFactoryTransport{ + srv: srv, + } +} + +// ServerFactoryTransport connects instances of armnetwork.ClientFactory to instances of ServerFactory. +// Don't use this type directly, use NewServerFactoryTransport instead. +type ServerFactoryTransport struct { + srv *ServerFactory + trMu sync.Mutex + trAdminRuleCollectionsServer *AdminRuleCollectionsServerTransport + trAdminRulesServer *AdminRulesServerTransport + trApplicationGatewayPrivateEndpointConnectionsServer *ApplicationGatewayPrivateEndpointConnectionsServerTransport + trApplicationGatewayPrivateLinkResourcesServer *ApplicationGatewayPrivateLinkResourcesServerTransport + trApplicationGatewayWafDynamicManifestsServer *ApplicationGatewayWafDynamicManifestsServerTransport + trApplicationGatewayWafDynamicManifestsDefaultServer *ApplicationGatewayWafDynamicManifestsDefaultServerTransport + trApplicationGatewaysServer *ApplicationGatewaysServerTransport + trApplicationSecurityGroupsServer *ApplicationSecurityGroupsServerTransport + trAvailableDelegationsServer *AvailableDelegationsServerTransport + trAvailableEndpointServicesServer *AvailableEndpointServicesServerTransport + trAvailablePrivateEndpointTypesServer *AvailablePrivateEndpointTypesServerTransport + trAvailableResourceGroupDelegationsServer *AvailableResourceGroupDelegationsServerTransport + trAvailableServiceAliasesServer *AvailableServiceAliasesServerTransport + trAzureFirewallFqdnTagsServer *AzureFirewallFqdnTagsServerTransport + trAzureFirewallsServer *AzureFirewallsServerTransport + trBastionHostsServer *BastionHostsServerTransport + trBgpServiceCommunitiesServer *BgpServiceCommunitiesServerTransport + trConfigurationPolicyGroupsServer *ConfigurationPolicyGroupsServerTransport + trConnectionMonitorsServer *ConnectionMonitorsServerTransport + trConnectivityConfigurationsServer *ConnectivityConfigurationsServerTransport + trCustomIPPrefixesServer *CustomIPPrefixesServerTransport + trDdosCustomPoliciesServer *DdosCustomPoliciesServerTransport + trDdosProtectionPlansServer *DdosProtectionPlansServerTransport + trDefaultSecurityRulesServer *DefaultSecurityRulesServerTransport + trDscpConfigurationServer *DscpConfigurationServerTransport + trExpressRouteCircuitAuthorizationsServer *ExpressRouteCircuitAuthorizationsServerTransport + trExpressRouteCircuitConnectionsServer *ExpressRouteCircuitConnectionsServerTransport + trExpressRouteCircuitPeeringsServer *ExpressRouteCircuitPeeringsServerTransport + trExpressRouteCircuitsServer *ExpressRouteCircuitsServerTransport + trExpressRouteConnectionsServer *ExpressRouteConnectionsServerTransport + trExpressRouteCrossConnectionPeeringsServer *ExpressRouteCrossConnectionPeeringsServerTransport + trExpressRouteCrossConnectionsServer *ExpressRouteCrossConnectionsServerTransport + trExpressRouteGatewaysServer *ExpressRouteGatewaysServerTransport + trExpressRouteLinksServer *ExpressRouteLinksServerTransport + trExpressRoutePortAuthorizationsServer *ExpressRoutePortAuthorizationsServerTransport + trExpressRoutePortsServer *ExpressRoutePortsServerTransport + trExpressRoutePortsLocationsServer *ExpressRoutePortsLocationsServerTransport + trExpressRouteProviderPortsLocationServer *ExpressRouteProviderPortsLocationServerTransport + trExpressRouteServiceProvidersServer *ExpressRouteServiceProvidersServerTransport + trFirewallPoliciesServer *FirewallPoliciesServerTransport + trFirewallPolicyIdpsSignaturesServer *FirewallPolicyIdpsSignaturesServerTransport + trFirewallPolicyIdpsSignaturesFilterValuesServer *FirewallPolicyIdpsSignaturesFilterValuesServerTransport + trFirewallPolicyIdpsSignaturesOverridesServer *FirewallPolicyIdpsSignaturesOverridesServerTransport + trFirewallPolicyRuleCollectionGroupsServer *FirewallPolicyRuleCollectionGroupsServerTransport + trFlowLogsServer *FlowLogsServerTransport + trGroupsServer *GroupsServerTransport + trHubRouteTablesServer *HubRouteTablesServerTransport + trHubVirtualNetworkConnectionsServer *HubVirtualNetworkConnectionsServerTransport + trIPAllocationsServer *IPAllocationsServerTransport + trIPGroupsServer *IPGroupsServerTransport + trInboundNatRulesServer *InboundNatRulesServerTransport + trInboundSecurityRuleServer *InboundSecurityRuleServerTransport + trInterfaceIPConfigurationsServer *InterfaceIPConfigurationsServerTransport + trInterfaceLoadBalancersServer *InterfaceLoadBalancersServerTransport + trInterfaceTapConfigurationsServer *InterfaceTapConfigurationsServerTransport + trInterfacesServer *InterfacesServerTransport + trLoadBalancerBackendAddressPoolsServer *LoadBalancerBackendAddressPoolsServerTransport + trLoadBalancerFrontendIPConfigurationsServer *LoadBalancerFrontendIPConfigurationsServerTransport + trLoadBalancerLoadBalancingRulesServer *LoadBalancerLoadBalancingRulesServerTransport + trLoadBalancerNetworkInterfacesServer *LoadBalancerNetworkInterfacesServerTransport + trLoadBalancerOutboundRulesServer *LoadBalancerOutboundRulesServerTransport + trLoadBalancerProbesServer *LoadBalancerProbesServerTransport + trLoadBalancersServer *LoadBalancersServerTransport + trLocalNetworkGatewaysServer *LocalNetworkGatewaysServerTransport + trManagementServer *ManagementServerTransport + trManagementGroupNetworkManagerConnectionsServer *ManagementGroupNetworkManagerConnectionsServerTransport + trManagerCommitsServer *ManagerCommitsServerTransport + trManagerDeploymentStatusServer *ManagerDeploymentStatusServerTransport + trManagersServer *ManagersServerTransport + trNatGatewaysServer *NatGatewaysServerTransport + trNatRulesServer *NatRulesServerTransport + trOperationsServer *OperationsServerTransport + trP2SVPNGatewaysServer *P2SVPNGatewaysServerTransport + trPacketCapturesServer *PacketCapturesServerTransport + trPeerExpressRouteCircuitConnectionsServer *PeerExpressRouteCircuitConnectionsServerTransport + trPrivateDNSZoneGroupsServer *PrivateDNSZoneGroupsServerTransport + trPrivateEndpointsServer *PrivateEndpointsServerTransport + trPrivateLinkServicesServer *PrivateLinkServicesServerTransport + trProfilesServer *ProfilesServerTransport + trPublicIPAddressesServer *PublicIPAddressesServerTransport + trPublicIPPrefixesServer *PublicIPPrefixesServerTransport + trResourceNavigationLinksServer *ResourceNavigationLinksServerTransport + trRouteFilterRulesServer *RouteFilterRulesServerTransport + trRouteFiltersServer *RouteFiltersServerTransport + trRouteMapsServer *RouteMapsServerTransport + trRouteTablesServer *RouteTablesServerTransport + trRoutesServer *RoutesServerTransport + trRoutingIntentServer *RoutingIntentServerTransport + trScopeConnectionsServer *ScopeConnectionsServerTransport + trSecurityAdminConfigurationsServer *SecurityAdminConfigurationsServerTransport + trSecurityGroupsServer *SecurityGroupsServerTransport + trSecurityPartnerProvidersServer *SecurityPartnerProvidersServerTransport + trSecurityRulesServer *SecurityRulesServerTransport + trServiceAssociationLinksServer *ServiceAssociationLinksServerTransport + trServiceEndpointPoliciesServer *ServiceEndpointPoliciesServerTransport + trServiceEndpointPolicyDefinitionsServer *ServiceEndpointPolicyDefinitionsServerTransport + trServiceTagInformationServer *ServiceTagInformationServerTransport + trServiceTagsServer *ServiceTagsServerTransport + trStaticMembersServer *StaticMembersServerTransport + trSubnetsServer *SubnetsServerTransport + trSubscriptionNetworkManagerConnectionsServer *SubscriptionNetworkManagerConnectionsServerTransport + trUsagesServer *UsagesServerTransport + trVPNConnectionsServer *VPNConnectionsServerTransport + trVPNGatewaysServer *VPNGatewaysServerTransport + trVPNLinkConnectionsServer *VPNLinkConnectionsServerTransport + trVPNServerConfigurationsAssociatedWithVirtualWanServer *VPNServerConfigurationsAssociatedWithVirtualWanServerTransport + trVPNServerConfigurationsServer *VPNServerConfigurationsServerTransport + trVPNSiteLinkConnectionsServer *VPNSiteLinkConnectionsServerTransport + trVPNSiteLinksServer *VPNSiteLinksServerTransport + trVPNSitesServer *VPNSitesServerTransport + trVPNSitesConfigurationServer *VPNSitesConfigurationServerTransport + trVipSwapServer *VipSwapServerTransport + trVirtualApplianceConnectionsServer *VirtualApplianceConnectionsServerTransport + trVirtualApplianceSKUsServer *VirtualApplianceSKUsServerTransport + trVirtualApplianceSitesServer *VirtualApplianceSitesServerTransport + trVirtualAppliancesServer *VirtualAppliancesServerTransport + trVirtualHubBgpConnectionServer *VirtualHubBgpConnectionServerTransport + trVirtualHubBgpConnectionsServer *VirtualHubBgpConnectionsServerTransport + trVirtualHubIPConfigurationServer *VirtualHubIPConfigurationServerTransport + trVirtualHubRouteTableV2SServer *VirtualHubRouteTableV2SServerTransport + trVirtualHubsServer *VirtualHubsServerTransport + trVirtualNetworkGatewayConnectionsServer *VirtualNetworkGatewayConnectionsServerTransport + trVirtualNetworkGatewayNatRulesServer *VirtualNetworkGatewayNatRulesServerTransport + trVirtualNetworkGatewaysServer *VirtualNetworkGatewaysServerTransport + trVirtualNetworkPeeringsServer *VirtualNetworkPeeringsServerTransport + trVirtualNetworkTapsServer *VirtualNetworkTapsServerTransport + trVirtualNetworksServer *VirtualNetworksServerTransport + trVirtualRouterPeeringsServer *VirtualRouterPeeringsServerTransport + trVirtualRoutersServer *VirtualRoutersServerTransport + trVirtualWansServer *VirtualWansServerTransport + trWatchersServer *WatchersServerTransport + trWebApplicationFirewallPoliciesServer *WebApplicationFirewallPoliciesServerTransport + trWebCategoriesServer *WebCategoriesServerTransport +} + +// Do implements the policy.Transporter interface for ServerFactoryTransport. +func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + client := method[:strings.Index(method, ".")] + var resp *http.Response + var err error + + switch client { + case "AdminRuleCollectionsClient": + initServer(s, &s.trAdminRuleCollectionsServer, func() *AdminRuleCollectionsServerTransport { + return NewAdminRuleCollectionsServerTransport(&s.srv.AdminRuleCollectionsServer) + }) + resp, err = s.trAdminRuleCollectionsServer.Do(req) + case "AdminRulesClient": + initServer(s, &s.trAdminRulesServer, func() *AdminRulesServerTransport { return NewAdminRulesServerTransport(&s.srv.AdminRulesServer) }) + resp, err = s.trAdminRulesServer.Do(req) + case "ApplicationGatewayPrivateEndpointConnectionsClient": + initServer(s, &s.trApplicationGatewayPrivateEndpointConnectionsServer, func() *ApplicationGatewayPrivateEndpointConnectionsServerTransport { + return NewApplicationGatewayPrivateEndpointConnectionsServerTransport(&s.srv.ApplicationGatewayPrivateEndpointConnectionsServer) + }) + resp, err = s.trApplicationGatewayPrivateEndpointConnectionsServer.Do(req) + case "ApplicationGatewayPrivateLinkResourcesClient": + initServer(s, &s.trApplicationGatewayPrivateLinkResourcesServer, func() *ApplicationGatewayPrivateLinkResourcesServerTransport { + return NewApplicationGatewayPrivateLinkResourcesServerTransport(&s.srv.ApplicationGatewayPrivateLinkResourcesServer) + }) + resp, err = s.trApplicationGatewayPrivateLinkResourcesServer.Do(req) + case "ApplicationGatewayWafDynamicManifestsClient": + initServer(s, &s.trApplicationGatewayWafDynamicManifestsServer, func() *ApplicationGatewayWafDynamicManifestsServerTransport { + return NewApplicationGatewayWafDynamicManifestsServerTransport(&s.srv.ApplicationGatewayWafDynamicManifestsServer) + }) + resp, err = s.trApplicationGatewayWafDynamicManifestsServer.Do(req) + case "ApplicationGatewayWafDynamicManifestsDefaultClient": + initServer(s, &s.trApplicationGatewayWafDynamicManifestsDefaultServer, func() *ApplicationGatewayWafDynamicManifestsDefaultServerTransport { + return NewApplicationGatewayWafDynamicManifestsDefaultServerTransport(&s.srv.ApplicationGatewayWafDynamicManifestsDefaultServer) + }) + resp, err = s.trApplicationGatewayWafDynamicManifestsDefaultServer.Do(req) + case "ApplicationGatewaysClient": + initServer(s, &s.trApplicationGatewaysServer, func() *ApplicationGatewaysServerTransport { + return NewApplicationGatewaysServerTransport(&s.srv.ApplicationGatewaysServer) + }) + resp, err = s.trApplicationGatewaysServer.Do(req) + case "ApplicationSecurityGroupsClient": + initServer(s, &s.trApplicationSecurityGroupsServer, func() *ApplicationSecurityGroupsServerTransport { + return NewApplicationSecurityGroupsServerTransport(&s.srv.ApplicationSecurityGroupsServer) + }) + resp, err = s.trApplicationSecurityGroupsServer.Do(req) + case "AvailableDelegationsClient": + initServer(s, &s.trAvailableDelegationsServer, func() *AvailableDelegationsServerTransport { + return NewAvailableDelegationsServerTransport(&s.srv.AvailableDelegationsServer) + }) + resp, err = s.trAvailableDelegationsServer.Do(req) + case "AvailableEndpointServicesClient": + initServer(s, &s.trAvailableEndpointServicesServer, func() *AvailableEndpointServicesServerTransport { + return NewAvailableEndpointServicesServerTransport(&s.srv.AvailableEndpointServicesServer) + }) + resp, err = s.trAvailableEndpointServicesServer.Do(req) + case "AvailablePrivateEndpointTypesClient": + initServer(s, &s.trAvailablePrivateEndpointTypesServer, func() *AvailablePrivateEndpointTypesServerTransport { + return NewAvailablePrivateEndpointTypesServerTransport(&s.srv.AvailablePrivateEndpointTypesServer) + }) + resp, err = s.trAvailablePrivateEndpointTypesServer.Do(req) + case "AvailableResourceGroupDelegationsClient": + initServer(s, &s.trAvailableResourceGroupDelegationsServer, func() *AvailableResourceGroupDelegationsServerTransport { + return NewAvailableResourceGroupDelegationsServerTransport(&s.srv.AvailableResourceGroupDelegationsServer) + }) + resp, err = s.trAvailableResourceGroupDelegationsServer.Do(req) + case "AvailableServiceAliasesClient": + initServer(s, &s.trAvailableServiceAliasesServer, func() *AvailableServiceAliasesServerTransport { + return NewAvailableServiceAliasesServerTransport(&s.srv.AvailableServiceAliasesServer) + }) + resp, err = s.trAvailableServiceAliasesServer.Do(req) + case "AzureFirewallFqdnTagsClient": + initServer(s, &s.trAzureFirewallFqdnTagsServer, func() *AzureFirewallFqdnTagsServerTransport { + return NewAzureFirewallFqdnTagsServerTransport(&s.srv.AzureFirewallFqdnTagsServer) + }) + resp, err = s.trAzureFirewallFqdnTagsServer.Do(req) + case "AzureFirewallsClient": + initServer(s, &s.trAzureFirewallsServer, func() *AzureFirewallsServerTransport { + return NewAzureFirewallsServerTransport(&s.srv.AzureFirewallsServer) + }) + resp, err = s.trAzureFirewallsServer.Do(req) + case "BastionHostsClient": + initServer(s, &s.trBastionHostsServer, func() *BastionHostsServerTransport { return NewBastionHostsServerTransport(&s.srv.BastionHostsServer) }) + resp, err = s.trBastionHostsServer.Do(req) + case "BgpServiceCommunitiesClient": + initServer(s, &s.trBgpServiceCommunitiesServer, func() *BgpServiceCommunitiesServerTransport { + return NewBgpServiceCommunitiesServerTransport(&s.srv.BgpServiceCommunitiesServer) + }) + resp, err = s.trBgpServiceCommunitiesServer.Do(req) + case "ConfigurationPolicyGroupsClient": + initServer(s, &s.trConfigurationPolicyGroupsServer, func() *ConfigurationPolicyGroupsServerTransport { + return NewConfigurationPolicyGroupsServerTransport(&s.srv.ConfigurationPolicyGroupsServer) + }) + resp, err = s.trConfigurationPolicyGroupsServer.Do(req) + case "ConnectionMonitorsClient": + initServer(s, &s.trConnectionMonitorsServer, func() *ConnectionMonitorsServerTransport { + return NewConnectionMonitorsServerTransport(&s.srv.ConnectionMonitorsServer) + }) + resp, err = s.trConnectionMonitorsServer.Do(req) + case "ConnectivityConfigurationsClient": + initServer(s, &s.trConnectivityConfigurationsServer, func() *ConnectivityConfigurationsServerTransport { + return NewConnectivityConfigurationsServerTransport(&s.srv.ConnectivityConfigurationsServer) + }) + resp, err = s.trConnectivityConfigurationsServer.Do(req) + case "CustomIPPrefixesClient": + initServer(s, &s.trCustomIPPrefixesServer, func() *CustomIPPrefixesServerTransport { + return NewCustomIPPrefixesServerTransport(&s.srv.CustomIPPrefixesServer) + }) + resp, err = s.trCustomIPPrefixesServer.Do(req) + case "DdosCustomPoliciesClient": + initServer(s, &s.trDdosCustomPoliciesServer, func() *DdosCustomPoliciesServerTransport { + return NewDdosCustomPoliciesServerTransport(&s.srv.DdosCustomPoliciesServer) + }) + resp, err = s.trDdosCustomPoliciesServer.Do(req) + case "DdosProtectionPlansClient": + initServer(s, &s.trDdosProtectionPlansServer, func() *DdosProtectionPlansServerTransport { + return NewDdosProtectionPlansServerTransport(&s.srv.DdosProtectionPlansServer) + }) + resp, err = s.trDdosProtectionPlansServer.Do(req) + case "DefaultSecurityRulesClient": + initServer(s, &s.trDefaultSecurityRulesServer, func() *DefaultSecurityRulesServerTransport { + return NewDefaultSecurityRulesServerTransport(&s.srv.DefaultSecurityRulesServer) + }) + resp, err = s.trDefaultSecurityRulesServer.Do(req) + case "DscpConfigurationClient": + initServer(s, &s.trDscpConfigurationServer, func() *DscpConfigurationServerTransport { + return NewDscpConfigurationServerTransport(&s.srv.DscpConfigurationServer) + }) + resp, err = s.trDscpConfigurationServer.Do(req) + case "ExpressRouteCircuitAuthorizationsClient": + initServer(s, &s.trExpressRouteCircuitAuthorizationsServer, func() *ExpressRouteCircuitAuthorizationsServerTransport { + return NewExpressRouteCircuitAuthorizationsServerTransport(&s.srv.ExpressRouteCircuitAuthorizationsServer) + }) + resp, err = s.trExpressRouteCircuitAuthorizationsServer.Do(req) + case "ExpressRouteCircuitConnectionsClient": + initServer(s, &s.trExpressRouteCircuitConnectionsServer, func() *ExpressRouteCircuitConnectionsServerTransport { + return NewExpressRouteCircuitConnectionsServerTransport(&s.srv.ExpressRouteCircuitConnectionsServer) + }) + resp, err = s.trExpressRouteCircuitConnectionsServer.Do(req) + case "ExpressRouteCircuitPeeringsClient": + initServer(s, &s.trExpressRouteCircuitPeeringsServer, func() *ExpressRouteCircuitPeeringsServerTransport { + return NewExpressRouteCircuitPeeringsServerTransport(&s.srv.ExpressRouteCircuitPeeringsServer) + }) + resp, err = s.trExpressRouteCircuitPeeringsServer.Do(req) + case "ExpressRouteCircuitsClient": + initServer(s, &s.trExpressRouteCircuitsServer, func() *ExpressRouteCircuitsServerTransport { + return NewExpressRouteCircuitsServerTransport(&s.srv.ExpressRouteCircuitsServer) + }) + resp, err = s.trExpressRouteCircuitsServer.Do(req) + case "ExpressRouteConnectionsClient": + initServer(s, &s.trExpressRouteConnectionsServer, func() *ExpressRouteConnectionsServerTransport { + return NewExpressRouteConnectionsServerTransport(&s.srv.ExpressRouteConnectionsServer) + }) + resp, err = s.trExpressRouteConnectionsServer.Do(req) + case "ExpressRouteCrossConnectionPeeringsClient": + initServer(s, &s.trExpressRouteCrossConnectionPeeringsServer, func() *ExpressRouteCrossConnectionPeeringsServerTransport { + return NewExpressRouteCrossConnectionPeeringsServerTransport(&s.srv.ExpressRouteCrossConnectionPeeringsServer) + }) + resp, err = s.trExpressRouteCrossConnectionPeeringsServer.Do(req) + case "ExpressRouteCrossConnectionsClient": + initServer(s, &s.trExpressRouteCrossConnectionsServer, func() *ExpressRouteCrossConnectionsServerTransport { + return NewExpressRouteCrossConnectionsServerTransport(&s.srv.ExpressRouteCrossConnectionsServer) + }) + resp, err = s.trExpressRouteCrossConnectionsServer.Do(req) + case "ExpressRouteGatewaysClient": + initServer(s, &s.trExpressRouteGatewaysServer, func() *ExpressRouteGatewaysServerTransport { + return NewExpressRouteGatewaysServerTransport(&s.srv.ExpressRouteGatewaysServer) + }) + resp, err = s.trExpressRouteGatewaysServer.Do(req) + case "ExpressRouteLinksClient": + initServer(s, &s.trExpressRouteLinksServer, func() *ExpressRouteLinksServerTransport { + return NewExpressRouteLinksServerTransport(&s.srv.ExpressRouteLinksServer) + }) + resp, err = s.trExpressRouteLinksServer.Do(req) + case "ExpressRoutePortAuthorizationsClient": + initServer(s, &s.trExpressRoutePortAuthorizationsServer, func() *ExpressRoutePortAuthorizationsServerTransport { + return NewExpressRoutePortAuthorizationsServerTransport(&s.srv.ExpressRoutePortAuthorizationsServer) + }) + resp, err = s.trExpressRoutePortAuthorizationsServer.Do(req) + case "ExpressRoutePortsClient": + initServer(s, &s.trExpressRoutePortsServer, func() *ExpressRoutePortsServerTransport { + return NewExpressRoutePortsServerTransport(&s.srv.ExpressRoutePortsServer) + }) + resp, err = s.trExpressRoutePortsServer.Do(req) + case "ExpressRoutePortsLocationsClient": + initServer(s, &s.trExpressRoutePortsLocationsServer, func() *ExpressRoutePortsLocationsServerTransport { + return NewExpressRoutePortsLocationsServerTransport(&s.srv.ExpressRoutePortsLocationsServer) + }) + resp, err = s.trExpressRoutePortsLocationsServer.Do(req) + case "ExpressRouteProviderPortsLocationClient": + initServer(s, &s.trExpressRouteProviderPortsLocationServer, func() *ExpressRouteProviderPortsLocationServerTransport { + return NewExpressRouteProviderPortsLocationServerTransport(&s.srv.ExpressRouteProviderPortsLocationServer) + }) + resp, err = s.trExpressRouteProviderPortsLocationServer.Do(req) + case "ExpressRouteServiceProvidersClient": + initServer(s, &s.trExpressRouteServiceProvidersServer, func() *ExpressRouteServiceProvidersServerTransport { + return NewExpressRouteServiceProvidersServerTransport(&s.srv.ExpressRouteServiceProvidersServer) + }) + resp, err = s.trExpressRouteServiceProvidersServer.Do(req) + case "FirewallPoliciesClient": + initServer(s, &s.trFirewallPoliciesServer, func() *FirewallPoliciesServerTransport { + return NewFirewallPoliciesServerTransport(&s.srv.FirewallPoliciesServer) + }) + resp, err = s.trFirewallPoliciesServer.Do(req) + case "FirewallPolicyIdpsSignaturesClient": + initServer(s, &s.trFirewallPolicyIdpsSignaturesServer, func() *FirewallPolicyIdpsSignaturesServerTransport { + return NewFirewallPolicyIdpsSignaturesServerTransport(&s.srv.FirewallPolicyIdpsSignaturesServer) + }) + resp, err = s.trFirewallPolicyIdpsSignaturesServer.Do(req) + case "FirewallPolicyIdpsSignaturesFilterValuesClient": + initServer(s, &s.trFirewallPolicyIdpsSignaturesFilterValuesServer, func() *FirewallPolicyIdpsSignaturesFilterValuesServerTransport { + return NewFirewallPolicyIdpsSignaturesFilterValuesServerTransport(&s.srv.FirewallPolicyIdpsSignaturesFilterValuesServer) + }) + resp, err = s.trFirewallPolicyIdpsSignaturesFilterValuesServer.Do(req) + case "FirewallPolicyIdpsSignaturesOverridesClient": + initServer(s, &s.trFirewallPolicyIdpsSignaturesOverridesServer, func() *FirewallPolicyIdpsSignaturesOverridesServerTransport { + return NewFirewallPolicyIdpsSignaturesOverridesServerTransport(&s.srv.FirewallPolicyIdpsSignaturesOverridesServer) + }) + resp, err = s.trFirewallPolicyIdpsSignaturesOverridesServer.Do(req) + case "FirewallPolicyRuleCollectionGroupsClient": + initServer(s, &s.trFirewallPolicyRuleCollectionGroupsServer, func() *FirewallPolicyRuleCollectionGroupsServerTransport { + return NewFirewallPolicyRuleCollectionGroupsServerTransport(&s.srv.FirewallPolicyRuleCollectionGroupsServer) + }) + resp, err = s.trFirewallPolicyRuleCollectionGroupsServer.Do(req) + case "FlowLogsClient": + initServer(s, &s.trFlowLogsServer, func() *FlowLogsServerTransport { return NewFlowLogsServerTransport(&s.srv.FlowLogsServer) }) + resp, err = s.trFlowLogsServer.Do(req) + case "GroupsClient": + initServer(s, &s.trGroupsServer, func() *GroupsServerTransport { return NewGroupsServerTransport(&s.srv.GroupsServer) }) + resp, err = s.trGroupsServer.Do(req) + case "HubRouteTablesClient": + initServer(s, &s.trHubRouteTablesServer, func() *HubRouteTablesServerTransport { + return NewHubRouteTablesServerTransport(&s.srv.HubRouteTablesServer) + }) + resp, err = s.trHubRouteTablesServer.Do(req) + case "HubVirtualNetworkConnectionsClient": + initServer(s, &s.trHubVirtualNetworkConnectionsServer, func() *HubVirtualNetworkConnectionsServerTransport { + return NewHubVirtualNetworkConnectionsServerTransport(&s.srv.HubVirtualNetworkConnectionsServer) + }) + resp, err = s.trHubVirtualNetworkConnectionsServer.Do(req) + case "IPAllocationsClient": + initServer(s, &s.trIPAllocationsServer, func() *IPAllocationsServerTransport { + return NewIPAllocationsServerTransport(&s.srv.IPAllocationsServer) + }) + resp, err = s.trIPAllocationsServer.Do(req) + case "IPGroupsClient": + initServer(s, &s.trIPGroupsServer, func() *IPGroupsServerTransport { return NewIPGroupsServerTransport(&s.srv.IPGroupsServer) }) + resp, err = s.trIPGroupsServer.Do(req) + case "InboundNatRulesClient": + initServer(s, &s.trInboundNatRulesServer, func() *InboundNatRulesServerTransport { + return NewInboundNatRulesServerTransport(&s.srv.InboundNatRulesServer) + }) + resp, err = s.trInboundNatRulesServer.Do(req) + case "InboundSecurityRuleClient": + initServer(s, &s.trInboundSecurityRuleServer, func() *InboundSecurityRuleServerTransport { + return NewInboundSecurityRuleServerTransport(&s.srv.InboundSecurityRuleServer) + }) + resp, err = s.trInboundSecurityRuleServer.Do(req) + case "InterfaceIPConfigurationsClient": + initServer(s, &s.trInterfaceIPConfigurationsServer, func() *InterfaceIPConfigurationsServerTransport { + return NewInterfaceIPConfigurationsServerTransport(&s.srv.InterfaceIPConfigurationsServer) + }) + resp, err = s.trInterfaceIPConfigurationsServer.Do(req) + case "InterfaceLoadBalancersClient": + initServer(s, &s.trInterfaceLoadBalancersServer, func() *InterfaceLoadBalancersServerTransport { + return NewInterfaceLoadBalancersServerTransport(&s.srv.InterfaceLoadBalancersServer) + }) + resp, err = s.trInterfaceLoadBalancersServer.Do(req) + case "InterfaceTapConfigurationsClient": + initServer(s, &s.trInterfaceTapConfigurationsServer, func() *InterfaceTapConfigurationsServerTransport { + return NewInterfaceTapConfigurationsServerTransport(&s.srv.InterfaceTapConfigurationsServer) + }) + resp, err = s.trInterfaceTapConfigurationsServer.Do(req) + case "InterfacesClient": + initServer(s, &s.trInterfacesServer, func() *InterfacesServerTransport { return NewInterfacesServerTransport(&s.srv.InterfacesServer) }) + resp, err = s.trInterfacesServer.Do(req) + case "LoadBalancerBackendAddressPoolsClient": + initServer(s, &s.trLoadBalancerBackendAddressPoolsServer, func() *LoadBalancerBackendAddressPoolsServerTransport { + return NewLoadBalancerBackendAddressPoolsServerTransport(&s.srv.LoadBalancerBackendAddressPoolsServer) + }) + resp, err = s.trLoadBalancerBackendAddressPoolsServer.Do(req) + case "LoadBalancerFrontendIPConfigurationsClient": + initServer(s, &s.trLoadBalancerFrontendIPConfigurationsServer, func() *LoadBalancerFrontendIPConfigurationsServerTransport { + return NewLoadBalancerFrontendIPConfigurationsServerTransport(&s.srv.LoadBalancerFrontendIPConfigurationsServer) + }) + resp, err = s.trLoadBalancerFrontendIPConfigurationsServer.Do(req) + case "LoadBalancerLoadBalancingRulesClient": + initServer(s, &s.trLoadBalancerLoadBalancingRulesServer, func() *LoadBalancerLoadBalancingRulesServerTransport { + return NewLoadBalancerLoadBalancingRulesServerTransport(&s.srv.LoadBalancerLoadBalancingRulesServer) + }) + resp, err = s.trLoadBalancerLoadBalancingRulesServer.Do(req) + case "LoadBalancerNetworkInterfacesClient": + initServer(s, &s.trLoadBalancerNetworkInterfacesServer, func() *LoadBalancerNetworkInterfacesServerTransport { + return NewLoadBalancerNetworkInterfacesServerTransport(&s.srv.LoadBalancerNetworkInterfacesServer) + }) + resp, err = s.trLoadBalancerNetworkInterfacesServer.Do(req) + case "LoadBalancerOutboundRulesClient": + initServer(s, &s.trLoadBalancerOutboundRulesServer, func() *LoadBalancerOutboundRulesServerTransport { + return NewLoadBalancerOutboundRulesServerTransport(&s.srv.LoadBalancerOutboundRulesServer) + }) + resp, err = s.trLoadBalancerOutboundRulesServer.Do(req) + case "LoadBalancerProbesClient": + initServer(s, &s.trLoadBalancerProbesServer, func() *LoadBalancerProbesServerTransport { + return NewLoadBalancerProbesServerTransport(&s.srv.LoadBalancerProbesServer) + }) + resp, err = s.trLoadBalancerProbesServer.Do(req) + case "LoadBalancersClient": + initServer(s, &s.trLoadBalancersServer, func() *LoadBalancersServerTransport { + return NewLoadBalancersServerTransport(&s.srv.LoadBalancersServer) + }) + resp, err = s.trLoadBalancersServer.Do(req) + case "LocalNetworkGatewaysClient": + initServer(s, &s.trLocalNetworkGatewaysServer, func() *LocalNetworkGatewaysServerTransport { + return NewLocalNetworkGatewaysServerTransport(&s.srv.LocalNetworkGatewaysServer) + }) + resp, err = s.trLocalNetworkGatewaysServer.Do(req) + case "ManagementClient": + initServer(s, &s.trManagementServer, func() *ManagementServerTransport { return NewManagementServerTransport(&s.srv.ManagementServer) }) + resp, err = s.trManagementServer.Do(req) + case "ManagementGroupNetworkManagerConnectionsClient": + initServer(s, &s.trManagementGroupNetworkManagerConnectionsServer, func() *ManagementGroupNetworkManagerConnectionsServerTransport { + return NewManagementGroupNetworkManagerConnectionsServerTransport(&s.srv.ManagementGroupNetworkManagerConnectionsServer) + }) + resp, err = s.trManagementGroupNetworkManagerConnectionsServer.Do(req) + case "ManagerCommitsClient": + initServer(s, &s.trManagerCommitsServer, func() *ManagerCommitsServerTransport { + return NewManagerCommitsServerTransport(&s.srv.ManagerCommitsServer) + }) + resp, err = s.trManagerCommitsServer.Do(req) + case "ManagerDeploymentStatusClient": + initServer(s, &s.trManagerDeploymentStatusServer, func() *ManagerDeploymentStatusServerTransport { + return NewManagerDeploymentStatusServerTransport(&s.srv.ManagerDeploymentStatusServer) + }) + resp, err = s.trManagerDeploymentStatusServer.Do(req) + case "ManagersClient": + initServer(s, &s.trManagersServer, func() *ManagersServerTransport { return NewManagersServerTransport(&s.srv.ManagersServer) }) + resp, err = s.trManagersServer.Do(req) + case "NatGatewaysClient": + initServer(s, &s.trNatGatewaysServer, func() *NatGatewaysServerTransport { return NewNatGatewaysServerTransport(&s.srv.NatGatewaysServer) }) + resp, err = s.trNatGatewaysServer.Do(req) + case "NatRulesClient": + initServer(s, &s.trNatRulesServer, func() *NatRulesServerTransport { return NewNatRulesServerTransport(&s.srv.NatRulesServer) }) + resp, err = s.trNatRulesServer.Do(req) + case "OperationsClient": + initServer(s, &s.trOperationsServer, func() *OperationsServerTransport { return NewOperationsServerTransport(&s.srv.OperationsServer) }) + resp, err = s.trOperationsServer.Do(req) + case "P2SVPNGatewaysClient": + initServer(s, &s.trP2SVPNGatewaysServer, func() *P2SVPNGatewaysServerTransport { + return NewP2SVPNGatewaysServerTransport(&s.srv.P2SVPNGatewaysServer) + }) + resp, err = s.trP2SVPNGatewaysServer.Do(req) + case "PacketCapturesClient": + initServer(s, &s.trPacketCapturesServer, func() *PacketCapturesServerTransport { + return NewPacketCapturesServerTransport(&s.srv.PacketCapturesServer) + }) + resp, err = s.trPacketCapturesServer.Do(req) + case "PeerExpressRouteCircuitConnectionsClient": + initServer(s, &s.trPeerExpressRouteCircuitConnectionsServer, func() *PeerExpressRouteCircuitConnectionsServerTransport { + return NewPeerExpressRouteCircuitConnectionsServerTransport(&s.srv.PeerExpressRouteCircuitConnectionsServer) + }) + resp, err = s.trPeerExpressRouteCircuitConnectionsServer.Do(req) + case "PrivateDNSZoneGroupsClient": + initServer(s, &s.trPrivateDNSZoneGroupsServer, func() *PrivateDNSZoneGroupsServerTransport { + return NewPrivateDNSZoneGroupsServerTransport(&s.srv.PrivateDNSZoneGroupsServer) + }) + resp, err = s.trPrivateDNSZoneGroupsServer.Do(req) + case "PrivateEndpointsClient": + initServer(s, &s.trPrivateEndpointsServer, func() *PrivateEndpointsServerTransport { + return NewPrivateEndpointsServerTransport(&s.srv.PrivateEndpointsServer) + }) + resp, err = s.trPrivateEndpointsServer.Do(req) + case "PrivateLinkServicesClient": + initServer(s, &s.trPrivateLinkServicesServer, func() *PrivateLinkServicesServerTransport { + return NewPrivateLinkServicesServerTransport(&s.srv.PrivateLinkServicesServer) + }) + resp, err = s.trPrivateLinkServicesServer.Do(req) + case "ProfilesClient": + initServer(s, &s.trProfilesServer, func() *ProfilesServerTransport { return NewProfilesServerTransport(&s.srv.ProfilesServer) }) + resp, err = s.trProfilesServer.Do(req) + case "PublicIPAddressesClient": + initServer(s, &s.trPublicIPAddressesServer, func() *PublicIPAddressesServerTransport { + return NewPublicIPAddressesServerTransport(&s.srv.PublicIPAddressesServer) + }) + resp, err = s.trPublicIPAddressesServer.Do(req) + case "PublicIPPrefixesClient": + initServer(s, &s.trPublicIPPrefixesServer, func() *PublicIPPrefixesServerTransport { + return NewPublicIPPrefixesServerTransport(&s.srv.PublicIPPrefixesServer) + }) + resp, err = s.trPublicIPPrefixesServer.Do(req) + case "ResourceNavigationLinksClient": + initServer(s, &s.trResourceNavigationLinksServer, func() *ResourceNavigationLinksServerTransport { + return NewResourceNavigationLinksServerTransport(&s.srv.ResourceNavigationLinksServer) + }) + resp, err = s.trResourceNavigationLinksServer.Do(req) + case "RouteFilterRulesClient": + initServer(s, &s.trRouteFilterRulesServer, func() *RouteFilterRulesServerTransport { + return NewRouteFilterRulesServerTransport(&s.srv.RouteFilterRulesServer) + }) + resp, err = s.trRouteFilterRulesServer.Do(req) + case "RouteFiltersClient": + initServer(s, &s.trRouteFiltersServer, func() *RouteFiltersServerTransport { return NewRouteFiltersServerTransport(&s.srv.RouteFiltersServer) }) + resp, err = s.trRouteFiltersServer.Do(req) + case "RouteMapsClient": + initServer(s, &s.trRouteMapsServer, func() *RouteMapsServerTransport { return NewRouteMapsServerTransport(&s.srv.RouteMapsServer) }) + resp, err = s.trRouteMapsServer.Do(req) + case "RouteTablesClient": + initServer(s, &s.trRouteTablesServer, func() *RouteTablesServerTransport { return NewRouteTablesServerTransport(&s.srv.RouteTablesServer) }) + resp, err = s.trRouteTablesServer.Do(req) + case "RoutesClient": + initServer(s, &s.trRoutesServer, func() *RoutesServerTransport { return NewRoutesServerTransport(&s.srv.RoutesServer) }) + resp, err = s.trRoutesServer.Do(req) + case "RoutingIntentClient": + initServer(s, &s.trRoutingIntentServer, func() *RoutingIntentServerTransport { + return NewRoutingIntentServerTransport(&s.srv.RoutingIntentServer) + }) + resp, err = s.trRoutingIntentServer.Do(req) + case "ScopeConnectionsClient": + initServer(s, &s.trScopeConnectionsServer, func() *ScopeConnectionsServerTransport { + return NewScopeConnectionsServerTransport(&s.srv.ScopeConnectionsServer) + }) + resp, err = s.trScopeConnectionsServer.Do(req) + case "SecurityAdminConfigurationsClient": + initServer(s, &s.trSecurityAdminConfigurationsServer, func() *SecurityAdminConfigurationsServerTransport { + return NewSecurityAdminConfigurationsServerTransport(&s.srv.SecurityAdminConfigurationsServer) + }) + resp, err = s.trSecurityAdminConfigurationsServer.Do(req) + case "SecurityGroupsClient": + initServer(s, &s.trSecurityGroupsServer, func() *SecurityGroupsServerTransport { + return NewSecurityGroupsServerTransport(&s.srv.SecurityGroupsServer) + }) + resp, err = s.trSecurityGroupsServer.Do(req) + case "SecurityPartnerProvidersClient": + initServer(s, &s.trSecurityPartnerProvidersServer, func() *SecurityPartnerProvidersServerTransport { + return NewSecurityPartnerProvidersServerTransport(&s.srv.SecurityPartnerProvidersServer) + }) + resp, err = s.trSecurityPartnerProvidersServer.Do(req) + case "SecurityRulesClient": + initServer(s, &s.trSecurityRulesServer, func() *SecurityRulesServerTransport { + return NewSecurityRulesServerTransport(&s.srv.SecurityRulesServer) + }) + resp, err = s.trSecurityRulesServer.Do(req) + case "ServiceAssociationLinksClient": + initServer(s, &s.trServiceAssociationLinksServer, func() *ServiceAssociationLinksServerTransport { + return NewServiceAssociationLinksServerTransport(&s.srv.ServiceAssociationLinksServer) + }) + resp, err = s.trServiceAssociationLinksServer.Do(req) + case "ServiceEndpointPoliciesClient": + initServer(s, &s.trServiceEndpointPoliciesServer, func() *ServiceEndpointPoliciesServerTransport { + return NewServiceEndpointPoliciesServerTransport(&s.srv.ServiceEndpointPoliciesServer) + }) + resp, err = s.trServiceEndpointPoliciesServer.Do(req) + case "ServiceEndpointPolicyDefinitionsClient": + initServer(s, &s.trServiceEndpointPolicyDefinitionsServer, func() *ServiceEndpointPolicyDefinitionsServerTransport { + return NewServiceEndpointPolicyDefinitionsServerTransport(&s.srv.ServiceEndpointPolicyDefinitionsServer) + }) + resp, err = s.trServiceEndpointPolicyDefinitionsServer.Do(req) + case "ServiceTagInformationClient": + initServer(s, &s.trServiceTagInformationServer, func() *ServiceTagInformationServerTransport { + return NewServiceTagInformationServerTransport(&s.srv.ServiceTagInformationServer) + }) + resp, err = s.trServiceTagInformationServer.Do(req) + case "ServiceTagsClient": + initServer(s, &s.trServiceTagsServer, func() *ServiceTagsServerTransport { return NewServiceTagsServerTransport(&s.srv.ServiceTagsServer) }) + resp, err = s.trServiceTagsServer.Do(req) + case "StaticMembersClient": + initServer(s, &s.trStaticMembersServer, func() *StaticMembersServerTransport { + return NewStaticMembersServerTransport(&s.srv.StaticMembersServer) + }) + resp, err = s.trStaticMembersServer.Do(req) + case "SubnetsClient": + initServer(s, &s.trSubnetsServer, func() *SubnetsServerTransport { return NewSubnetsServerTransport(&s.srv.SubnetsServer) }) + resp, err = s.trSubnetsServer.Do(req) + case "SubscriptionNetworkManagerConnectionsClient": + initServer(s, &s.trSubscriptionNetworkManagerConnectionsServer, func() *SubscriptionNetworkManagerConnectionsServerTransport { + return NewSubscriptionNetworkManagerConnectionsServerTransport(&s.srv.SubscriptionNetworkManagerConnectionsServer) + }) + resp, err = s.trSubscriptionNetworkManagerConnectionsServer.Do(req) + case "UsagesClient": + initServer(s, &s.trUsagesServer, func() *UsagesServerTransport { return NewUsagesServerTransport(&s.srv.UsagesServer) }) + resp, err = s.trUsagesServer.Do(req) + case "VPNConnectionsClient": + initServer(s, &s.trVPNConnectionsServer, func() *VPNConnectionsServerTransport { + return NewVPNConnectionsServerTransport(&s.srv.VPNConnectionsServer) + }) + resp, err = s.trVPNConnectionsServer.Do(req) + case "VPNGatewaysClient": + initServer(s, &s.trVPNGatewaysServer, func() *VPNGatewaysServerTransport { return NewVPNGatewaysServerTransport(&s.srv.VPNGatewaysServer) }) + resp, err = s.trVPNGatewaysServer.Do(req) + case "VPNLinkConnectionsClient": + initServer(s, &s.trVPNLinkConnectionsServer, func() *VPNLinkConnectionsServerTransport { + return NewVPNLinkConnectionsServerTransport(&s.srv.VPNLinkConnectionsServer) + }) + resp, err = s.trVPNLinkConnectionsServer.Do(req) + case "VPNServerConfigurationsAssociatedWithVirtualWanClient": + initServer(s, &s.trVPNServerConfigurationsAssociatedWithVirtualWanServer, func() *VPNServerConfigurationsAssociatedWithVirtualWanServerTransport { + return NewVPNServerConfigurationsAssociatedWithVirtualWanServerTransport(&s.srv.VPNServerConfigurationsAssociatedWithVirtualWanServer) + }) + resp, err = s.trVPNServerConfigurationsAssociatedWithVirtualWanServer.Do(req) + case "VPNServerConfigurationsClient": + initServer(s, &s.trVPNServerConfigurationsServer, func() *VPNServerConfigurationsServerTransport { + return NewVPNServerConfigurationsServerTransport(&s.srv.VPNServerConfigurationsServer) + }) + resp, err = s.trVPNServerConfigurationsServer.Do(req) + case "VPNSiteLinkConnectionsClient": + initServer(s, &s.trVPNSiteLinkConnectionsServer, func() *VPNSiteLinkConnectionsServerTransport { + return NewVPNSiteLinkConnectionsServerTransport(&s.srv.VPNSiteLinkConnectionsServer) + }) + resp, err = s.trVPNSiteLinkConnectionsServer.Do(req) + case "VPNSiteLinksClient": + initServer(s, &s.trVPNSiteLinksServer, func() *VPNSiteLinksServerTransport { return NewVPNSiteLinksServerTransport(&s.srv.VPNSiteLinksServer) }) + resp, err = s.trVPNSiteLinksServer.Do(req) + case "VPNSitesClient": + initServer(s, &s.trVPNSitesServer, func() *VPNSitesServerTransport { return NewVPNSitesServerTransport(&s.srv.VPNSitesServer) }) + resp, err = s.trVPNSitesServer.Do(req) + case "VPNSitesConfigurationClient": + initServer(s, &s.trVPNSitesConfigurationServer, func() *VPNSitesConfigurationServerTransport { + return NewVPNSitesConfigurationServerTransport(&s.srv.VPNSitesConfigurationServer) + }) + resp, err = s.trVPNSitesConfigurationServer.Do(req) + case "VipSwapClient": + initServer(s, &s.trVipSwapServer, func() *VipSwapServerTransport { return NewVipSwapServerTransport(&s.srv.VipSwapServer) }) + resp, err = s.trVipSwapServer.Do(req) + case "VirtualApplianceConnectionsClient": + initServer(s, &s.trVirtualApplianceConnectionsServer, func() *VirtualApplianceConnectionsServerTransport { + return NewVirtualApplianceConnectionsServerTransport(&s.srv.VirtualApplianceConnectionsServer) + }) + resp, err = s.trVirtualApplianceConnectionsServer.Do(req) + case "VirtualApplianceSKUsClient": + initServer(s, &s.trVirtualApplianceSKUsServer, func() *VirtualApplianceSKUsServerTransport { + return NewVirtualApplianceSKUsServerTransport(&s.srv.VirtualApplianceSKUsServer) + }) + resp, err = s.trVirtualApplianceSKUsServer.Do(req) + case "VirtualApplianceSitesClient": + initServer(s, &s.trVirtualApplianceSitesServer, func() *VirtualApplianceSitesServerTransport { + return NewVirtualApplianceSitesServerTransport(&s.srv.VirtualApplianceSitesServer) + }) + resp, err = s.trVirtualApplianceSitesServer.Do(req) + case "VirtualAppliancesClient": + initServer(s, &s.trVirtualAppliancesServer, func() *VirtualAppliancesServerTransport { + return NewVirtualAppliancesServerTransport(&s.srv.VirtualAppliancesServer) + }) + resp, err = s.trVirtualAppliancesServer.Do(req) + case "VirtualHubBgpConnectionClient": + initServer(s, &s.trVirtualHubBgpConnectionServer, func() *VirtualHubBgpConnectionServerTransport { + return NewVirtualHubBgpConnectionServerTransport(&s.srv.VirtualHubBgpConnectionServer) + }) + resp, err = s.trVirtualHubBgpConnectionServer.Do(req) + case "VirtualHubBgpConnectionsClient": + initServer(s, &s.trVirtualHubBgpConnectionsServer, func() *VirtualHubBgpConnectionsServerTransport { + return NewVirtualHubBgpConnectionsServerTransport(&s.srv.VirtualHubBgpConnectionsServer) + }) + resp, err = s.trVirtualHubBgpConnectionsServer.Do(req) + case "VirtualHubIPConfigurationClient": + initServer(s, &s.trVirtualHubIPConfigurationServer, func() *VirtualHubIPConfigurationServerTransport { + return NewVirtualHubIPConfigurationServerTransport(&s.srv.VirtualHubIPConfigurationServer) + }) + resp, err = s.trVirtualHubIPConfigurationServer.Do(req) + case "VirtualHubRouteTableV2SClient": + initServer(s, &s.trVirtualHubRouteTableV2SServer, func() *VirtualHubRouteTableV2SServerTransport { + return NewVirtualHubRouteTableV2SServerTransport(&s.srv.VirtualHubRouteTableV2SServer) + }) + resp, err = s.trVirtualHubRouteTableV2SServer.Do(req) + case "VirtualHubsClient": + initServer(s, &s.trVirtualHubsServer, func() *VirtualHubsServerTransport { return NewVirtualHubsServerTransport(&s.srv.VirtualHubsServer) }) + resp, err = s.trVirtualHubsServer.Do(req) + case "VirtualNetworkGatewayConnectionsClient": + initServer(s, &s.trVirtualNetworkGatewayConnectionsServer, func() *VirtualNetworkGatewayConnectionsServerTransport { + return NewVirtualNetworkGatewayConnectionsServerTransport(&s.srv.VirtualNetworkGatewayConnectionsServer) + }) + resp, err = s.trVirtualNetworkGatewayConnectionsServer.Do(req) + case "VirtualNetworkGatewayNatRulesClient": + initServer(s, &s.trVirtualNetworkGatewayNatRulesServer, func() *VirtualNetworkGatewayNatRulesServerTransport { + return NewVirtualNetworkGatewayNatRulesServerTransport(&s.srv.VirtualNetworkGatewayNatRulesServer) + }) + resp, err = s.trVirtualNetworkGatewayNatRulesServer.Do(req) + case "VirtualNetworkGatewaysClient": + initServer(s, &s.trVirtualNetworkGatewaysServer, func() *VirtualNetworkGatewaysServerTransport { + return NewVirtualNetworkGatewaysServerTransport(&s.srv.VirtualNetworkGatewaysServer) + }) + resp, err = s.trVirtualNetworkGatewaysServer.Do(req) + case "VirtualNetworkPeeringsClient": + initServer(s, &s.trVirtualNetworkPeeringsServer, func() *VirtualNetworkPeeringsServerTransport { + return NewVirtualNetworkPeeringsServerTransport(&s.srv.VirtualNetworkPeeringsServer) + }) + resp, err = s.trVirtualNetworkPeeringsServer.Do(req) + case "VirtualNetworkTapsClient": + initServer(s, &s.trVirtualNetworkTapsServer, func() *VirtualNetworkTapsServerTransport { + return NewVirtualNetworkTapsServerTransport(&s.srv.VirtualNetworkTapsServer) + }) + resp, err = s.trVirtualNetworkTapsServer.Do(req) + case "VirtualNetworksClient": + initServer(s, &s.trVirtualNetworksServer, func() *VirtualNetworksServerTransport { + return NewVirtualNetworksServerTransport(&s.srv.VirtualNetworksServer) + }) + resp, err = s.trVirtualNetworksServer.Do(req) + case "VirtualRouterPeeringsClient": + initServer(s, &s.trVirtualRouterPeeringsServer, func() *VirtualRouterPeeringsServerTransport { + return NewVirtualRouterPeeringsServerTransport(&s.srv.VirtualRouterPeeringsServer) + }) + resp, err = s.trVirtualRouterPeeringsServer.Do(req) + case "VirtualRoutersClient": + initServer(s, &s.trVirtualRoutersServer, func() *VirtualRoutersServerTransport { + return NewVirtualRoutersServerTransport(&s.srv.VirtualRoutersServer) + }) + resp, err = s.trVirtualRoutersServer.Do(req) + case "VirtualWansClient": + initServer(s, &s.trVirtualWansServer, func() *VirtualWansServerTransport { return NewVirtualWansServerTransport(&s.srv.VirtualWansServer) }) + resp, err = s.trVirtualWansServer.Do(req) + case "WatchersClient": + initServer(s, &s.trWatchersServer, func() *WatchersServerTransport { return NewWatchersServerTransport(&s.srv.WatchersServer) }) + resp, err = s.trWatchersServer.Do(req) + case "WebApplicationFirewallPoliciesClient": + initServer(s, &s.trWebApplicationFirewallPoliciesServer, func() *WebApplicationFirewallPoliciesServerTransport { + return NewWebApplicationFirewallPoliciesServerTransport(&s.srv.WebApplicationFirewallPoliciesServer) + }) + resp, err = s.trWebApplicationFirewallPoliciesServer.Do(req) + case "WebCategoriesClient": + initServer(s, &s.trWebCategoriesServer, func() *WebCategoriesServerTransport { + return NewWebCategoriesServerTransport(&s.srv.WebCategoriesServer) + }) + resp, err = s.trWebCategoriesServer.Do(req) + default: + err = fmt.Errorf("unhandled client %s", client) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func initServer[T any](s *ServerFactoryTransport, dst **T, src func() *T) { + s.trMu.Lock() + if *dst == nil { + *dst = src() + } + s.trMu.Unlock() +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/serviceassociationlinks_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/serviceassociationlinks_server.go index 1763cd55c..12b97981c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/serviceassociationlinks_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/serviceassociationlinks_server.go @@ -70,25 +70,25 @@ func (s *ServiceAssociationLinksServerTransport) dispatchList(req *http.Request) if s.srv.List == nil { return nil, &nonRetriableError{errors.New("fake for method List not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ServiceAssociationLinks` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ServiceAssociationLinks` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } - subnetNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("subnetName")]) + subnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("subnetName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.List(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, subnetNameUnescaped, nil) + respr, errRespr := s.srv.List(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, subnetNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/serviceendpointpolicies_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/serviceendpointpolicies_server.go index 252a3af00..0e499bb13 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/serviceendpointpolicies_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/serviceendpointpolicies_server.go @@ -113,7 +113,7 @@ func (s *ServiceEndpointPoliciesServerTransport) dispatchBeginCreateOrUpdate(req } beginCreateOrUpdate := s.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (s *ServiceEndpointPoliciesServerTransport) dispatchBeginCreateOrUpdate(req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - serviceEndpointPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyName")]) + serviceEndpointPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, serviceEndpointPolicyNameUnescaped, body, nil) + respr, errRespr := s.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, serviceEndpointPolicyNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (s *ServiceEndpointPoliciesServerTransport) dispatchBeginDelete(req *http.R } beginDelete := s.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - serviceEndpointPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyName")]) + serviceEndpointPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, serviceEndpointPolicyNameUnescaped, nil) + respr, errRespr := s.srv.BeginDelete(req.Context(), resourceGroupNameParam, serviceEndpointPolicyNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,18 +203,18 @@ func (s *ServiceEndpointPoliciesServerTransport) dispatchGet(req *http.Request) if s.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - serviceEndpointPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyName")]) + serviceEndpointPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyName")]) if err != nil { return nil, err } @@ -229,7 +229,7 @@ func (s *ServiceEndpointPoliciesServerTransport) dispatchGet(req *http.Request) Expand: expandParam, } } - respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameUnescaped, serviceEndpointPolicyNameUnescaped, options) + respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameParam, serviceEndpointPolicyNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -250,7 +250,7 @@ func (s *ServiceEndpointPoliciesServerTransport) dispatchNewListPager(req *http. } newListPager := s.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ServiceEndpointPolicies` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ServiceEndpointPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -283,17 +283,17 @@ func (s *ServiceEndpointPoliciesServerTransport) dispatchNewListByResourceGroupP } newListByResourceGroupPager := s.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/serviceEndpointPolicies` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/serviceEndpointPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := s.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := s.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp s.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.ServiceEndpointPoliciesClientListByResourceGroupResponse, createLink func() string) { @@ -318,7 +318,7 @@ func (s *ServiceEndpointPoliciesServerTransport) dispatchUpdateTags(req *http.Re if s.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -328,15 +328,15 @@ func (s *ServiceEndpointPoliciesServerTransport) dispatchUpdateTags(req *http.Re if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - serviceEndpointPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyName")]) + serviceEndpointPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, serviceEndpointPolicyNameUnescaped, body, nil) + respr, errRespr := s.srv.UpdateTags(req.Context(), resourceGroupNameParam, serviceEndpointPolicyNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/serviceendpointpolicydefinitions_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/serviceendpointpolicydefinitions_server.go index 21957e2e0..3544f2aa3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/serviceendpointpolicydefinitions_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/serviceendpointpolicydefinitions_server.go @@ -99,7 +99,7 @@ func (s *ServiceEndpointPolicyDefinitionsServerTransport) dispatchBeginCreateOrU } beginCreateOrUpdate := s.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceEndpointPolicyDefinitions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceEndpointPolicyDefinitions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (s *ServiceEndpointPolicyDefinitionsServerTransport) dispatchBeginCreateOrU if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - serviceEndpointPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyName")]) + serviceEndpointPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyName")]) if err != nil { return nil, err } - serviceEndpointPolicyDefinitionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyDefinitionName")]) + serviceEndpointPolicyDefinitionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyDefinitionName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, serviceEndpointPolicyNameUnescaped, serviceEndpointPolicyDefinitionNameUnescaped, body, nil) + respr, errRespr := s.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, serviceEndpointPolicyNameParam, serviceEndpointPolicyDefinitionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (s *ServiceEndpointPolicyDefinitionsServerTransport) dispatchBeginDelete(re } beginDelete := s.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceEndpointPolicyDefinitions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceEndpointPolicyDefinitions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - serviceEndpointPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyName")]) + serviceEndpointPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyName")]) if err != nil { return nil, err } - serviceEndpointPolicyDefinitionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyDefinitionName")]) + serviceEndpointPolicyDefinitionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyDefinitionName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, serviceEndpointPolicyNameUnescaped, serviceEndpointPolicyDefinitionNameUnescaped, nil) + respr, errRespr := s.srv.BeginDelete(req.Context(), resourceGroupNameParam, serviceEndpointPolicyNameParam, serviceEndpointPolicyDefinitionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (s *ServiceEndpointPolicyDefinitionsServerTransport) dispatchGet(req *http. if s.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceEndpointPolicyDefinitions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceEndpointPolicyDefinitions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - serviceEndpointPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyName")]) + serviceEndpointPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyName")]) if err != nil { return nil, err } - serviceEndpointPolicyDefinitionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyDefinitionName")]) + serviceEndpointPolicyDefinitionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyDefinitionName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameUnescaped, serviceEndpointPolicyNameUnescaped, serviceEndpointPolicyDefinitionNameUnescaped, nil) + respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameParam, serviceEndpointPolicyNameParam, serviceEndpointPolicyDefinitionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (s *ServiceEndpointPolicyDefinitionsServerTransport) dispatchNewListByResou } newListByResourceGroupPager := s.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceEndpointPolicyDefinitions` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceEndpointPolicyDefinitions` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - serviceEndpointPolicyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyName")]) + serviceEndpointPolicyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("serviceEndpointPolicyName")]) if err != nil { return nil, err } - resp := s.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, serviceEndpointPolicyNameUnescaped, nil) + resp := s.srv.NewListByResourceGroupPager(resourceGroupNameParam, serviceEndpointPolicyNameParam, nil) newListByResourceGroupPager = &resp s.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/servicetaginformation_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/servicetaginformation_server.go index 4852d5906..3caac1194 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/servicetaginformation_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/servicetaginformation_server.go @@ -77,14 +77,14 @@ func (s *ServiceTagInformationServerTransport) dispatchNewListPager(req *http.Re } newListPager := s.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceTagDetails` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceTagDetails` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } @@ -108,7 +108,7 @@ func (s *ServiceTagInformationServerTransport) dispatchNewListPager(req *http.Re TagName: tagNameParam, } } - resp := s.srv.NewListPager(locationUnescaped, options) + resp := s.srv.NewListPager(locationParam, options) newListPager = &resp s.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ServiceTagInformationClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/servicetags_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/servicetags_server.go index b012526f2..d01f788c5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/servicetags_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/servicetags_server.go @@ -70,17 +70,17 @@ func (s *ServiceTagsServerTransport) dispatchList(req *http.Request) (*http.Resp if s.srv.List == nil { return nil, &nonRetriableError{errors.New("fake for method List not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceTags` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceTags` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } - respr, errRespr := s.srv.List(req.Context(), locationUnescaped, nil) + respr, errRespr := s.srv.List(req.Context(), locationParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/staticmembers_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/staticmembers_server.go index 9ef37e79d..d7bcf6045 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/staticmembers_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/staticmembers_server.go @@ -94,7 +94,7 @@ func (s *StaticMembersServerTransport) dispatchCreateOrUpdate(req *http.Request) if s.srv.CreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdate not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/staticMembers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/staticMembers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { @@ -104,23 +104,23 @@ func (s *StaticMembersServerTransport) dispatchCreateOrUpdate(req *http.Request) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - networkGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkGroupName")]) + networkGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkGroupName")]) if err != nil { return nil, err } - staticMemberNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("staticMemberName")]) + staticMemberNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("staticMemberName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.CreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, networkGroupNameUnescaped, staticMemberNameUnescaped, body, nil) + respr, errRespr := s.srv.CreateOrUpdate(req.Context(), resourceGroupNameParam, networkManagerNameParam, networkGroupNameParam, staticMemberNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -139,29 +139,29 @@ func (s *StaticMembersServerTransport) dispatchDelete(req *http.Request) (*http. if s.srv.Delete == nil { return nil, &nonRetriableError{errors.New("fake for method Delete not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/staticMembers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/staticMembers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - networkGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkGroupName")]) + networkGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkGroupName")]) if err != nil { return nil, err } - staticMemberNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("staticMemberName")]) + staticMemberNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("staticMemberName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.Delete(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, networkGroupNameUnescaped, staticMemberNameUnescaped, nil) + respr, errRespr := s.srv.Delete(req.Context(), resourceGroupNameParam, networkManagerNameParam, networkGroupNameParam, staticMemberNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -180,29 +180,29 @@ func (s *StaticMembersServerTransport) dispatchGet(req *http.Request) (*http.Res if s.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/staticMembers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/staticMembers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - networkGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkGroupName")]) + networkGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkGroupName")]) if err != nil { return nil, err } - staticMemberNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("staticMemberName")]) + staticMemberNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("staticMemberName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameUnescaped, networkManagerNameUnescaped, networkGroupNameUnescaped, staticMemberNameUnescaped, nil) + respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameParam, networkManagerNameParam, networkGroupNameParam, staticMemberNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -223,22 +223,22 @@ func (s *StaticMembersServerTransport) dispatchNewListPager(req *http.Request) ( } newListPager := s.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/staticMembers` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/staticMembers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkManagerNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) + networkManagerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerName")]) if err != nil { return nil, err } - networkGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkGroupName")]) + networkGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkGroupName")]) if err != nil { return nil, err } @@ -268,7 +268,7 @@ func (s *StaticMembersServerTransport) dispatchNewListPager(req *http.Request) ( SkipToken: skipTokenParam, } } - resp := s.srv.NewListPager(resourceGroupNameUnescaped, networkManagerNameUnescaped, networkGroupNameUnescaped, options) + resp := s.srv.NewListPager(resourceGroupNameParam, networkManagerNameParam, networkGroupNameParam, options) newListPager = &resp s.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.StaticMembersClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/subnets_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/subnets_server.go index af7b09b58..2f60254cb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/subnets_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/subnets_server.go @@ -115,7 +115,7 @@ func (s *SubnetsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) } beginCreateOrUpdate := s.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -125,19 +125,19 @@ func (s *SubnetsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } - subnetNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("subnetName")]) + subnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("subnetName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, subnetNameUnescaped, body, nil) + respr, errRespr := s.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, subnetNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -167,25 +167,25 @@ func (s *SubnetsServerTransport) dispatchBeginDelete(req *http.Request) (*http.R } beginDelete := s.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } - subnetNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("subnetName")]) + subnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("subnetName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, subnetNameUnescaped, nil) + respr, errRespr := s.srv.BeginDelete(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, subnetNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -213,22 +213,22 @@ func (s *SubnetsServerTransport) dispatchGet(req *http.Request) (*http.Response, if s.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } - subnetNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("subnetName")]) + subnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("subnetName")]) if err != nil { return nil, err } @@ -243,7 +243,7 @@ func (s *SubnetsServerTransport) dispatchGet(req *http.Request) (*http.Response, Expand: expandParam, } } - respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, subnetNameUnescaped, options) + respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, subnetNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -264,21 +264,21 @@ func (s *SubnetsServerTransport) dispatchNewListPager(req *http.Request) (*http. } newListPager := s.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } - resp := s.srv.NewListPager(resourceGroupNameUnescaped, virtualNetworkNameUnescaped, nil) + resp := s.srv.NewListPager(resourceGroupNameParam, virtualNetworkNameParam, nil) newListPager = &resp s.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.SubnetsClientListResponse, createLink func() string) { @@ -305,7 +305,7 @@ func (s *SubnetsServerTransport) dispatchBeginPrepareNetworkPolicies(req *http.R } beginPrepareNetworkPolicies := s.beginPrepareNetworkPolicies.get(req) if beginPrepareNetworkPolicies == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/PrepareNetworkPolicies` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/PrepareNetworkPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -315,19 +315,19 @@ func (s *SubnetsServerTransport) dispatchBeginPrepareNetworkPolicies(req *http.R if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } - subnetNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("subnetName")]) + subnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("subnetName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginPrepareNetworkPolicies(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, subnetNameUnescaped, body, nil) + respr, errRespr := s.srv.BeginPrepareNetworkPolicies(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, subnetNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -357,7 +357,7 @@ func (s *SubnetsServerTransport) dispatchBeginUnprepareNetworkPolicies(req *http } beginUnprepareNetworkPolicies := s.beginUnprepareNetworkPolicies.get(req) if beginUnprepareNetworkPolicies == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/UnprepareNetworkPolicies` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/UnprepareNetworkPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -367,19 +367,19 @@ func (s *SubnetsServerTransport) dispatchBeginUnprepareNetworkPolicies(req *http if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } - subnetNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("subnetName")]) + subnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("subnetName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginUnprepareNetworkPolicies(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, subnetNameUnescaped, body, nil) + respr, errRespr := s.srv.BeginUnprepareNetworkPolicies(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, subnetNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/subscriptionnetworkmanagerconnections_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/subscriptionnetworkmanagerconnections_server.go index 473ce971d..221461657 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/subscriptionnetworkmanagerconnections_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/subscriptionnetworkmanagerconnections_server.go @@ -94,7 +94,7 @@ func (s *SubscriptionNetworkManagerConnectionsServerTransport) dispatchCreateOrU if s.srv.CreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdate not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagerConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagerConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { @@ -104,11 +104,11 @@ func (s *SubscriptionNetworkManagerConnectionsServerTransport) dispatchCreateOrU if err != nil { return nil, err } - networkManagerConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerConnectionName")]) + networkManagerConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerConnectionName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.CreateOrUpdate(req.Context(), networkManagerConnectionNameUnescaped, body, nil) + respr, errRespr := s.srv.CreateOrUpdate(req.Context(), networkManagerConnectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -127,17 +127,17 @@ func (s *SubscriptionNetworkManagerConnectionsServerTransport) dispatchDelete(re if s.srv.Delete == nil { return nil, &nonRetriableError{errors.New("fake for method Delete not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagerConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagerConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - networkManagerConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerConnectionName")]) + networkManagerConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerConnectionName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.Delete(req.Context(), networkManagerConnectionNameUnescaped, nil) + respr, errRespr := s.srv.Delete(req.Context(), networkManagerConnectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -156,17 +156,17 @@ func (s *SubscriptionNetworkManagerConnectionsServerTransport) dispatchGet(req * if s.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagerConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagerConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - networkManagerConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerConnectionName")]) + networkManagerConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkManagerConnectionName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.Get(req.Context(), networkManagerConnectionNameUnescaped, nil) + respr, errRespr := s.srv.Get(req.Context(), networkManagerConnectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -187,7 +187,7 @@ func (s *SubscriptionNetworkManagerConnectionsServerTransport) dispatchNewListPa } newListPager := s.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagerConnections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkManagerConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/time_rfc3339.go index 45fe10cbc..b0535a7b6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/time_rfc3339.go @@ -18,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -70,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/usages_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/usages_server.go index db795febd..e69a23a13 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/usages_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/usages_server.go @@ -76,17 +76,17 @@ func (u *UsagesServerTransport) dispatchNewListPager(req *http.Request) (*http.R } newListPager := u.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/usages` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/usages` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - locationUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) if err != nil { return nil, err } - resp := u.srv.NewListPager(locationUnescaped, nil) + resp := u.srv.NewListPager(locationParam, nil) newListPager = &resp u.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.UsagesClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vipswap_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vipswap_server.go index c919a1582..bab23f3a6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vipswap_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vipswap_server.go @@ -88,25 +88,25 @@ func (v *VipSwapServerTransport) dispatchBeginCreate(req *http.Request) (*http.R } beginCreate := v.beginCreate.get(req) if beginCreate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/cloudServiceSlots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/cloudServiceSlots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } body, err := server.UnmarshalRequestAsJSON[armnetwork.SwapResource](req) if err != nil { return nil, err } - groupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) + groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) if err != nil { return nil, err } - resourceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) + resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreate(req.Context(), groupNameUnescaped, resourceNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreate(req.Context(), groupNameParam, resourceNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -134,21 +134,21 @@ func (v *VipSwapServerTransport) dispatchGet(req *http.Request) (*http.Response, if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/cloudServiceSlots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/cloudServiceSlots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { + if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - groupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) + groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) if err != nil { return nil, err } - resourceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) + resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), groupNameUnescaped, resourceNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), groupNameParam, resourceNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -167,21 +167,21 @@ func (v *VipSwapServerTransport) dispatchList(req *http.Request) (*http.Response if v.srv.List == nil { return nil, &nonRetriableError{errors.New("fake for method List not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/cloudServiceSlots` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/cloudServiceSlots` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - groupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) + groupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupName")]) if err != nil { return nil, err } - resourceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) + resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.List(req.Context(), groupNameUnescaped, resourceNameUnescaped, nil) + respr, errRespr := v.srv.List(req.Context(), groupNameParam, resourceNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualapplianceconnections_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualapplianceconnections_server.go index 92a8e033d..55ad4e5b4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualapplianceconnections_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualapplianceconnections_server.go @@ -99,7 +99,7 @@ func (v *VirtualApplianceConnectionsServerTransport) dispatchBeginCreateOrUpdate } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkVirtualApplianceConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkVirtualApplianceConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (v *VirtualApplianceConnectionsServerTransport) dispatchBeginCreateOrUpdate if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkVirtualApplianceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) + networkVirtualApplianceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkVirtualApplianceNameUnescaped, connectionNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, networkVirtualApplianceNameParam, connectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (v *VirtualApplianceConnectionsServerTransport) dispatchBeginDelete(req *ht } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkVirtualApplianceConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkVirtualApplianceConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkVirtualApplianceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) + networkVirtualApplianceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkVirtualApplianceNameUnescaped, connectionNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkVirtualApplianceNameParam, connectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (v *VirtualApplianceConnectionsServerTransport) dispatchGet(req *http.Reque if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkVirtualApplianceConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkVirtualApplianceConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkVirtualApplianceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) + networkVirtualApplianceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, networkVirtualApplianceNameUnescaped, connectionNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, networkVirtualApplianceNameParam, connectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (v *VirtualApplianceConnectionsServerTransport) dispatchNewListPager(req *h } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkVirtualApplianceConnections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkVirtualApplianceConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkVirtualApplianceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) + networkVirtualApplianceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) if err != nil { return nil, err } - resp := v.srv.NewListPager(resourceGroupNameUnescaped, networkVirtualApplianceNameUnescaped, nil) + resp := v.srv.NewListPager(resourceGroupNameParam, networkVirtualApplianceNameParam, nil) newListPager = &resp v.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualApplianceConnectionsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualappliances_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualappliances_server.go index 972cd9e3a..3a345e4d6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualappliances_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualappliances_server.go @@ -113,7 +113,7 @@ func (v *VirtualAppliancesServerTransport) dispatchBeginCreateOrUpdate(req *http } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (v *VirtualAppliancesServerTransport) dispatchBeginCreateOrUpdate(req *http if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkVirtualApplianceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) + networkVirtualApplianceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkVirtualApplianceNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, networkVirtualApplianceNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (v *VirtualAppliancesServerTransport) dispatchBeginDelete(req *http.Request } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkVirtualApplianceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) + networkVirtualApplianceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkVirtualApplianceNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkVirtualApplianceNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,18 +203,18 @@ func (v *VirtualAppliancesServerTransport) dispatchGet(req *http.Request) (*http if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkVirtualApplianceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) + networkVirtualApplianceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) if err != nil { return nil, err } @@ -229,7 +229,7 @@ func (v *VirtualAppliancesServerTransport) dispatchGet(req *http.Request) (*http Expand: expandParam, } } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, networkVirtualApplianceNameUnescaped, options) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, networkVirtualApplianceNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -250,7 +250,7 @@ func (v *VirtualAppliancesServerTransport) dispatchNewListPager(req *http.Reques } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkVirtualAppliances` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -283,17 +283,17 @@ func (v *VirtualAppliancesServerTransport) dispatchNewListByResourceGroupPager(r } newListByResourceGroupPager := v.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkVirtualAppliances` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := v.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := v.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp v.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.VirtualAppliancesClientListByResourceGroupResponse, createLink func() string) { @@ -318,7 +318,7 @@ func (v *VirtualAppliancesServerTransport) dispatchUpdateTags(req *http.Request) if v.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -328,15 +328,15 @@ func (v *VirtualAppliancesServerTransport) dispatchUpdateTags(req *http.Request) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkVirtualApplianceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) + networkVirtualApplianceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, networkVirtualApplianceNameUnescaped, body, nil) + respr, errRespr := v.srv.UpdateTags(req.Context(), resourceGroupNameParam, networkVirtualApplianceNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualappliancesites_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualappliancesites_server.go index b09d0a30a..d1dc39079 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualappliancesites_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualappliancesites_server.go @@ -99,7 +99,7 @@ func (v *VirtualApplianceSitesServerTransport) dispatchBeginCreateOrUpdate(req * } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualApplianceSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualApplianceSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (v *VirtualApplianceSitesServerTransport) dispatchBeginCreateOrUpdate(req * if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkVirtualApplianceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) + networkVirtualApplianceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) if err != nil { return nil, err } - siteNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkVirtualApplianceNameUnescaped, siteNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, networkVirtualApplianceNameParam, siteNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (v *VirtualApplianceSitesServerTransport) dispatchBeginDelete(req *http.Req } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualApplianceSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualApplianceSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkVirtualApplianceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) + networkVirtualApplianceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) if err != nil { return nil, err } - siteNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkVirtualApplianceNameUnescaped, siteNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkVirtualApplianceNameParam, siteNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (v *VirtualApplianceSitesServerTransport) dispatchGet(req *http.Request) (* if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualApplianceSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualApplianceSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkVirtualApplianceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) + networkVirtualApplianceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) if err != nil { return nil, err } - siteNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, networkVirtualApplianceNameUnescaped, siteNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, networkVirtualApplianceNameParam, siteNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (v *VirtualApplianceSitesServerTransport) dispatchNewListPager(req *http.Re } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualApplianceSites` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualApplianceSites` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkVirtualApplianceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) + networkVirtualApplianceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkVirtualApplianceName")]) if err != nil { return nil, err } - resp := v.srv.NewListPager(resourceGroupNameUnescaped, networkVirtualApplianceNameUnescaped, nil) + resp := v.srv.NewListPager(resourceGroupNameParam, networkVirtualApplianceNameParam, nil) newListPager = &resp v.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualApplianceSitesClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualapplianceskus_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualapplianceskus_server.go index 854c86c20..5a8ed21cc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualapplianceskus_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualapplianceskus_server.go @@ -81,17 +81,17 @@ func (v *VirtualApplianceSKUsServerTransport) dispatchGet(req *http.Request) (*h if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualApplianceSkus/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkVirtualApplianceSkus/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - skuNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("skuName")]) + skuNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("skuName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), skuNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), skuNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -112,7 +112,7 @@ func (v *VirtualApplianceSKUsServerTransport) dispatchNewListPager(req *http.Req } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualApplianceSkus` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkVirtualApplianceSkus` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubbgpconnection_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubbgpconnection_server.go index f20bc9cba..252ef27a4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubbgpconnection_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubbgpconnection_server.go @@ -90,7 +90,7 @@ func (v *VirtualHubBgpConnectionServerTransport) dispatchBeginCreateOrUpdate(req } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/bgpConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/bgpConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -100,19 +100,19 @@ func (v *VirtualHubBgpConnectionServerTransport) dispatchBeginCreateOrUpdate(req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, connectionNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, virtualHubNameParam, connectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -142,25 +142,25 @@ func (v *VirtualHubBgpConnectionServerTransport) dispatchBeginDelete(req *http.R } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/bgpConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/bgpConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, connectionNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, virtualHubNameParam, connectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -188,25 +188,25 @@ func (v *VirtualHubBgpConnectionServerTransport) dispatchGet(req *http.Request) if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/bgpConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/bgpConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, connectionNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, virtualHubNameParam, connectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubbgpconnections_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubbgpconnections_server.go index 45b307e93..9cf1e8875 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubbgpconnections_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubbgpconnections_server.go @@ -93,21 +93,21 @@ func (v *VirtualHubBgpConnectionsServerTransport) dispatchNewListPager(req *http } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/bgpConnections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/bgpConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - resp := v.srv.NewListPager(resourceGroupNameUnescaped, virtualHubNameUnescaped, nil) + resp := v.srv.NewListPager(resourceGroupNameParam, virtualHubNameParam, nil) newListPager = &resp v.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualHubBgpConnectionsClientListResponse, createLink func() string) { @@ -134,25 +134,25 @@ func (v *VirtualHubBgpConnectionsServerTransport) dispatchBeginListAdvertisedRou } beginListAdvertisedRoutes := v.beginListAdvertisedRoutes.get(req) if beginListAdvertisedRoutes == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/bgpConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/advertisedRoutes` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/bgpConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/advertisedRoutes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - hubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("hubName")]) + hubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("hubName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginListAdvertisedRoutes(req.Context(), resourceGroupNameUnescaped, hubNameUnescaped, connectionNameUnescaped, nil) + respr, errRespr := v.srv.BeginListAdvertisedRoutes(req.Context(), resourceGroupNameParam, hubNameParam, connectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -182,25 +182,25 @@ func (v *VirtualHubBgpConnectionsServerTransport) dispatchBeginListLearnedRoutes } beginListLearnedRoutes := v.beginListLearnedRoutes.get(req) if beginListLearnedRoutes == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/bgpConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/learnedRoutes` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/bgpConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/learnedRoutes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - hubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("hubName")]) + hubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("hubName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginListLearnedRoutes(req.Context(), resourceGroupNameUnescaped, hubNameUnescaped, connectionNameUnescaped, nil) + respr, errRespr := v.srv.BeginListLearnedRoutes(req.Context(), resourceGroupNameParam, hubNameParam, connectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubipconfiguration_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubipconfiguration_server.go index e3d9747d2..28b34bb92 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubipconfiguration_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubipconfiguration_server.go @@ -99,7 +99,7 @@ func (v *VirtualHubIPConfigurationServerTransport) dispatchBeginCreateOrUpdate(r } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (v *VirtualHubIPConfigurationServerTransport) dispatchBeginCreateOrUpdate(r if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - ipConfigNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigName")]) + ipConfigNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, ipConfigNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, virtualHubNameParam, ipConfigNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (v *VirtualHubIPConfigurationServerTransport) dispatchBeginDelete(req *http } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - ipConfigNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigName")]) + ipConfigNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, ipConfigNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, virtualHubNameParam, ipConfigNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (v *VirtualHubIPConfigurationServerTransport) dispatchGet(req *http.Request if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - ipConfigNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigName")]) + ipConfigNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("ipConfigName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, ipConfigNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, virtualHubNameParam, ipConfigNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (v *VirtualHubIPConfigurationServerTransport) dispatchNewListPager(req *htt } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - resp := v.srv.NewListPager(resourceGroupNameUnescaped, virtualHubNameUnescaped, nil) + resp := v.srv.NewListPager(resourceGroupNameParam, virtualHubNameParam, nil) newListPager = &resp v.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualHubIPConfigurationClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubroutetablev2s_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubroutetablev2s_server.go index 6dd742b7e..9bf3f07c4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubroutetablev2s_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubroutetablev2s_server.go @@ -99,7 +99,7 @@ func (v *VirtualHubRouteTableV2SServerTransport) dispatchBeginCreateOrUpdate(req } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (v *VirtualHubRouteTableV2SServerTransport) dispatchBeginCreateOrUpdate(req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - routeTableNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) + routeTableNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, routeTableNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, virtualHubNameParam, routeTableNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (v *VirtualHubRouteTableV2SServerTransport) dispatchBeginDelete(req *http.R } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - routeTableNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) + routeTableNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, routeTableNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, virtualHubNameParam, routeTableNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (v *VirtualHubRouteTableV2SServerTransport) dispatchGet(req *http.Request) if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - routeTableNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) + routeTableNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeTableName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, routeTableNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, virtualHubNameParam, routeTableNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (v *VirtualHubRouteTableV2SServerTransport) dispatchNewListPager(req *http. } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTables` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTables` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - resp := v.srv.NewListPager(resourceGroupNameUnescaped, virtualHubNameUnescaped, nil) + resp := v.srv.NewListPager(resourceGroupNameParam, virtualHubNameParam, nil) newListPager = &resp v.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualHubRouteTableV2SClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubs_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubs_server.go index f22c6e9e4..bcd76a37a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubs_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualhubs_server.go @@ -138,7 +138,7 @@ func (v *VirtualHubsServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -148,15 +148,15 @@ func (v *VirtualHubsServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, virtualHubNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -186,21 +186,21 @@ func (v *VirtualHubsServerTransport) dispatchBeginDelete(req *http.Request) (*ht } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, virtualHubNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -228,21 +228,21 @@ func (v *VirtualHubsServerTransport) dispatchGet(req *http.Request) (*http.Respo if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, virtualHubNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -263,7 +263,7 @@ func (v *VirtualHubsServerTransport) dispatchBeginGetEffectiveVirtualHubRoutes(r } beginGetEffectiveVirtualHubRoutes := v.beginGetEffectiveVirtualHubRoutes.get(req) if beginGetEffectiveVirtualHubRoutes == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/effectiveRoutes` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/effectiveRoutes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -273,11 +273,11 @@ func (v *VirtualHubsServerTransport) dispatchBeginGetEffectiveVirtualHubRoutes(r if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } @@ -287,7 +287,7 @@ func (v *VirtualHubsServerTransport) dispatchBeginGetEffectiveVirtualHubRoutes(r EffectiveRoutesParameters: &body, } } - respr, errRespr := v.srv.BeginGetEffectiveVirtualHubRoutes(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, options) + respr, errRespr := v.srv.BeginGetEffectiveVirtualHubRoutes(req.Context(), resourceGroupNameParam, virtualHubNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -317,7 +317,7 @@ func (v *VirtualHubsServerTransport) dispatchBeginGetInboundRoutes(req *http.Req } beginGetInboundRoutes := v.beginGetInboundRoutes.get(req) if beginGetInboundRoutes == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundRoutes` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundRoutes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -327,15 +327,15 @@ func (v *VirtualHubsServerTransport) dispatchBeginGetInboundRoutes(req *http.Req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginGetInboundRoutes(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginGetInboundRoutes(req.Context(), resourceGroupNameParam, virtualHubNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -365,7 +365,7 @@ func (v *VirtualHubsServerTransport) dispatchBeginGetOutboundRoutes(req *http.Re } beginGetOutboundRoutes := v.beginGetOutboundRoutes.get(req) if beginGetOutboundRoutes == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/outboundRoutes` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/outboundRoutes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -375,15 +375,15 @@ func (v *VirtualHubsServerTransport) dispatchBeginGetOutboundRoutes(req *http.Re if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginGetOutboundRoutes(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginGetOutboundRoutes(req.Context(), resourceGroupNameParam, virtualHubNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -413,7 +413,7 @@ func (v *VirtualHubsServerTransport) dispatchNewListPager(req *http.Request) (*h } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -446,17 +446,17 @@ func (v *VirtualHubsServerTransport) dispatchNewListByResourceGroupPager(req *ht } newListByResourceGroupPager := v.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := v.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := v.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp v.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.VirtualHubsClientListByResourceGroupResponse, createLink func() string) { @@ -481,7 +481,7 @@ func (v *VirtualHubsServerTransport) dispatchUpdateTags(req *http.Request) (*htt if v.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -491,15 +491,15 @@ func (v *VirtualHubsServerTransport) dispatchUpdateTags(req *http.Request) (*htt if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualHubNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) + virtualHubNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualHubName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, virtualHubNameUnescaped, body, nil) + respr, errRespr := v.srv.UpdateTags(req.Context(), resourceGroupNameParam, virtualHubNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworkgatewayconnections_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworkgatewayconnections_server.go index 433642952..4c577d5a7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworkgatewayconnections_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworkgatewayconnections_server.go @@ -162,7 +162,7 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginCreateOrU } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -172,15 +172,15 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginCreateOrU if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) + virtualNetworkGatewayConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayConnectionNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, virtualNetworkGatewayConnectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -210,21 +210,21 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginDelete(re } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) + virtualNetworkGatewayConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayConnectionNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, virtualNetworkGatewayConnectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -252,21 +252,21 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchGet(req *http. if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) + virtualNetworkGatewayConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayConnectionNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, virtualNetworkGatewayConnectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -287,21 +287,21 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginGetIkeSas } beginGetIkeSas := v.beginGetIkeSas.get(req) if beginGetIkeSas == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getikesas` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getikesas` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) + virtualNetworkGatewayConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginGetIkeSas(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayConnectionNameUnescaped, nil) + respr, errRespr := v.srv.BeginGetIkeSas(req.Context(), resourceGroupNameParam, virtualNetworkGatewayConnectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -329,21 +329,21 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchGetSharedKey(r if v.srv.GetSharedKey == nil { return nil, &nonRetriableError{errors.New("fake for method GetSharedKey not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sharedkey` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sharedkey` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) + virtualNetworkGatewayConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.GetSharedKey(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayConnectionNameUnescaped, nil) + respr, errRespr := v.srv.GetSharedKey(req.Context(), resourceGroupNameParam, virtualNetworkGatewayConnectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -364,17 +364,17 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchNewListPager(r } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/connections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := v.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := v.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp v.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualNetworkGatewayConnectionsClientListResponse, createLink func() string) { @@ -401,21 +401,21 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginResetConn } beginResetConnection := v.beginResetConnection.get(req) if beginResetConnection == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resetconnection` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resetconnection` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) + virtualNetworkGatewayConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginResetConnection(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayConnectionNameUnescaped, nil) + respr, errRespr := v.srv.BeginResetConnection(req.Context(), resourceGroupNameParam, virtualNetworkGatewayConnectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -445,7 +445,7 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginResetShar } beginResetSharedKey := v.beginResetSharedKey.get(req) if beginResetSharedKey == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sharedkey/reset` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sharedkey/reset` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -455,15 +455,15 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginResetShar if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) + virtualNetworkGatewayConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginResetSharedKey(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayConnectionNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginResetSharedKey(req.Context(), resourceGroupNameParam, virtualNetworkGatewayConnectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -493,7 +493,7 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginSetShared } beginSetSharedKey := v.beginSetSharedKey.get(req) if beginSetSharedKey == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sharedkey` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sharedkey` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -503,15 +503,15 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginSetShared if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) + virtualNetworkGatewayConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginSetSharedKey(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayConnectionNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginSetSharedKey(req.Context(), resourceGroupNameParam, virtualNetworkGatewayConnectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -541,7 +541,7 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginStartPack } beginStartPacketCapture := v.beginStartPacketCapture.get(req) if beginStartPacketCapture == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/startPacketCapture` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/startPacketCapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -551,11 +551,11 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginStartPack if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) + virtualNetworkGatewayConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) if err != nil { return nil, err } @@ -565,7 +565,7 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginStartPack Parameters: &body, } } - respr, errRespr := v.srv.BeginStartPacketCapture(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayConnectionNameUnescaped, options) + respr, errRespr := v.srv.BeginStartPacketCapture(req.Context(), resourceGroupNameParam, virtualNetworkGatewayConnectionNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -595,7 +595,7 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginStopPacke } beginStopPacketCapture := v.beginStopPacketCapture.get(req) if beginStopPacketCapture == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stopPacketCapture` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stopPacketCapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -605,15 +605,15 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginStopPacke if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) + virtualNetworkGatewayConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginStopPacketCapture(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayConnectionNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginStopPacketCapture(req.Context(), resourceGroupNameParam, virtualNetworkGatewayConnectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -643,7 +643,7 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginUpdateTag } beginUpdateTags := v.beginUpdateTags.get(req) if beginUpdateTags == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -653,15 +653,15 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginUpdateTag if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) + virtualNetworkGatewayConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginUpdateTags(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayConnectionNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginUpdateTags(req.Context(), resourceGroupNameParam, virtualNetworkGatewayConnectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworkgatewaynatrules_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworkgatewaynatrules_server.go index df0292cd2..3082cd33a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworkgatewaynatrules_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworkgatewaynatrules_server.go @@ -99,7 +99,7 @@ func (v *VirtualNetworkGatewayNatRulesServerTransport) dispatchBeginCreateOrUpda } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (v *VirtualNetworkGatewayNatRulesServerTransport) dispatchBeginCreateOrUpda if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - natRuleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("natRuleName")]) + natRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("natRuleName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, natRuleNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, natRuleNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (v *VirtualNetworkGatewayNatRulesServerTransport) dispatchBeginDelete(req * } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - natRuleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("natRuleName")]) + natRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("natRuleName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, natRuleNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, natRuleNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (v *VirtualNetworkGatewayNatRulesServerTransport) dispatchGet(req *http.Req if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - natRuleNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("natRuleName")]) + natRuleNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("natRuleName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, natRuleNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, natRuleNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (v *VirtualNetworkGatewayNatRulesServerTransport) dispatchNewListByVirtualN } newListByVirtualNetworkGatewayPager := v.newListByVirtualNetworkGatewayPager.get(req) if newListByVirtualNetworkGatewayPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - resp := v.srv.NewListByVirtualNetworkGatewayPager(resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, nil) + resp := v.srv.NewListByVirtualNetworkGatewayPager(resourceGroupNameParam, virtualNetworkGatewayNameParam, nil) newListByVirtualNetworkGatewayPager = &resp v.newListByVirtualNetworkGatewayPager.add(req, newListByVirtualNetworkGatewayPager) server.PagerResponderInjectNextLinks(newListByVirtualNetworkGatewayPager, req, func(page *armnetwork.VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworkgateways_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworkgateways_server.go index 638096ed8..64f18bce4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworkgateways_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworkgateways_server.go @@ -240,7 +240,7 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginCreateOrUpdate(req } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -250,15 +250,15 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginCreateOrUpdate(req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -288,21 +288,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginDelete(req *http.Re } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -332,7 +332,7 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginDisconnectVirtualNe } beginDisconnectVirtualNetworkGatewayVPNConnections := v.beginDisconnectVirtualNetworkGatewayVPNConnections.get(req) if beginDisconnectVirtualNetworkGatewayVPNConnections == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/disconnectVirtualNetworkGatewayVpnConnections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/disconnectVirtualNetworkGatewayVpnConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -342,15 +342,15 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginDisconnectVirtualNe if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDisconnectVirtualNetworkGatewayVPNConnections(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginDisconnectVirtualNetworkGatewayVPNConnections(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -380,7 +380,7 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGenerateVPNProfile( } beginGenerateVPNProfile := v.beginGenerateVPNProfile.get(req) if beginGenerateVPNProfile == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/generatevpnprofile` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/generatevpnprofile` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -390,15 +390,15 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGenerateVPNProfile( if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginGenerateVPNProfile(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginGenerateVPNProfile(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -428,7 +428,7 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGeneratevpnclientpa } beginGeneratevpnclientpackage := v.beginGeneratevpnclientpackage.get(req) if beginGeneratevpnclientpackage == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/generatevpnclientpackage` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/generatevpnclientpackage` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -438,15 +438,15 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGeneratevpnclientpa if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginGeneratevpnclientpackage(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginGeneratevpnclientpackage(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -474,21 +474,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchGet(req *http.Request) ( if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -509,26 +509,26 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetAdvertisedRoutes } beginGetAdvertisedRoutes := v.beginGetAdvertisedRoutes.get(req) if beginGetAdvertisedRoutes == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getAdvertisedRoutes` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getAdvertisedRoutes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - peerUnescaped, err := url.QueryUnescape(qp.Get("peer")) + peerParam, err := url.QueryUnescape(qp.Get("peer")) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginGetAdvertisedRoutes(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, peerUnescaped, nil) + respr, errRespr := v.srv.BeginGetAdvertisedRoutes(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, peerParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -558,18 +558,18 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetBgpPeerStatus(re } beginGetBgpPeerStatus := v.beginGetBgpPeerStatus.get(req) if beginGetBgpPeerStatus == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getBgpPeerStatus` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getBgpPeerStatus` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } @@ -584,7 +584,7 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetBgpPeerStatus(re Peer: peerParam, } } - respr, errRespr := v.srv.BeginGetBgpPeerStatus(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, options) + respr, errRespr := v.srv.BeginGetBgpPeerStatus(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -614,21 +614,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetLearnedRoutes(re } beginGetLearnedRoutes := v.beginGetLearnedRoutes.get(req) if beginGetLearnedRoutes == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getLearnedRoutes` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getLearnedRoutes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginGetLearnedRoutes(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, nil) + respr, errRespr := v.srv.BeginGetLearnedRoutes(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -658,21 +658,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetVPNProfilePackag } beginGetVPNProfilePackageURL := v.beginGetVPNProfilePackageURL.get(req) if beginGetVPNProfilePackageURL == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getvpnprofilepackageurl` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getvpnprofilepackageurl` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginGetVPNProfilePackageURL(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, nil) + respr, errRespr := v.srv.BeginGetVPNProfilePackageURL(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -702,21 +702,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetVpnclientConnect } beginGetVpnclientConnectionHealth := v.beginGetVpnclientConnectionHealth.get(req) if beginGetVpnclientConnectionHealth == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getVpnClientConnectionHealth` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getVpnClientConnectionHealth` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginGetVpnclientConnectionHealth(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, nil) + respr, errRespr := v.srv.BeginGetVpnclientConnectionHealth(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -746,21 +746,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetVpnclientIPSecPa } beginGetVpnclientIPSecParameters := v.beginGetVpnclientIPSecParameters.get(req) if beginGetVpnclientIPSecParameters == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getvpnclientipsecparameters` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getvpnclientipsecparameters` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginGetVpnclientIPSecParameters(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, nil) + respr, errRespr := v.srv.BeginGetVpnclientIPSecParameters(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -790,17 +790,17 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchNewListPager(req *http.R } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := v.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := v.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp v.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualNetworkGatewaysClientListResponse, createLink func() string) { @@ -827,21 +827,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchNewListConnectionsPager( } newListConnectionsPager := v.newListConnectionsPager.get(req) if newListConnectionsPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - resp := v.srv.NewListConnectionsPager(resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, nil) + resp := v.srv.NewListConnectionsPager(resourceGroupNameParam, virtualNetworkGatewayNameParam, nil) newListConnectionsPager = &resp v.newListConnectionsPager.add(req, newListConnectionsPager) server.PagerResponderInjectNextLinks(newListConnectionsPager, req, func(page *armnetwork.VirtualNetworkGatewaysClientListConnectionsResponse, createLink func() string) { @@ -868,18 +868,18 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginReset(req *http.Req } beginReset := v.beginReset.get(req) if beginReset == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/reset` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/reset` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } @@ -894,7 +894,7 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginReset(req *http.Req GatewayVip: gatewayVipParam, } } - respr, errRespr := v.srv.BeginReset(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, options) + respr, errRespr := v.srv.BeginReset(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -924,21 +924,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginResetVPNClientShare } beginResetVPNClientSharedKey := v.beginResetVPNClientSharedKey.get(req) if beginResetVPNClientSharedKey == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resetvpnclientsharedkey` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resetvpnclientsharedkey` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginResetVPNClientSharedKey(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, nil) + respr, errRespr := v.srv.BeginResetVPNClientSharedKey(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -968,7 +968,7 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginSetVpnclientIPSecPa } beginSetVpnclientIPSecParameters := v.beginSetVpnclientIPSecParameters.get(req) if beginSetVpnclientIPSecParameters == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/setvpnclientipsecparameters` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/setvpnclientipsecparameters` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -978,15 +978,15 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginSetVpnclientIPSecPa if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginSetVpnclientIPSecParameters(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginSetVpnclientIPSecParameters(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1016,7 +1016,7 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginStartPacketCapture( } beginStartPacketCapture := v.beginStartPacketCapture.get(req) if beginStartPacketCapture == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/startPacketCapture` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/startPacketCapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -1026,11 +1026,11 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginStartPacketCapture( if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } @@ -1040,7 +1040,7 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginStartPacketCapture( Parameters: &body, } } - respr, errRespr := v.srv.BeginStartPacketCapture(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, options) + respr, errRespr := v.srv.BeginStartPacketCapture(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1070,7 +1070,7 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginStopPacketCapture(r } beginStopPacketCapture := v.beginStopPacketCapture.get(req) if beginStopPacketCapture == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stopPacketCapture` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stopPacketCapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -1080,15 +1080,15 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginStopPacketCapture(r if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginStopPacketCapture(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginStopPacketCapture(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1116,21 +1116,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchSupportedVPNDevices(req if v.srv.SupportedVPNDevices == nil { return nil, &nonRetriableError{errors.New("fake for method SupportedVPNDevices not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/supportedvpndevices` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/supportedvpndevices` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.SupportedVPNDevices(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, nil) + respr, errRespr := v.srv.SupportedVPNDevices(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1151,7 +1151,7 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginUpdateTags(req *htt } beginUpdateTags := v.beginUpdateTags.get(req) if beginUpdateTags == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -1161,15 +1161,15 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginUpdateTags(req *htt if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) + virtualNetworkGatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginUpdateTags(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginUpdateTags(req.Context(), resourceGroupNameParam, virtualNetworkGatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1197,7 +1197,7 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchVPNDeviceConfigurationSc if v.srv.VPNDeviceConfigurationScript == nil { return nil, &nonRetriableError{errors.New("fake for method VPNDeviceConfigurationScript not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpndeviceconfigurationscript` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpndeviceconfigurationscript` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -1207,15 +1207,15 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchVPNDeviceConfigurationSc if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkGatewayConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) + virtualNetworkGatewayConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkGatewayConnectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.VPNDeviceConfigurationScript(req.Context(), resourceGroupNameUnescaped, virtualNetworkGatewayConnectionNameUnescaped, body, nil) + respr, errRespr := v.srv.VPNDeviceConfigurationScript(req.Context(), resourceGroupNameParam, virtualNetworkGatewayConnectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworkpeerings_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworkpeerings_server.go index 699a36d03..1da3ff482 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworkpeerings_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworkpeerings_server.go @@ -99,7 +99,7 @@ func (v *VirtualNetworkPeeringsServerTransport) dispatchBeginCreateOrUpdate(req } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkPeerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkPeerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -110,15 +110,15 @@ func (v *VirtualNetworkPeeringsServerTransport) dispatchBeginCreateOrUpdate(req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } - virtualNetworkPeeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkPeeringName")]) + virtualNetworkPeeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkPeeringName")]) if err != nil { return nil, err } @@ -133,7 +133,7 @@ func (v *VirtualNetworkPeeringsServerTransport) dispatchBeginCreateOrUpdate(req SyncRemoteAddressSpace: syncRemoteAddressSpaceParam, } } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, virtualNetworkPeeringNameUnescaped, body, options) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, virtualNetworkPeeringNameParam, body, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -163,25 +163,25 @@ func (v *VirtualNetworkPeeringsServerTransport) dispatchBeginDelete(req *http.Re } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkPeerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkPeerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } - virtualNetworkPeeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkPeeringName")]) + virtualNetworkPeeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkPeeringName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, virtualNetworkPeeringNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, virtualNetworkPeeringNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -209,25 +209,25 @@ func (v *VirtualNetworkPeeringsServerTransport) dispatchGet(req *http.Request) ( if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkPeerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkPeerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } - virtualNetworkPeeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkPeeringName")]) + virtualNetworkPeeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkPeeringName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, virtualNetworkPeeringNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, virtualNetworkPeeringNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -248,21 +248,21 @@ func (v *VirtualNetworkPeeringsServerTransport) dispatchNewListPager(req *http.R } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkPeerings` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkPeerings` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } - resp := v.srv.NewListPager(resourceGroupNameUnescaped, virtualNetworkNameUnescaped, nil) + resp := v.srv.NewListPager(resourceGroupNameParam, virtualNetworkNameParam, nil) newListPager = &resp v.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualNetworkPeeringsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworks_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworks_server.go index ede33d498..f5e588bea 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworks_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworks_server.go @@ -134,26 +134,26 @@ func (v *VirtualNetworksServerTransport) dispatchCheckIPAddressAvailability(req if v.srv.CheckIPAddressAvailability == nil { return nil, &nonRetriableError{errors.New("fake for method CheckIPAddressAvailability not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/CheckIPAddressAvailability` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/CheckIPAddressAvailability` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } - ipAddressUnescaped, err := url.QueryUnescape(qp.Get("ipAddress")) + ipAddressParam, err := url.QueryUnescape(qp.Get("ipAddress")) if err != nil { return nil, err } - respr, errRespr := v.srv.CheckIPAddressAvailability(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, ipAddressUnescaped, nil) + respr, errRespr := v.srv.CheckIPAddressAvailability(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, ipAddressParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -174,7 +174,7 @@ func (v *VirtualNetworksServerTransport) dispatchBeginCreateOrUpdate(req *http.R } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -184,15 +184,15 @@ func (v *VirtualNetworksServerTransport) dispatchBeginCreateOrUpdate(req *http.R if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -222,21 +222,21 @@ func (v *VirtualNetworksServerTransport) dispatchBeginDelete(req *http.Request) } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -264,18 +264,18 @@ func (v *VirtualNetworksServerTransport) dispatchGet(req *http.Request) (*http.R if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } @@ -290,7 +290,7 @@ func (v *VirtualNetworksServerTransport) dispatchGet(req *http.Request) (*http.R Expand: expandParam, } } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, options) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -311,17 +311,17 @@ func (v *VirtualNetworksServerTransport) dispatchNewListPager(req *http.Request) } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := v.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := v.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp v.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualNetworksClientListResponse, createLink func() string) { @@ -348,7 +348,7 @@ func (v *VirtualNetworksServerTransport) dispatchNewListAllPager(req *http.Reque } newListAllPager := v.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -381,18 +381,18 @@ func (v *VirtualNetworksServerTransport) dispatchBeginListDdosProtectionStatus(r } beginListDdosProtectionStatus := v.beginListDdosProtectionStatus.get(req) if beginListDdosProtectionStatus == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ddosProtectionStatus` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ddosProtectionStatus` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } @@ -422,7 +422,7 @@ func (v *VirtualNetworksServerTransport) dispatchBeginListDdosProtectionStatus(r SkipToken: skipTokenParam, } } - respr, errRespr := v.srv.BeginListDdosProtectionStatus(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, options) + respr, errRespr := v.srv.BeginListDdosProtectionStatus(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -452,21 +452,21 @@ func (v *VirtualNetworksServerTransport) dispatchNewListUsagePager(req *http.Req } newListUsagePager := v.newListUsagePager.get(req) if newListUsagePager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/usages` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/usages` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } - resp := v.srv.NewListUsagePager(resourceGroupNameUnescaped, virtualNetworkNameUnescaped, nil) + resp := v.srv.NewListUsagePager(resourceGroupNameParam, virtualNetworkNameParam, nil) newListUsagePager = &resp v.newListUsagePager.add(req, newListUsagePager) server.PagerResponderInjectNextLinks(newListUsagePager, req, func(page *armnetwork.VirtualNetworksClientListUsageResponse, createLink func() string) { @@ -491,7 +491,7 @@ func (v *VirtualNetworksServerTransport) dispatchUpdateTags(req *http.Request) ( if v.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -501,15 +501,15 @@ func (v *VirtualNetworksServerTransport) dispatchUpdateTags(req *http.Request) ( if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualNetworkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) + virtualNetworkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualNetworkName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, virtualNetworkNameUnescaped, body, nil) + respr, errRespr := v.srv.UpdateTags(req.Context(), resourceGroupNameParam, virtualNetworkNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworktaps_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworktaps_server.go index 3094f2241..cb1cabc08 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworktaps_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualnetworktaps_server.go @@ -113,7 +113,7 @@ func (v *VirtualNetworkTapsServerTransport) dispatchBeginCreateOrUpdate(req *htt } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkTaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkTaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (v *VirtualNetworkTapsServerTransport) dispatchBeginCreateOrUpdate(req *htt if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - tapNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("tapName")]) + tapNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("tapName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, tapNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, tapNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (v *VirtualNetworkTapsServerTransport) dispatchBeginDelete(req *http.Reques } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkTaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkTaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - tapNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("tapName")]) + tapNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("tapName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, tapNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, tapNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,21 +203,21 @@ func (v *VirtualNetworkTapsServerTransport) dispatchGet(req *http.Request) (*htt if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkTaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkTaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - tapNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("tapName")]) + tapNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("tapName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, tapNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, tapNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -238,7 +238,7 @@ func (v *VirtualNetworkTapsServerTransport) dispatchNewListAllPager(req *http.Re } newListAllPager := v.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkTaps` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkTaps` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -271,17 +271,17 @@ func (v *VirtualNetworkTapsServerTransport) dispatchNewListByResourceGroupPager( } newListByResourceGroupPager := v.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkTaps` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkTaps` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := v.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := v.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp v.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.VirtualNetworkTapsClientListByResourceGroupResponse, createLink func() string) { @@ -306,7 +306,7 @@ func (v *VirtualNetworkTapsServerTransport) dispatchUpdateTags(req *http.Request if v.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkTaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualNetworkTaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -316,15 +316,15 @@ func (v *VirtualNetworkTapsServerTransport) dispatchUpdateTags(req *http.Request if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - tapNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("tapName")]) + tapNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("tapName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, tapNameUnescaped, body, nil) + respr, errRespr := v.srv.UpdateTags(req.Context(), resourceGroupNameParam, tapNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualrouterpeerings_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualrouterpeerings_server.go index 031e7f0cc..f61c37a45 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualrouterpeerings_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualrouterpeerings_server.go @@ -99,7 +99,7 @@ func (v *VirtualRouterPeeringsServerTransport) dispatchBeginCreateOrUpdate(req * } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -109,19 +109,19 @@ func (v *VirtualRouterPeeringsServerTransport) dispatchBeginCreateOrUpdate(req * if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualRouterNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualRouterName")]) + virtualRouterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualRouterName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, virtualRouterNameUnescaped, peeringNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, virtualRouterNameParam, peeringNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -151,25 +151,25 @@ func (v *VirtualRouterPeeringsServerTransport) dispatchBeginDelete(req *http.Req } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualRouterNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualRouterName")]) + virtualRouterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualRouterName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, virtualRouterNameUnescaped, peeringNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, virtualRouterNameParam, peeringNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,25 +197,25 @@ func (v *VirtualRouterPeeringsServerTransport) dispatchGet(req *http.Request) (* if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualRouterNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualRouterName")]) + virtualRouterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualRouterName")]) if err != nil { return nil, err } - peeringNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) + peeringNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("peeringName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, virtualRouterNameUnescaped, peeringNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, virtualRouterNameParam, peeringNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -236,21 +236,21 @@ func (v *VirtualRouterPeeringsServerTransport) dispatchNewListPager(req *http.Re } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualRouterNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualRouterName")]) + virtualRouterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualRouterName")]) if err != nil { return nil, err } - resp := v.srv.NewListPager(resourceGroupNameUnescaped, virtualRouterNameUnescaped, nil) + resp := v.srv.NewListPager(resourceGroupNameParam, virtualRouterNameParam, nil) newListPager = &resp v.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualRouterPeeringsClientListResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualrouters_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualrouters_server.go index 8825b9c01..7d21827d7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualrouters_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualrouters_server.go @@ -107,7 +107,7 @@ func (v *VirtualRoutersServerTransport) dispatchBeginCreateOrUpdate(req *http.Re } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -117,15 +117,15 @@ func (v *VirtualRoutersServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualRouterNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualRouterName")]) + virtualRouterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualRouterName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, virtualRouterNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, virtualRouterNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -155,21 +155,21 @@ func (v *VirtualRoutersServerTransport) dispatchBeginDelete(req *http.Request) ( } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualRouterNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualRouterName")]) + virtualRouterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualRouterName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, virtualRouterNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, virtualRouterNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -197,18 +197,18 @@ func (v *VirtualRoutersServerTransport) dispatchGet(req *http.Request) (*http.Re if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualRouterNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualRouterName")]) + virtualRouterNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualRouterName")]) if err != nil { return nil, err } @@ -223,7 +223,7 @@ func (v *VirtualRoutersServerTransport) dispatchGet(req *http.Request) (*http.Re Expand: expandParam, } } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, virtualRouterNameUnescaped, options) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, virtualRouterNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -244,7 +244,7 @@ func (v *VirtualRoutersServerTransport) dispatchNewListPager(req *http.Request) } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualRouters` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualRouters` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -277,17 +277,17 @@ func (v *VirtualRoutersServerTransport) dispatchNewListByResourceGroupPager(req } newListByResourceGroupPager := v.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualRouters` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualRouters` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := v.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := v.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp v.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.VirtualRoutersClientListByResourceGroupResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualwans_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualwans_server.go index 7fac581e6..bd3b6cc66 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualwans_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/virtualwans_server.go @@ -113,7 +113,7 @@ func (v *VirtualWansServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (v *VirtualWansServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualWANNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("VirtualWANName")]) + virtualWANNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("VirtualWANName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, virtualWANNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, virtualWANNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (v *VirtualWansServerTransport) dispatchBeginDelete(req *http.Request) (*ht } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualWANNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("VirtualWANName")]) + virtualWANNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("VirtualWANName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, virtualWANNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, virtualWANNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,21 +203,21 @@ func (v *VirtualWansServerTransport) dispatchGet(req *http.Request) (*http.Respo if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualWANNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("VirtualWANName")]) + virtualWANNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("VirtualWANName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, virtualWANNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, virtualWANNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -238,7 +238,7 @@ func (v *VirtualWansServerTransport) dispatchNewListPager(req *http.Request) (*h } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualWans` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualWans` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -271,17 +271,17 @@ func (v *VirtualWansServerTransport) dispatchNewListByResourceGroupPager(req *ht } newListByResourceGroupPager := v.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualWans` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualWans` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := v.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := v.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp v.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.VirtualWansClientListByResourceGroupResponse, createLink func() string) { @@ -306,7 +306,7 @@ func (v *VirtualWansServerTransport) dispatchUpdateTags(req *http.Request) (*htt if v.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -316,15 +316,15 @@ func (v *VirtualWansServerTransport) dispatchUpdateTags(req *http.Request) (*htt if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualWANNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("VirtualWANName")]) + virtualWANNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("VirtualWANName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, virtualWANNameUnescaped, body, nil) + respr, errRespr := v.srv.UpdateTags(req.Context(), resourceGroupNameParam, virtualWANNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnconnections_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnconnections_server.go index 9b3064c7b..ca4d6af29 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnconnections_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnconnections_server.go @@ -116,7 +116,7 @@ func (v *VPNConnectionsServerTransport) dispatchBeginCreateOrUpdate(req *http.Re } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -126,19 +126,19 @@ func (v *VPNConnectionsServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, connectionNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, gatewayNameParam, connectionNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -168,25 +168,25 @@ func (v *VPNConnectionsServerTransport) dispatchBeginDelete(req *http.Request) ( } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, connectionNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, gatewayNameParam, connectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -214,25 +214,25 @@ func (v *VPNConnectionsServerTransport) dispatchGet(req *http.Request) (*http.Re if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, connectionNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, gatewayNameParam, connectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -253,21 +253,21 @@ func (v *VPNConnectionsServerTransport) dispatchNewListByVPNGatewayPager(req *ht } newListByVPNGatewayPager := v.newListByVPNGatewayPager.get(req) if newListByVPNGatewayPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - resp := v.srv.NewListByVPNGatewayPager(resourceGroupNameUnescaped, gatewayNameUnescaped, nil) + resp := v.srv.NewListByVPNGatewayPager(resourceGroupNameParam, gatewayNameParam, nil) newListByVPNGatewayPager = &resp v.newListByVPNGatewayPager.add(req, newListByVPNGatewayPager) server.PagerResponderInjectNextLinks(newListByVPNGatewayPager, req, func(page *armnetwork.VPNConnectionsClientListByVPNGatewayResponse, createLink func() string) { @@ -294,7 +294,7 @@ func (v *VPNConnectionsServerTransport) dispatchBeginStartPacketCapture(req *htt } beginStartPacketCapture := v.beginStartPacketCapture.get(req) if beginStartPacketCapture == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/startpacketcapture` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/startpacketcapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -304,15 +304,15 @@ func (v *VPNConnectionsServerTransport) dispatchBeginStartPacketCapture(req *htt if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - vpnConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("vpnConnectionName")]) + vpnConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vpnConnectionName")]) if err != nil { return nil, err } @@ -322,7 +322,7 @@ func (v *VPNConnectionsServerTransport) dispatchBeginStartPacketCapture(req *htt Parameters: &body, } } - respr, errRespr := v.srv.BeginStartPacketCapture(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, vpnConnectionNameUnescaped, options) + respr, errRespr := v.srv.BeginStartPacketCapture(req.Context(), resourceGroupNameParam, gatewayNameParam, vpnConnectionNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -352,7 +352,7 @@ func (v *VPNConnectionsServerTransport) dispatchBeginStopPacketCapture(req *http } beginStopPacketCapture := v.beginStopPacketCapture.get(req) if beginStopPacketCapture == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stoppacketcapture` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stoppacketcapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { @@ -362,15 +362,15 @@ func (v *VPNConnectionsServerTransport) dispatchBeginStopPacketCapture(req *http if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - vpnConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("vpnConnectionName")]) + vpnConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vpnConnectionName")]) if err != nil { return nil, err } @@ -380,7 +380,7 @@ func (v *VPNConnectionsServerTransport) dispatchBeginStopPacketCapture(req *http Parameters: &body, } } - respr, errRespr := v.srv.BeginStopPacketCapture(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, vpnConnectionNameUnescaped, options) + respr, errRespr := v.srv.BeginStopPacketCapture(req.Context(), resourceGroupNameParam, gatewayNameParam, vpnConnectionNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpngateways_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpngateways_server.go index d7acbc7dc..dd3f66b94 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpngateways_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpngateways_server.go @@ -140,7 +140,7 @@ func (v *VPNGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -150,15 +150,15 @@ func (v *VPNGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, gatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -188,21 +188,21 @@ func (v *VPNGatewaysServerTransport) dispatchBeginDelete(req *http.Request) (*ht } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, gatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -230,21 +230,21 @@ func (v *VPNGatewaysServerTransport) dispatchGet(req *http.Request) (*http.Respo if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, gatewayNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -265,7 +265,7 @@ func (v *VPNGatewaysServerTransport) dispatchNewListPager(req *http.Request) (*h } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -298,17 +298,17 @@ func (v *VPNGatewaysServerTransport) dispatchNewListByResourceGroupPager(req *ht } newListByResourceGroupPager := v.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := v.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := v.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp v.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.VPNGatewaysClientListByResourceGroupResponse, createLink func() string) { @@ -335,18 +335,18 @@ func (v *VPNGatewaysServerTransport) dispatchBeginReset(req *http.Request) (*htt } beginReset := v.beginReset.get(req) if beginReset == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/reset` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/reset` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } @@ -361,7 +361,7 @@ func (v *VPNGatewaysServerTransport) dispatchBeginReset(req *http.Request) (*htt IPConfigurationID: iPConfigurationIDParam, } } - respr, errRespr := v.srv.BeginReset(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, options) + respr, errRespr := v.srv.BeginReset(req.Context(), resourceGroupNameParam, gatewayNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -391,7 +391,7 @@ func (v *VPNGatewaysServerTransport) dispatchBeginStartPacketCapture(req *http.R } beginStartPacketCapture := v.beginStartPacketCapture.get(req) if beginStartPacketCapture == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/startpacketcapture` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/startpacketcapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -401,11 +401,11 @@ func (v *VPNGatewaysServerTransport) dispatchBeginStartPacketCapture(req *http.R if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } @@ -415,7 +415,7 @@ func (v *VPNGatewaysServerTransport) dispatchBeginStartPacketCapture(req *http.R Parameters: &body, } } - respr, errRespr := v.srv.BeginStartPacketCapture(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, options) + respr, errRespr := v.srv.BeginStartPacketCapture(req.Context(), resourceGroupNameParam, gatewayNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -445,7 +445,7 @@ func (v *VPNGatewaysServerTransport) dispatchBeginStopPacketCapture(req *http.Re } beginStopPacketCapture := v.beginStopPacketCapture.get(req) if beginStopPacketCapture == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stoppacketcapture` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stoppacketcapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -455,11 +455,11 @@ func (v *VPNGatewaysServerTransport) dispatchBeginStopPacketCapture(req *http.Re if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } @@ -469,7 +469,7 @@ func (v *VPNGatewaysServerTransport) dispatchBeginStopPacketCapture(req *http.Re Parameters: &body, } } - respr, errRespr := v.srv.BeginStopPacketCapture(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, options) + respr, errRespr := v.srv.BeginStopPacketCapture(req.Context(), resourceGroupNameParam, gatewayNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -499,7 +499,7 @@ func (v *VPNGatewaysServerTransport) dispatchBeginUpdateTags(req *http.Request) } beginUpdateTags := v.beginUpdateTags.get(req) if beginUpdateTags == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -509,15 +509,15 @@ func (v *VPNGatewaysServerTransport) dispatchBeginUpdateTags(req *http.Request) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginUpdateTags(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginUpdateTags(req.Context(), resourceGroupNameParam, gatewayNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnlinkconnections_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnlinkconnections_server.go index d522cd474..86bc42416 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnlinkconnections_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnlinkconnections_server.go @@ -93,29 +93,29 @@ func (v *VPNLinkConnectionsServerTransport) dispatchBeginGetIkeSas(req *http.Req } beginGetIkeSas := v.beginGetIkeSas.get(req) if beginGetIkeSas == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnLinkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getikesas` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnLinkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getikesas` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - linkConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("linkConnectionName")]) + linkConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("linkConnectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginGetIkeSas(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, connectionNameUnescaped, linkConnectionNameUnescaped, nil) + respr, errRespr := v.srv.BeginGetIkeSas(req.Context(), resourceGroupNameParam, gatewayNameParam, connectionNameParam, linkConnectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -145,25 +145,25 @@ func (v *VPNLinkConnectionsServerTransport) dispatchNewListByVPNConnectionPager( } newListByVPNConnectionPager := v.newListByVPNConnectionPager.get(req) if newListByVPNConnectionPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnLinkConnections` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnLinkConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - resp := v.srv.NewListByVPNConnectionPager(resourceGroupNameUnescaped, gatewayNameUnescaped, connectionNameUnescaped, nil) + resp := v.srv.NewListByVPNConnectionPager(resourceGroupNameParam, gatewayNameParam, connectionNameParam, nil) newListByVPNConnectionPager = &resp v.newListByVPNConnectionPager.add(req, newListByVPNConnectionPager) server.PagerResponderInjectNextLinks(newListByVPNConnectionPager, req, func(page *armnetwork.VPNLinkConnectionsClientListByVPNConnectionResponse, createLink func() string) { @@ -190,29 +190,29 @@ func (v *VPNLinkConnectionsServerTransport) dispatchBeginResetConnection(req *ht } beginResetConnection := v.beginResetConnection.get(req) if beginResetConnection == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnLinkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resetconnection` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnLinkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resetconnection` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - linkConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("linkConnectionName")]) + linkConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("linkConnectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginResetConnection(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, connectionNameUnescaped, linkConnectionNameUnescaped, nil) + respr, errRespr := v.srv.BeginResetConnection(req.Context(), resourceGroupNameParam, gatewayNameParam, connectionNameParam, linkConnectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnserverconfigurations_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnserverconfigurations_server.go index 1cd2421a9..d4cbe14a7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnserverconfigurations_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnserverconfigurations_server.go @@ -113,7 +113,7 @@ func (v *VPNServerConfigurationsServerTransport) dispatchBeginCreateOrUpdate(req } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (v *VPNServerConfigurationsServerTransport) dispatchBeginCreateOrUpdate(req if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - vpnServerConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("vpnServerConfigurationName")]) + vpnServerConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vpnServerConfigurationName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, vpnServerConfigurationNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, vpnServerConfigurationNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (v *VPNServerConfigurationsServerTransport) dispatchBeginDelete(req *http.R } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - vpnServerConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("vpnServerConfigurationName")]) + vpnServerConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vpnServerConfigurationName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, vpnServerConfigurationNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, vpnServerConfigurationNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,21 +203,21 @@ func (v *VPNServerConfigurationsServerTransport) dispatchGet(req *http.Request) if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - vpnServerConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("vpnServerConfigurationName")]) + vpnServerConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vpnServerConfigurationName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, vpnServerConfigurationNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, vpnServerConfigurationNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -238,7 +238,7 @@ func (v *VPNServerConfigurationsServerTransport) dispatchNewListPager(req *http. } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnServerConfigurations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnServerConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -271,17 +271,17 @@ func (v *VPNServerConfigurationsServerTransport) dispatchNewListByResourceGroupP } newListByResourceGroupPager := v.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnServerConfigurations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnServerConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := v.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := v.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp v.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.VPNServerConfigurationsClientListByResourceGroupResponse, createLink func() string) { @@ -306,7 +306,7 @@ func (v *VPNServerConfigurationsServerTransport) dispatchUpdateTags(req *http.Re if v.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -316,15 +316,15 @@ func (v *VPNServerConfigurationsServerTransport) dispatchUpdateTags(req *http.Re if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - vpnServerConfigurationNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("vpnServerConfigurationName")]) + vpnServerConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vpnServerConfigurationName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, vpnServerConfigurationNameUnescaped, body, nil) + respr, errRespr := v.srv.UpdateTags(req.Context(), resourceGroupNameParam, vpnServerConfigurationNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnserverconfigurationsassociatedwithvirtualwan_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnserverconfigurationsassociatedwithvirtualwan_server.go index b9ef64de9..191d98e2a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnserverconfigurationsassociatedwithvirtualwan_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnserverconfigurationsassociatedwithvirtualwan_server.go @@ -76,21 +76,21 @@ func (v *VPNServerConfigurationsAssociatedWithVirtualWanServerTransport) dispatc } beginList := v.beginList.get(req) if beginList == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnServerConfigurations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnServerConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualWANNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualWANName")]) + virtualWANNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualWANName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginList(req.Context(), resourceGroupNameUnescaped, virtualWANNameUnescaped, nil) + respr, errRespr := v.srv.BeginList(req.Context(), resourceGroupNameParam, virtualWANNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnsitelinkconnections_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnsitelinkconnections_server.go index 9874816ec..5f43001b1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnsitelinkconnections_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnsitelinkconnections_server.go @@ -70,29 +70,29 @@ func (v *VPNSiteLinkConnectionsServerTransport) dispatchGet(req *http.Request) ( if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnLinkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnLinkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 5 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - gatewayNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) if err != nil { return nil, err } - connectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) if err != nil { return nil, err } - linkConnectionNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("linkConnectionName")]) + linkConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("linkConnectionName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, gatewayNameUnescaped, connectionNameUnescaped, linkConnectionNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, gatewayNameParam, connectionNameParam, linkConnectionNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnsitelinks_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnsitelinks_server.go index 9613744ef..f4506c0b1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnsitelinks_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnsitelinks_server.go @@ -81,25 +81,25 @@ func (v *VPNSiteLinksServerTransport) dispatchGet(req *http.Request) (*http.Resp if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnSiteLinks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnSiteLinks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - vpnSiteNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("vpnSiteName")]) + vpnSiteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vpnSiteName")]) if err != nil { return nil, err } - vpnSiteLinkNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("vpnSiteLinkName")]) + vpnSiteLinkNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vpnSiteLinkName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, vpnSiteNameUnescaped, vpnSiteLinkNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, vpnSiteNameParam, vpnSiteLinkNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -120,21 +120,21 @@ func (v *VPNSiteLinksServerTransport) dispatchNewListByVPNSitePager(req *http.Re } newListByVPNSitePager := v.newListByVPNSitePager.get(req) if newListByVPNSitePager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnSiteLinks` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnSiteLinks` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - vpnSiteNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("vpnSiteName")]) + vpnSiteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vpnSiteName")]) if err != nil { return nil, err } - resp := v.srv.NewListByVPNSitePager(resourceGroupNameUnescaped, vpnSiteNameUnescaped, nil) + resp := v.srv.NewListByVPNSitePager(resourceGroupNameParam, vpnSiteNameParam, nil) newListByVPNSitePager = &resp v.newListByVPNSitePager.add(req, newListByVPNSitePager) server.PagerResponderInjectNextLinks(newListByVPNSitePager, req, func(page *armnetwork.VPNSiteLinksClientListByVPNSiteResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnsites_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnsites_server.go index 9712488e1..7d458a598 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnsites_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnsites_server.go @@ -113,7 +113,7 @@ func (v *VPNSitesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) } beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -123,15 +123,15 @@ func (v *VPNSitesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - vpnSiteNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("vpnSiteName")]) + vpnSiteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vpnSiteName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, vpnSiteNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, vpnSiteNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -161,21 +161,21 @@ func (v *VPNSitesServerTransport) dispatchBeginDelete(req *http.Request) (*http. } beginDelete := v.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - vpnSiteNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("vpnSiteName")]) + vpnSiteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vpnSiteName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, vpnSiteNameUnescaped, nil) + respr, errRespr := v.srv.BeginDelete(req.Context(), resourceGroupNameParam, vpnSiteNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -203,21 +203,21 @@ func (v *VPNSitesServerTransport) dispatchGet(req *http.Request) (*http.Response if v.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - vpnSiteNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("vpnSiteName")]) + vpnSiteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vpnSiteName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameUnescaped, vpnSiteNameUnescaped, nil) + respr, errRespr := v.srv.Get(req.Context(), resourceGroupNameParam, vpnSiteNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -238,7 +238,7 @@ func (v *VPNSitesServerTransport) dispatchNewListPager(req *http.Request) (*http } newListPager := v.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnSites` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnSites` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -271,17 +271,17 @@ func (v *VPNSitesServerTransport) dispatchNewListByResourceGroupPager(req *http. } newListByResourceGroupPager := v.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnSites` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnSites` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := v.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) + resp := v.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) newListByResourceGroupPager = &resp v.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.VPNSitesClientListByResourceGroupResponse, createLink func() string) { @@ -306,7 +306,7 @@ func (v *VPNSitesServerTransport) dispatchUpdateTags(req *http.Request) (*http.R if v.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/vpnSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -316,15 +316,15 @@ func (v *VPNSitesServerTransport) dispatchUpdateTags(req *http.Request) (*http.R if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - vpnSiteNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("vpnSiteName")]) + vpnSiteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vpnSiteName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, vpnSiteNameUnescaped, body, nil) + respr, errRespr := v.srv.UpdateTags(req.Context(), resourceGroupNameParam, vpnSiteNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnsitesconfiguration_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnsitesconfiguration_server.go index 0b815a9b3..3268ae362 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnsitesconfiguration_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/vpnsitesconfiguration_server.go @@ -76,7 +76,7 @@ func (v *VPNSitesConfigurationServerTransport) dispatchBeginDownload(req *http.R } beginDownload := v.beginDownload.get(req) if beginDownload == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConfiguration` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConfiguration` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -86,15 +86,15 @@ func (v *VPNSitesConfigurationServerTransport) dispatchBeginDownload(req *http.R if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - virtualWANNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("virtualWANName")]) + virtualWANNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("virtualWANName")]) if err != nil { return nil, err } - respr, errRespr := v.srv.BeginDownload(req.Context(), resourceGroupNameUnescaped, virtualWANNameUnescaped, body, nil) + respr, errRespr := v.srv.BeginDownload(req.Context(), resourceGroupNameParam, virtualWANNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/watchers_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/watchers_server.go index bbe202873..64d71e37e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/watchers_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/watchers_server.go @@ -204,7 +204,7 @@ func (w *WatchersServerTransport) dispatchBeginCheckConnectivity(req *http.Reque } beginCheckConnectivity := w.beginCheckConnectivity.get(req) if beginCheckConnectivity == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectivityCheck` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectivityCheck` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -214,15 +214,15 @@ func (w *WatchersServerTransport) dispatchBeginCheckConnectivity(req *http.Reque if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.BeginCheckConnectivity(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, body, nil) + respr, errRespr := w.srv.BeginCheckConnectivity(req.Context(), resourceGroupNameParam, networkWatcherNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -250,7 +250,7 @@ func (w *WatchersServerTransport) dispatchCreateOrUpdate(req *http.Request) (*ht if w.srv.CreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdate not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -260,15 +260,15 @@ func (w *WatchersServerTransport) dispatchCreateOrUpdate(req *http.Request) (*ht if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.CreateOrUpdate(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, body, nil) + respr, errRespr := w.srv.CreateOrUpdate(req.Context(), resourceGroupNameParam, networkWatcherNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -289,21 +289,21 @@ func (w *WatchersServerTransport) dispatchBeginDelete(req *http.Request) (*http. } beginDelete := w.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, nil) + respr, errRespr := w.srv.BeginDelete(req.Context(), resourceGroupNameParam, networkWatcherNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -331,21 +331,21 @@ func (w *WatchersServerTransport) dispatchGet(req *http.Request) (*http.Response if w.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.Get(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, nil) + respr, errRespr := w.srv.Get(req.Context(), resourceGroupNameParam, networkWatcherNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -366,7 +366,7 @@ func (w *WatchersServerTransport) dispatchBeginGetAzureReachabilityReport(req *h } beginGetAzureReachabilityReport := w.beginGetAzureReachabilityReport.get(req) if beginGetAzureReachabilityReport == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/azureReachabilityReport` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/azureReachabilityReport` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -376,15 +376,15 @@ func (w *WatchersServerTransport) dispatchBeginGetAzureReachabilityReport(req *h if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.BeginGetAzureReachabilityReport(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, body, nil) + respr, errRespr := w.srv.BeginGetAzureReachabilityReport(req.Context(), resourceGroupNameParam, networkWatcherNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -414,7 +414,7 @@ func (w *WatchersServerTransport) dispatchBeginGetFlowLogStatus(req *http.Reques } beginGetFlowLogStatus := w.beginGetFlowLogStatus.get(req) if beginGetFlowLogStatus == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/queryFlowLogStatus` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/queryFlowLogStatus` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -424,15 +424,15 @@ func (w *WatchersServerTransport) dispatchBeginGetFlowLogStatus(req *http.Reques if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.BeginGetFlowLogStatus(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, body, nil) + respr, errRespr := w.srv.BeginGetFlowLogStatus(req.Context(), resourceGroupNameParam, networkWatcherNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -462,7 +462,7 @@ func (w *WatchersServerTransport) dispatchBeginGetNetworkConfigurationDiagnostic } beginGetNetworkConfigurationDiagnostic := w.beginGetNetworkConfigurationDiagnostic.get(req) if beginGetNetworkConfigurationDiagnostic == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkConfigurationDiagnostic` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkConfigurationDiagnostic` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -472,15 +472,15 @@ func (w *WatchersServerTransport) dispatchBeginGetNetworkConfigurationDiagnostic if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.BeginGetNetworkConfigurationDiagnostic(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, body, nil) + respr, errRespr := w.srv.BeginGetNetworkConfigurationDiagnostic(req.Context(), resourceGroupNameParam, networkWatcherNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -510,7 +510,7 @@ func (w *WatchersServerTransport) dispatchBeginGetNextHop(req *http.Request) (*h } beginGetNextHop := w.beginGetNextHop.get(req) if beginGetNextHop == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/nextHop` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/nextHop` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -520,15 +520,15 @@ func (w *WatchersServerTransport) dispatchBeginGetNextHop(req *http.Request) (*h if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.BeginGetNextHop(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, body, nil) + respr, errRespr := w.srv.BeginGetNextHop(req.Context(), resourceGroupNameParam, networkWatcherNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -556,7 +556,7 @@ func (w *WatchersServerTransport) dispatchGetTopology(req *http.Request) (*http. if w.srv.GetTopology == nil { return nil, &nonRetriableError{errors.New("fake for method GetTopology not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/topology` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/topology` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -566,15 +566,15 @@ func (w *WatchersServerTransport) dispatchGetTopology(req *http.Request) (*http. if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.GetTopology(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, body, nil) + respr, errRespr := w.srv.GetTopology(req.Context(), resourceGroupNameParam, networkWatcherNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -595,7 +595,7 @@ func (w *WatchersServerTransport) dispatchBeginGetTroubleshooting(req *http.Requ } beginGetTroubleshooting := w.beginGetTroubleshooting.get(req) if beginGetTroubleshooting == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/troubleshoot` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/troubleshoot` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -605,15 +605,15 @@ func (w *WatchersServerTransport) dispatchBeginGetTroubleshooting(req *http.Requ if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.BeginGetTroubleshooting(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, body, nil) + respr, errRespr := w.srv.BeginGetTroubleshooting(req.Context(), resourceGroupNameParam, networkWatcherNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -643,7 +643,7 @@ func (w *WatchersServerTransport) dispatchBeginGetTroubleshootingResult(req *htt } beginGetTroubleshootingResult := w.beginGetTroubleshootingResult.get(req) if beginGetTroubleshootingResult == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/queryTroubleshootResult` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/queryTroubleshootResult` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -653,15 +653,15 @@ func (w *WatchersServerTransport) dispatchBeginGetTroubleshootingResult(req *htt if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.BeginGetTroubleshootingResult(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, body, nil) + respr, errRespr := w.srv.BeginGetTroubleshootingResult(req.Context(), resourceGroupNameParam, networkWatcherNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -691,7 +691,7 @@ func (w *WatchersServerTransport) dispatchBeginGetVMSecurityRules(req *http.Requ } beginGetVMSecurityRules := w.beginGetVMSecurityRules.get(req) if beginGetVMSecurityRules == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityGroupView` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityGroupView` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -701,15 +701,15 @@ func (w *WatchersServerTransport) dispatchBeginGetVMSecurityRules(req *http.Requ if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.BeginGetVMSecurityRules(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, body, nil) + respr, errRespr := w.srv.BeginGetVMSecurityRules(req.Context(), resourceGroupNameParam, networkWatcherNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -739,17 +739,17 @@ func (w *WatchersServerTransport) dispatchNewListPager(req *http.Request) (*http } newListPager := w.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := w.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := w.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp w.newListPager.add(req, newListPager) } @@ -773,7 +773,7 @@ func (w *WatchersServerTransport) dispatchNewListAllPager(req *http.Request) (*h } newListAllPager := w.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -803,7 +803,7 @@ func (w *WatchersServerTransport) dispatchBeginListAvailableProviders(req *http. } beginListAvailableProviders := w.beginListAvailableProviders.get(req) if beginListAvailableProviders == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availableProvidersList` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availableProvidersList` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -813,15 +813,15 @@ func (w *WatchersServerTransport) dispatchBeginListAvailableProviders(req *http. if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.BeginListAvailableProviders(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, body, nil) + respr, errRespr := w.srv.BeginListAvailableProviders(req.Context(), resourceGroupNameParam, networkWatcherNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -851,7 +851,7 @@ func (w *WatchersServerTransport) dispatchBeginSetFlowLogConfiguration(req *http } beginSetFlowLogConfiguration := w.beginSetFlowLogConfiguration.get(req) if beginSetFlowLogConfiguration == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configureFlowLog` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configureFlowLog` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -861,15 +861,15 @@ func (w *WatchersServerTransport) dispatchBeginSetFlowLogConfiguration(req *http if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.BeginSetFlowLogConfiguration(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, body, nil) + respr, errRespr := w.srv.BeginSetFlowLogConfiguration(req.Context(), resourceGroupNameParam, networkWatcherNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -897,7 +897,7 @@ func (w *WatchersServerTransport) dispatchUpdateTags(req *http.Request) (*http.R if w.srv.UpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -907,15 +907,15 @@ func (w *WatchersServerTransport) dispatchUpdateTags(req *http.Request) (*http.R if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.UpdateTags(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, body, nil) + respr, errRespr := w.srv.UpdateTags(req.Context(), resourceGroupNameParam, networkWatcherNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -936,7 +936,7 @@ func (w *WatchersServerTransport) dispatchBeginVerifyIPFlow(req *http.Request) ( } beginVerifyIPFlow := w.beginVerifyIPFlow.get(req) if beginVerifyIPFlow == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipFlowVerify` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipFlowVerify` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -946,15 +946,15 @@ func (w *WatchersServerTransport) dispatchBeginVerifyIPFlow(req *http.Request) ( if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - networkWatcherNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) + networkWatcherNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkWatcherName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.BeginVerifyIPFlow(req.Context(), resourceGroupNameUnescaped, networkWatcherNameUnescaped, body, nil) + respr, errRespr := w.srv.BeginVerifyIPFlow(req.Context(), resourceGroupNameParam, networkWatcherNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/webapplicationfirewallpolicies_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/webapplicationfirewallpolicies_server.go index f20871656..1264b2b45 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/webapplicationfirewallpolicies_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/webapplicationfirewallpolicies_server.go @@ -103,7 +103,7 @@ func (w *WebApplicationFirewallPoliciesServerTransport) dispatchCreateOrUpdate(r if w.srv.CreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdate not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ApplicationGatewayWebApplicationFirewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -113,15 +113,15 @@ func (w *WebApplicationFirewallPoliciesServerTransport) dispatchCreateOrUpdate(r if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - policyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("policyName")]) + policyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("policyName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.CreateOrUpdate(req.Context(), resourceGroupNameUnescaped, policyNameUnescaped, body, nil) + respr, errRespr := w.srv.CreateOrUpdate(req.Context(), resourceGroupNameParam, policyNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -142,21 +142,21 @@ func (w *WebApplicationFirewallPoliciesServerTransport) dispatchBeginDelete(req } beginDelete := w.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ApplicationGatewayWebApplicationFirewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - policyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("policyName")]) + policyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("policyName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, policyNameUnescaped, nil) + respr, errRespr := w.srv.BeginDelete(req.Context(), resourceGroupNameParam, policyNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -184,21 +184,21 @@ func (w *WebApplicationFirewallPoliciesServerTransport) dispatchGet(req *http.Re if w.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ApplicationGatewayWebApplicationFirewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - policyNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("policyName")]) + policyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("policyName")]) if err != nil { return nil, err } - respr, errRespr := w.srv.Get(req.Context(), resourceGroupNameUnescaped, policyNameUnescaped, nil) + respr, errRespr := w.srv.Get(req.Context(), resourceGroupNameParam, policyNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -219,17 +219,17 @@ func (w *WebApplicationFirewallPoliciesServerTransport) dispatchNewListPager(req } newListPager := w.newListPager.get(req) if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ApplicationGatewayWebApplicationFirewallPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resp := w.srv.NewListPager(resourceGroupNameUnescaped, nil) + resp := w.srv.NewListPager(resourceGroupNameParam, nil) newListPager = &resp w.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.WebApplicationFirewallPoliciesClientListResponse, createLink func() string) { @@ -256,7 +256,7 @@ func (w *WebApplicationFirewallPoliciesServerTransport) dispatchNewListAllPager( } newListAllPager := w.newListAllPager.get(req) if newListAllPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/ApplicationGatewayWebApplicationFirewallPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/webcategories_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/webcategories_server.go index baa226ebb..4d5982d3c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/webcategories_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake/webcategories_server.go @@ -81,14 +81,14 @@ func (w *WebCategoriesServerTransport) dispatchGet(req *http.Request) (*http.Res if w.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureWebCategories/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/azureWebCategories/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - nameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) if err != nil { return nil, err } @@ -103,7 +103,7 @@ func (w *WebCategoriesServerTransport) dispatchGet(req *http.Request) (*http.Res Expand: expandParam, } } - respr, errRespr := w.srv.Get(req.Context(), nameUnescaped, options) + respr, errRespr := w.srv.Get(req.Context(), nameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -124,7 +124,7 @@ func (w *WebCategoriesServerTransport) dispatchNewListBySubscriptionPager(req *h } newListBySubscriptionPager := w.newListBySubscriptionPager.get(req) if newListBySubscriptionPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureWebCategories` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Network/azureWebCategories` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicies_client.go index 764b6bc61..8c6460375 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicies_client.go @@ -33,7 +33,7 @@ type FirewallPoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFirewallPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".FirewallPoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *FirewallPoliciesClient) BeginCreateOrUpdate(ctx context.Context, r } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FirewallPoliciesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[FirewallPoliciesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FirewallPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *FirewallPoliciesClient) BeginDelete(ctx context.Context, resourceG } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FirewallPoliciesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[FirewallPoliciesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FirewallPoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -276,23 +282,16 @@ func (client *FirewallPoliciesClient) NewListPager(resourceGroupName string, opt }, Fetcher: func(ctx context.Context, page *FirewallPoliciesClientListResponse) (FirewallPoliciesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FirewallPoliciesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return FirewallPoliciesClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return FirewallPoliciesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallPoliciesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -342,23 +341,16 @@ func (client *FirewallPoliciesClient) NewListAllPager(options *FirewallPoliciesC }, Fetcher: func(ctx context.Context, page *FirewallPoliciesClientListAllResponse) (FirewallPoliciesClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FirewallPoliciesClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return FirewallPoliciesClientListAllResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return FirewallPoliciesClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallPoliciesClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicyidpssignatures_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicyidpssignatures_client.go index 5e43850d0..db57d8830 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicyidpssignatures_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicyidpssignatures_client.go @@ -33,7 +33,7 @@ type FirewallPolicyIdpsSignaturesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFirewallPolicyIdpsSignaturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyIdpsSignaturesClient, error) { - cl, err := arm.NewClient(moduleName+".FirewallPolicyIdpsSignaturesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicyidpssignaturesfiltervalues_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicyidpssignaturesfiltervalues_client.go index b719721a9..2b23adb7b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicyidpssignaturesfiltervalues_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicyidpssignaturesfiltervalues_client.go @@ -33,7 +33,7 @@ type FirewallPolicyIdpsSignaturesFilterValuesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFirewallPolicyIdpsSignaturesFilterValuesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyIdpsSignaturesFilterValuesClient, error) { - cl, err := arm.NewClient(moduleName+".FirewallPolicyIdpsSignaturesFilterValuesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicyidpssignaturesoverrides_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicyidpssignaturesoverrides_client.go index 11189433f..18a77c798 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicyidpssignaturesoverrides_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicyidpssignaturesoverrides_client.go @@ -33,7 +33,7 @@ type FirewallPolicyIdpsSignaturesOverridesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFirewallPolicyIdpsSignaturesOverridesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyIdpsSignaturesOverridesClient, error) { - cl, err := arm.NewClient(moduleName+".FirewallPolicyIdpsSignaturesOverridesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicyrulecollectiongroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicyrulecollectiongroups_client.go index 6e08ea33f..beaba2afd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicyrulecollectiongroups_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/firewallpolicyrulecollectiongroups_client.go @@ -33,7 +33,7 @@ type FirewallPolicyRuleCollectionGroupsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFirewallPolicyRuleCollectionGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyRuleCollectionGroupsClient, error) { - cl, err := arm.NewClient(moduleName+".FirewallPolicyRuleCollectionGroupsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) BeginCreateOrUpdate(ctx } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) BeginDelete(ctx context. } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FirewallPolicyRuleCollectionGroupsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[FirewallPolicyRuleCollectionGroupsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FirewallPolicyRuleCollectionGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -290,23 +296,16 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) NewListPager(resourceGro }, Fetcher: func(ctx context.Context, page *FirewallPolicyRuleCollectionGroupsClientListResponse) (FirewallPolicyRuleCollectionGroupsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FirewallPolicyRuleCollectionGroupsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return FirewallPolicyRuleCollectionGroupsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) + }, nil) if err != nil { return FirewallPolicyRuleCollectionGroupsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallPolicyRuleCollectionGroupsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/flowlogs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/flowlogs_client.go index 12202b7ef..25a9005f8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/flowlogs_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/flowlogs_client.go @@ -33,7 +33,7 @@ type FlowLogsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewFlowLogsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FlowLogsClient, error) { - cl, err := arm.NewClient(moduleName+".FlowLogsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *FlowLogsClient) BeginCreateOrUpdate(ctx context.Context, resourceG } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FlowLogsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[FlowLogsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FlowLogsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -143,10 +146,13 @@ func (client *FlowLogsClient) BeginDelete(ctx context.Context, resourceGroupName } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FlowLogsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[FlowLogsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FlowLogsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -287,23 +293,16 @@ func (client *FlowLogsClient) NewListPager(resourceGroupName string, networkWatc }, Fetcher: func(ctx context.Context, page *FlowLogsClientListResponse) (FlowLogsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FlowLogsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkWatcherName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return FlowLogsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkWatcherName, options) + }, nil) if err != nil { return FlowLogsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FlowLogsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/groups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/groups_client.go index 63d526843..113bcc3bb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/groups_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/groups_client.go @@ -34,7 +34,7 @@ type GroupsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GroupsClient, error) { - cl, err := arm.NewClient(moduleName+".GroupsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -140,10 +140,13 @@ func (client *GroupsClient) BeginDelete(ctx context.Context, resourceGroupName s } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GroupsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[GroupsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -287,23 +290,16 @@ func (client *GroupsClient) NewListPager(resourceGroupName string, networkManage }, Fetcher: func(ctx context.Context, page *GroupsClientListResponse) (GroupsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GroupsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) + }, nil) if err != nil { return GroupsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GroupsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GroupsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/hubroutetables_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/hubroutetables_client.go index 00add1e37..d906077a5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/hubroutetables_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/hubroutetables_client.go @@ -33,7 +33,7 @@ type HubRouteTablesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewHubRouteTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HubRouteTablesClient, error) { - cl, err := arm.NewClient(moduleName+".HubRouteTablesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *HubRouteTablesClient) BeginCreateOrUpdate(ctx context.Context, res } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[HubRouteTablesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[HubRouteTablesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[HubRouteTablesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *HubRouteTablesClient) BeginDelete(ctx context.Context, resourceGro } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[HubRouteTablesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[HubRouteTablesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[HubRouteTablesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -288,23 +294,16 @@ func (client *HubRouteTablesClient) NewListPager(resourceGroupName string, virtu }, Fetcher: func(ctx context.Context, page *HubRouteTablesClientListResponse) (HubRouteTablesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "HubRouteTablesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return HubRouteTablesClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + }, nil) if err != nil { return HubRouteTablesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HubRouteTablesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/hubvirtualnetworkconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/hubvirtualnetworkconnections_client.go index 4b4a87368..e47c8bb56 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/hubvirtualnetworkconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/hubvirtualnetworkconnections_client.go @@ -33,7 +33,7 @@ type HubVirtualNetworkConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewHubVirtualNetworkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HubVirtualNetworkConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".HubVirtualNetworkConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *HubVirtualNetworkConnectionsClient) BeginCreateOrUpdate(ctx contex } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[HubVirtualNetworkConnectionsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[HubVirtualNetworkConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[HubVirtualNetworkConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *HubVirtualNetworkConnectionsClient) BeginDelete(ctx context.Contex } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[HubVirtualNetworkConnectionsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[HubVirtualNetworkConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[HubVirtualNetworkConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -290,23 +296,16 @@ func (client *HubVirtualNetworkConnectionsClient) NewListPager(resourceGroupName }, Fetcher: func(ctx context.Context, page *HubVirtualNetworkConnectionsClientListResponse) (HubVirtualNetworkConnectionsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "HubVirtualNetworkConnectionsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return HubVirtualNetworkConnectionsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + }, nil) if err != nil { return HubVirtualNetworkConnectionsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HubVirtualNetworkConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/inboundnatrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/inboundnatrules_client.go index 3f01df828..464d80dc0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/inboundnatrules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/inboundnatrules_client.go @@ -33,7 +33,7 @@ type InboundNatRulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewInboundNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InboundNatRulesClient, error) { - cl, err := arm.NewClient(moduleName+".InboundNatRulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *InboundNatRulesClient) BeginCreateOrUpdate(ctx context.Context, re } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InboundNatRulesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[InboundNatRulesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InboundNatRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *InboundNatRulesClient) BeginDelete(ctx context.Context, resourceGr } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InboundNatRulesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[InboundNatRulesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InboundNatRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -292,23 +298,16 @@ func (client *InboundNatRulesClient) NewListPager(resourceGroupName string, load }, Fetcher: func(ctx context.Context, page *InboundNatRulesClientListResponse) (InboundNatRulesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InboundNatRulesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InboundNatRulesClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + }, nil) if err != nil { return InboundNatRulesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InboundNatRulesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/inboundsecurityrule_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/inboundsecurityrule_client.go index 72e1c7f18..41108ace5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/inboundsecurityrule_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/inboundsecurityrule_client.go @@ -33,7 +33,7 @@ type InboundSecurityRuleClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewInboundSecurityRuleClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InboundSecurityRuleClient, error) { - cl, err := arm.NewClient(moduleName+".InboundSecurityRuleClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *InboundSecurityRuleClient) BeginCreateOrUpdate(ctx context.Context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InboundSecurityRuleClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[InboundSecurityRuleClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InboundSecurityRuleClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/interfaceipconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/interfaceipconfigurations_client.go index d24e76763..805f961c7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/interfaceipconfigurations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/interfaceipconfigurations_client.go @@ -33,7 +33,7 @@ type InterfaceIPConfigurationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewInterfaceIPConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfaceIPConfigurationsClient, error) { - cl, err := arm.NewClient(moduleName+".InterfaceIPConfigurationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -128,23 +128,16 @@ func (client *InterfaceIPConfigurationsClient) NewListPager(resourceGroupName st }, Fetcher: func(ctx context.Context, page *InterfaceIPConfigurationsClientListResponse) (InterfaceIPConfigurationsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfaceIPConfigurationsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) + }, nil) if err != nil { return InterfaceIPConfigurationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return InterfaceIPConfigurationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfaceIPConfigurationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/interfaceloadbalancers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/interfaceloadbalancers_client.go index 1b9f55ab3..dd7e24733 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/interfaceloadbalancers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/interfaceloadbalancers_client.go @@ -33,7 +33,7 @@ type InterfaceLoadBalancersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewInterfaceLoadBalancersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfaceLoadBalancersClient, error) { - cl, err := arm.NewClient(moduleName+".InterfaceLoadBalancersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,23 +58,16 @@ func (client *InterfaceLoadBalancersClient) NewListPager(resourceGroupName strin }, Fetcher: func(ctx context.Context, page *InterfaceLoadBalancersClientListResponse) (InterfaceLoadBalancersClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfaceLoadBalancersClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) + }, nil) if err != nil { return InterfaceLoadBalancersClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return InterfaceLoadBalancersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfaceLoadBalancersClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/interfaces_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/interfaces_client.go index 1d1d78227..e28e01c0b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/interfaces_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/interfaces_client.go @@ -33,7 +33,7 @@ type InterfacesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewInterfacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfacesClient, error) { - cl, err := arm.NewClient(moduleName+".InterfacesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *InterfacesClient) BeginCreateOrUpdate(ctx context.Context, resourc } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InterfacesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[InterfacesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InterfacesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -137,10 +140,13 @@ func (client *InterfacesClient) BeginDelete(ctx context.Context, resourceGroupNa } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InterfacesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[InterfacesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InterfacesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -356,10 +362,13 @@ func (client *InterfacesClient) BeginGetEffectiveRouteTable(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InterfacesClientGetEffectiveRouteTableResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[InterfacesClientGetEffectiveRouteTableResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InterfacesClientGetEffectiveRouteTableResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -588,23 +597,16 @@ func (client *InterfacesClient) NewListPager(resourceGroupName string, options * }, Fetcher: func(ctx context.Context, page *InterfacesClientListResponse) (InterfacesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfacesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InterfacesClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return InterfacesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -653,23 +655,16 @@ func (client *InterfacesClient) NewListAllPager(options *InterfacesClientListAll }, Fetcher: func(ctx context.Context, page *InterfacesClientListAllResponse) (InterfacesClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfacesClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InterfacesClientListAllResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return InterfacesClientListAllResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -717,23 +712,16 @@ func (client *InterfacesClient) NewListCloudServiceNetworkInterfacesPager(resour }, Fetcher: func(ctx context.Context, page *InterfacesClientListCloudServiceNetworkInterfacesResponse) (InterfacesClientListCloudServiceNetworkInterfacesResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfacesClient.NewListCloudServiceNetworkInterfacesPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCloudServiceNetworkInterfacesCreateRequest(ctx, resourceGroupName, cloudServiceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InterfacesClientListCloudServiceNetworkInterfacesResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCloudServiceNetworkInterfacesCreateRequest(ctx, resourceGroupName, cloudServiceName, options) + }, nil) if err != nil { return InterfacesClientListCloudServiceNetworkInterfacesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientListCloudServiceNetworkInterfacesResponse{}, runtime.NewResponseError(resp) - } return client.listCloudServiceNetworkInterfacesHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -791,23 +779,16 @@ func (client *InterfacesClient) NewListCloudServiceRoleInstanceNetworkInterfaces }, Fetcher: func(ctx context.Context, page *InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse) (InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfacesClient.NewListCloudServiceRoleInstanceNetworkInterfacesPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCloudServiceRoleInstanceNetworkInterfacesCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCloudServiceRoleInstanceNetworkInterfacesCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, options) + }, nil) if err != nil { return InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse{}, runtime.NewResponseError(resp) - } return client.listCloudServiceRoleInstanceNetworkInterfacesHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -869,10 +850,13 @@ func (client *InterfacesClient) BeginListEffectiveNetworkSecurityGroups(ctx cont } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InterfacesClientListEffectiveNetworkSecurityGroupsResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[InterfacesClientListEffectiveNetworkSecurityGroupsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InterfacesClientListEffectiveNetworkSecurityGroupsResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -944,23 +928,16 @@ func (client *InterfacesClient) NewListVirtualMachineScaleSetIPConfigurationsPag }, Fetcher: func(ctx context.Context, page *InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse) (InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfacesClient.NewListVirtualMachineScaleSetIPConfigurationsPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listVirtualMachineScaleSetIPConfigurationsCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listVirtualMachineScaleSetIPConfigurationsCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, options) + }, nil) if err != nil { return InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse{}, runtime.NewResponseError(resp) - } return client.listVirtualMachineScaleSetIPConfigurationsHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -1027,23 +1004,16 @@ func (client *InterfacesClient) NewListVirtualMachineScaleSetNetworkInterfacesPa }, Fetcher: func(ctx context.Context, page *InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse) (InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfacesClient.NewListVirtualMachineScaleSetNetworkInterfacesPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listVirtualMachineScaleSetNetworkInterfacesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listVirtualMachineScaleSetNetworkInterfacesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, options) + }, nil) if err != nil { return InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse{}, runtime.NewResponseError(resp) - } return client.listVirtualMachineScaleSetNetworkInterfacesHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -1101,23 +1071,16 @@ func (client *InterfacesClient) NewListVirtualMachineScaleSetVMNetworkInterfaces }, Fetcher: func(ctx context.Context, page *InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse) (InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfacesClient.NewListVirtualMachineScaleSetVMNetworkInterfacesPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listVirtualMachineScaleSetVMNetworkInterfacesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listVirtualMachineScaleSetVMNetworkInterfacesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, options) + }, nil) if err != nil { return InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse{}, runtime.NewResponseError(resp) - } return client.listVirtualMachineScaleSetVMNetworkInterfacesHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/interfacetapconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/interfacetapconfigurations_client.go index b2092c5a8..fdff9756b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/interfacetapconfigurations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/interfacetapconfigurations_client.go @@ -33,7 +33,7 @@ type InterfaceTapConfigurationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewInterfaceTapConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfaceTapConfigurationsClient, error) { - cl, err := arm.NewClient(moduleName+".InterfaceTapConfigurationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *InterfaceTapConfigurationsClient) BeginCreateOrUpdate(ctx context. } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InterfaceTapConfigurationsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[InterfaceTapConfigurationsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InterfaceTapConfigurationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *InterfaceTapConfigurationsClient) BeginDelete(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InterfaceTapConfigurationsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[InterfaceTapConfigurationsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InterfaceTapConfigurationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -290,23 +296,16 @@ func (client *InterfaceTapConfigurationsClient) NewListPager(resourceGroupName s }, Fetcher: func(ctx context.Context, page *InterfaceTapConfigurationsClientListResponse) (InterfaceTapConfigurationsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfaceTapConfigurationsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InterfaceTapConfigurationsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) + }, nil) if err != nil { return InterfaceTapConfigurationsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfaceTapConfigurationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/ipallocations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/ipallocations_client.go index c3f9c061f..3aff2a84d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/ipallocations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/ipallocations_client.go @@ -33,7 +33,7 @@ type IPAllocationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIPAllocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IPAllocationsClient, error) { - cl, err := arm.NewClient(moduleName+".IPAllocationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *IPAllocationsClient) BeginCreateOrUpdate(ctx context.Context, reso } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IPAllocationsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[IPAllocationsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IPAllocationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *IPAllocationsClient) BeginDelete(ctx context.Context, resourceGrou } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IPAllocationsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[IPAllocationsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IPAllocationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -274,23 +280,16 @@ func (client *IPAllocationsClient) NewListPager(options *IPAllocationsClientList }, Fetcher: func(ctx context.Context, page *IPAllocationsClientListResponse) (IPAllocationsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IPAllocationsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return IPAllocationsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return IPAllocationsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IPAllocationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -337,23 +336,16 @@ func (client *IPAllocationsClient) NewListByResourceGroupPager(resourceGroupName }, Fetcher: func(ctx context.Context, page *IPAllocationsClientListByResourceGroupResponse) (IPAllocationsClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IPAllocationsClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return IPAllocationsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return IPAllocationsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IPAllocationsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/ipgroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/ipgroups_client.go index 6cae47005..e64510aa5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/ipgroups_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/ipgroups_client.go @@ -33,7 +33,7 @@ type IPGroupsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIPGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IPGroupsClient, error) { - cl, err := arm.NewClient(moduleName+".IPGroupsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *IPGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceG } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IPGroupsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[IPGroupsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IPGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -137,10 +140,13 @@ func (client *IPGroupsClient) BeginDelete(ctx context.Context, resourceGroupName } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IPGroupsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[IPGroupsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IPGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -273,23 +279,16 @@ func (client *IPGroupsClient) NewListPager(options *IPGroupsClientListOptions) * }, Fetcher: func(ctx context.Context, page *IPGroupsClientListResponse) (IPGroupsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IPGroupsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return IPGroupsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return IPGroupsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IPGroupsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -336,23 +335,16 @@ func (client *IPGroupsClient) NewListByResourceGroupPager(resourceGroupName stri }, Fetcher: func(ctx context.Context, page *IPGroupsClientListByResourceGroupResponse) (IPGroupsClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IPGroupsClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return IPGroupsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return IPGroupsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IPGroupsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancerbackendaddresspools_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancerbackendaddresspools_client.go index 4ed5ac551..f0c7b034f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancerbackendaddresspools_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancerbackendaddresspools_client.go @@ -33,7 +33,7 @@ type LoadBalancerBackendAddressPoolsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerBackendAddressPoolsClient, error) { - cl, err := arm.NewClient(moduleName+".LoadBalancerBackendAddressPoolsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *LoadBalancerBackendAddressPoolsClient) BeginCreateOrUpdate(ctx con } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *LoadBalancerBackendAddressPoolsClient) BeginDelete(ctx context.Con } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LoadBalancerBackendAddressPoolsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[LoadBalancerBackendAddressPoolsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LoadBalancerBackendAddressPoolsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -290,23 +296,16 @@ func (client *LoadBalancerBackendAddressPoolsClient) NewListPager(resourceGroupN }, Fetcher: func(ctx context.Context, page *LoadBalancerBackendAddressPoolsClientListResponse) (LoadBalancerBackendAddressPoolsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoadBalancerBackendAddressPoolsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return LoadBalancerBackendAddressPoolsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + }, nil) if err != nil { return LoadBalancerBackendAddressPoolsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancerBackendAddressPoolsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancerfrontendipconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancerfrontendipconfigurations_client.go index 8e0993f0e..8d996375c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancerfrontendipconfigurations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancerfrontendipconfigurations_client.go @@ -33,7 +33,7 @@ type LoadBalancerFrontendIPConfigurationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerFrontendIPConfigurationsClient, error) { - cl, err := arm.NewClient(moduleName+".LoadBalancerFrontendIPConfigurationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -128,23 +128,16 @@ func (client *LoadBalancerFrontendIPConfigurationsClient) NewListPager(resourceG }, Fetcher: func(ctx context.Context, page *LoadBalancerFrontendIPConfigurationsClientListResponse) (LoadBalancerFrontendIPConfigurationsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoadBalancerFrontendIPConfigurationsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + }, nil) if err != nil { return LoadBalancerFrontendIPConfigurationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return LoadBalancerFrontendIPConfigurationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancerFrontendIPConfigurationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancerloadbalancingrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancerloadbalancingrules_client.go index 139193a12..2e3039096 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancerloadbalancingrules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancerloadbalancingrules_client.go @@ -33,7 +33,7 @@ type LoadBalancerLoadBalancingRulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerLoadBalancingRulesClient, error) { - cl, err := arm.NewClient(moduleName+".LoadBalancerLoadBalancingRulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -128,23 +128,16 @@ func (client *LoadBalancerLoadBalancingRulesClient) NewListPager(resourceGroupNa }, Fetcher: func(ctx context.Context, page *LoadBalancerLoadBalancingRulesClientListResponse) (LoadBalancerLoadBalancingRulesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoadBalancerLoadBalancingRulesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + }, nil) if err != nil { return LoadBalancerLoadBalancingRulesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return LoadBalancerLoadBalancingRulesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancerLoadBalancingRulesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancernetworkinterfaces_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancernetworkinterfaces_client.go index 11ae85c72..379161ac5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancernetworkinterfaces_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancernetworkinterfaces_client.go @@ -33,7 +33,7 @@ type LoadBalancerNetworkInterfacesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLoadBalancerNetworkInterfacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerNetworkInterfacesClient, error) { - cl, err := arm.NewClient(moduleName+".LoadBalancerNetworkInterfacesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,23 +58,16 @@ func (client *LoadBalancerNetworkInterfacesClient) NewListPager(resourceGroupNam }, Fetcher: func(ctx context.Context, page *LoadBalancerNetworkInterfacesClientListResponse) (LoadBalancerNetworkInterfacesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoadBalancerNetworkInterfacesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + }, nil) if err != nil { return LoadBalancerNetworkInterfacesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return LoadBalancerNetworkInterfacesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancerNetworkInterfacesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalanceroutboundrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalanceroutboundrules_client.go index be797e9fe..1c4826487 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalanceroutboundrules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalanceroutboundrules_client.go @@ -33,7 +33,7 @@ type LoadBalancerOutboundRulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLoadBalancerOutboundRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerOutboundRulesClient, error) { - cl, err := arm.NewClient(moduleName+".LoadBalancerOutboundRulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -128,23 +128,16 @@ func (client *LoadBalancerOutboundRulesClient) NewListPager(resourceGroupName st }, Fetcher: func(ctx context.Context, page *LoadBalancerOutboundRulesClientListResponse) (LoadBalancerOutboundRulesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoadBalancerOutboundRulesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + }, nil) if err != nil { return LoadBalancerOutboundRulesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return LoadBalancerOutboundRulesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancerOutboundRulesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancerprobes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancerprobes_client.go index d83cf3965..8ab5b64e8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancerprobes_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancerprobes_client.go @@ -33,7 +33,7 @@ type LoadBalancerProbesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLoadBalancerProbesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerProbesClient, error) { - cl, err := arm.NewClient(moduleName+".LoadBalancerProbesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -127,23 +127,16 @@ func (client *LoadBalancerProbesClient) NewListPager(resourceGroupName string, l }, Fetcher: func(ctx context.Context, page *LoadBalancerProbesClientListResponse) (LoadBalancerProbesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoadBalancerProbesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + }, nil) if err != nil { return LoadBalancerProbesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return LoadBalancerProbesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancerProbesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancers_client.go index e9af1e85f..3dc0f757c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/loadbalancers_client.go @@ -33,7 +33,7 @@ type LoadBalancersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLoadBalancersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancersClient, error) { - cl, err := arm.NewClient(moduleName+".LoadBalancersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *LoadBalancersClient) BeginCreateOrUpdate(ctx context.Context, reso } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LoadBalancersClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[LoadBalancersClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LoadBalancersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *LoadBalancersClient) BeginDelete(ctx context.Context, resourceGrou } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LoadBalancersClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[LoadBalancersClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LoadBalancersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -275,23 +281,16 @@ func (client *LoadBalancersClient) NewListPager(resourceGroupName string, option }, Fetcher: func(ctx context.Context, page *LoadBalancersClientListResponse) (LoadBalancersClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoadBalancersClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return LoadBalancersClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return LoadBalancersClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancersClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -341,23 +340,16 @@ func (client *LoadBalancersClient) NewListAllPager(options *LoadBalancersClientL }, Fetcher: func(ctx context.Context, page *LoadBalancersClientListAllResponse) (LoadBalancersClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoadBalancersClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return LoadBalancersClientListAllResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return LoadBalancersClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancersClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -409,10 +401,13 @@ func (client *LoadBalancersClient) BeginListInboundNatRulePortMappings(ctx conte } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LoadBalancersClientListInboundNatRulePortMappingsResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[LoadBalancersClientListInboundNatRulePortMappingsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LoadBalancersClientListInboundNatRulePortMappingsResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -561,10 +556,13 @@ func (client *LoadBalancersClient) BeginSwapPublicIPAddresses(ctx context.Contex } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LoadBalancersClientSwapPublicIPAddressesResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[LoadBalancersClientSwapPublicIPAddressesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LoadBalancersClientSwapPublicIPAddressesResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/localnetworkgateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/localnetworkgateways_client.go index ac74806cb..9f5a5e7c1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/localnetworkgateways_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/localnetworkgateways_client.go @@ -33,7 +33,7 @@ type LocalNetworkGatewaysClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLocalNetworkGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocalNetworkGatewaysClient, error) { - cl, err := arm.NewClient(moduleName+".LocalNetworkGatewaysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *LocalNetworkGatewaysClient) BeginCreateOrUpdate(ctx context.Contex } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LocalNetworkGatewaysClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[LocalNetworkGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LocalNetworkGatewaysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *LocalNetworkGatewaysClient) BeginDelete(ctx context.Context, resou } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LocalNetworkGatewaysClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[LocalNetworkGatewaysClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LocalNetworkGatewaysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -274,23 +280,16 @@ func (client *LocalNetworkGatewaysClient) NewListPager(resourceGroupName string, }, Fetcher: func(ctx context.Context, page *LocalNetworkGatewaysClientListResponse) (LocalNetworkGatewaysClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LocalNetworkGatewaysClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return LocalNetworkGatewaysClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return LocalNetworkGatewaysClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalNetworkGatewaysClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/management_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/management_client.go index e9971bc92..2955b415a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/management_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/management_client.go @@ -34,7 +34,7 @@ type ManagementClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementClient, error) { - cl, err := arm.NewClient(moduleName+".ManagementClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -124,10 +124,13 @@ func (client *ManagementClient) BeginDeleteBastionShareableLink(ctx context.Cont } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagementClientDeleteBastionShareableLinkResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ManagementClientDeleteBastionShareableLinkResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagementClientDeleteBastionShareableLinkResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -200,23 +203,16 @@ func (client *ManagementClient) NewDisconnectActiveSessionsPager(resourceGroupNa }, Fetcher: func(ctx context.Context, page *ManagementClientDisconnectActiveSessionsResponse) (ManagementClientDisconnectActiveSessionsResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagementClient.NewDisconnectActiveSessionsPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.disconnectActiveSessionsCreateRequest(ctx, resourceGroupName, bastionHostName, sessionIDs, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.disconnectActiveSessionsCreateRequest(ctx, resourceGroupName, bastionHostName, sessionIDs, options) + }, nil) if err != nil { return ManagementClientDisconnectActiveSessionsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagementClientDisconnectActiveSessionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientDisconnectActiveSessionsResponse{}, runtime.NewResponseError(resp) - } return client.disconnectActiveSessionsHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -339,10 +335,13 @@ func (client *ManagementClient) BeginGeneratevirtualwanvpnserverconfigurationvpn } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -415,17 +414,12 @@ func (client *ManagementClient) BeginGetActiveSessions(ctx context.Context, reso }, Fetcher: func(ctx context.Context, page *ManagementClientGetActiveSessionsResponse) (ManagementClientGetActiveSessionsResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagementClient.BeginGetActiveSessions") - req, err := runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - if err != nil { - return ManagementClientGetActiveSessionsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), *page.NextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getActiveSessionsCreateRequest(ctx, resourceGroupName, bastionHostName, options) + }, nil) if err != nil { return ManagementClientGetActiveSessionsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientGetActiveSessionsResponse{}, runtime.NewResponseError(resp) - } return client.getActiveSessionsHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -438,11 +432,13 @@ func (client *ManagementClient) BeginGetActiveSessions(ctx context.Context, reso poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[*runtime.Pager[ManagementClientGetActiveSessionsResponse]]{ FinalStateVia: runtime.FinalStateViaLocation, Response: &pager, + Tracer: client.internal.Tracer(), }) return poller, err } else { return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[*runtime.Pager[ManagementClientGetActiveSessionsResponse]]{ Response: &pager, + Tracer: client.internal.Tracer(), }) } } @@ -521,23 +517,16 @@ func (client *ManagementClient) NewGetBastionShareableLinkPager(resourceGroupNam }, Fetcher: func(ctx context.Context, page *ManagementClientGetBastionShareableLinkResponse) (ManagementClientGetBastionShareableLinkResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagementClient.NewGetBastionShareableLinkPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.getBastionShareableLinkCreateRequest(ctx, resourceGroupName, bastionHostName, bslRequest, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getBastionShareableLinkCreateRequest(ctx, resourceGroupName, bastionHostName, bslRequest, options) + }, nil) if err != nil { return ManagementClientGetBastionShareableLinkResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagementClientGetBastionShareableLinkResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientGetBastionShareableLinkResponse{}, runtime.NewResponseError(resp) - } return client.getBastionShareableLinkHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -886,17 +875,12 @@ func (client *ManagementClient) BeginPutBastionShareableLink(ctx context.Context }, Fetcher: func(ctx context.Context, page *ManagementClientPutBastionShareableLinkResponse) (ManagementClientPutBastionShareableLinkResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagementClient.BeginPutBastionShareableLink") - req, err := runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), *page.NextLink, func(ctx context.Context) (*policy.Request, error) { + return client.putBastionShareableLinkCreateRequest(ctx, resourceGroupName, bastionHostName, bslRequest, options) + }, nil) if err != nil { return ManagementClientPutBastionShareableLinkResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagementClientPutBastionShareableLinkResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientPutBastionShareableLinkResponse{}, runtime.NewResponseError(resp) - } return client.putBastionShareableLinkHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -909,11 +893,13 @@ func (client *ManagementClient) BeginPutBastionShareableLink(ctx context.Context poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[*runtime.Pager[ManagementClientPutBastionShareableLinkResponse]]{ FinalStateVia: runtime.FinalStateViaLocation, Response: &pager, + Tracer: client.internal.Tracer(), }) return poller, err } else { return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[*runtime.Pager[ManagementClientPutBastionShareableLinkResponse]]{ Response: &pager, + Tracer: client.internal.Tracer(), }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/managementgroupnetworkmanagerconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/managementgroupnetworkmanagerconnections_client.go index 2825516ce..a672f6e34 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/managementgroupnetworkmanagerconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/managementgroupnetworkmanagerconnections_client.go @@ -31,7 +31,7 @@ type ManagementGroupNetworkManagerConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewManagementGroupNetworkManagerConnectionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementGroupNetworkManagerConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".ManagementGroupNetworkManagerConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -231,23 +231,16 @@ func (client *ManagementGroupNetworkManagerConnectionsClient) NewListPager(manag }, Fetcher: func(ctx context.Context, page *ManagementGroupNetworkManagerConnectionsClientListResponse) (ManagementGroupNetworkManagerConnectionsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagementGroupNetworkManagerConnectionsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, managementGroupID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, managementGroupID, options) + }, nil) if err != nil { return ManagementGroupNetworkManagerConnectionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagementGroupNetworkManagerConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementGroupNetworkManagerConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/managercommits_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/managercommits_client.go index 469d21867..664336970 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/managercommits_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/managercommits_client.go @@ -33,7 +33,7 @@ type ManagerCommitsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewManagerCommitsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagerCommitsClient, error) { - cl, err := arm.NewClient(moduleName+".ManagerCommitsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *ManagerCommitsClient) BeginPost(ctx context.Context, resourceGroup } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagerCommitsClientPostResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ManagerCommitsClientPostResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagerCommitsClientPostResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/managerdeploymentstatus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/managerdeploymentstatus_client.go index 42b3c5701..d4d5b8580 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/managerdeploymentstatus_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/managerdeploymentstatus_client.go @@ -34,7 +34,7 @@ type ManagerDeploymentStatusClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewManagerDeploymentStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagerDeploymentStatusClient, error) { - cl, err := arm.NewClient(moduleName+".ManagerDeploymentStatusClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/managers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/managers_client.go index 4132b0290..4bb745c86 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/managers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/managers_client.go @@ -34,7 +34,7 @@ type ManagersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewManagersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagersClient, error) { - cl, err := arm.NewClient(moduleName+".ManagersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -128,10 +128,13 @@ func (client *ManagersClient) BeginDelete(ctx context.Context, resourceGroupName } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagersClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ManagersClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -265,23 +268,16 @@ func (client *ManagersClient) NewListPager(resourceGroupName string, options *Ma }, Fetcher: func(ctx context.Context, page *ManagersClientListResponse) (ManagersClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagersClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return ManagersClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagersClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -337,23 +333,16 @@ func (client *ManagersClient) NewListBySubscriptionPager(options *ManagersClient }, Fetcher: func(ctx context.Context, page *ManagersClientListBySubscriptionResponse) (ManagersClientListBySubscriptionResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagersClient.NewListBySubscriptionPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) if err != nil { return ManagersClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagersClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagersClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/models_serde.go index 125e0c5cf..affbe8f63 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/models_serde.go @@ -84,7 +84,7 @@ func (a *Action) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ActiveBaseSecurityAdminRule. func (a ActiveBaseSecurityAdminRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "commitTime", a.CommitTime) + populateDateTimeRFC3339(objectMap, "commitTime", a.CommitTime) populate(objectMap, "configurationDescription", a.ConfigurationDescription) populate(objectMap, "id", a.ID) objectMap["kind"] = a.Kind @@ -105,7 +105,7 @@ func (a *ActiveBaseSecurityAdminRule) UnmarshalJSON(data []byte) error { var err error switch key { case "commitTime": - err = unpopulateTimeRFC3339(val, "CommitTime", &a.CommitTime) + err = unpopulateDateTimeRFC3339(val, "CommitTime", &a.CommitTime) delete(rawMsg, key) case "configurationDescription": err = unpopulate(val, "ConfigurationDescription", &a.ConfigurationDescription) @@ -170,7 +170,7 @@ func (a *ActiveConfigurationParameter) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ActiveConnectivityConfiguration. func (a ActiveConnectivityConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "commitTime", a.CommitTime) + populateDateTimeRFC3339(objectMap, "commitTime", a.CommitTime) populate(objectMap, "configurationGroups", a.ConfigurationGroups) populate(objectMap, "id", a.ID) populate(objectMap, "properties", a.Properties) @@ -188,7 +188,7 @@ func (a *ActiveConnectivityConfiguration) UnmarshalJSON(data []byte) error { var err error switch key { case "commitTime": - err = unpopulateTimeRFC3339(val, "CommitTime", &a.CommitTime) + err = unpopulateDateTimeRFC3339(val, "CommitTime", &a.CommitTime) delete(rawMsg, key) case "configurationGroups": err = unpopulate(val, "ConfigurationGroups", &a.ConfigurationGroups) @@ -244,7 +244,7 @@ func (a *ActiveConnectivityConfigurationsListResult) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type ActiveDefaultSecurityAdminRule. func (a ActiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "commitTime", a.CommitTime) + populateDateTimeRFC3339(objectMap, "commitTime", a.CommitTime) populate(objectMap, "configurationDescription", a.ConfigurationDescription) populate(objectMap, "id", a.ID) objectMap["kind"] = EffectiveAdminRuleKindDefault @@ -266,7 +266,7 @@ func (a *ActiveDefaultSecurityAdminRule) UnmarshalJSON(data []byte) error { var err error switch key { case "commitTime": - err = unpopulateTimeRFC3339(val, "CommitTime", &a.CommitTime) + err = unpopulateDateTimeRFC3339(val, "CommitTime", &a.CommitTime) delete(rawMsg, key) case "configurationDescription": err = unpopulate(val, "ConfigurationDescription", &a.ConfigurationDescription) @@ -303,7 +303,7 @@ func (a *ActiveDefaultSecurityAdminRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ActiveSecurityAdminRule. func (a ActiveSecurityAdminRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "commitTime", a.CommitTime) + populateDateTimeRFC3339(objectMap, "commitTime", a.CommitTime) populate(objectMap, "configurationDescription", a.ConfigurationDescription) populate(objectMap, "id", a.ID) objectMap["kind"] = EffectiveAdminRuleKindCustom @@ -325,7 +325,7 @@ func (a *ActiveSecurityAdminRule) UnmarshalJSON(data []byte) error { var err error switch key { case "commitTime": - err = unpopulateTimeRFC3339(val, "CommitTime", &a.CommitTime) + err = unpopulateDateTimeRFC3339(val, "CommitTime", &a.CommitTime) delete(rawMsg, key) case "configurationDescription": err = unpopulate(val, "ConfigurationDescription", &a.ConfigurationDescription) @@ -6488,7 +6488,7 @@ func (a *AzureReachabilityReportItem) UnmarshalJSON(data []byte) error { func (a AzureReachabilityReportLatencyInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "score", a.Score) - populateTimeRFC3339(objectMap, "timeStamp", a.TimeStamp) + populateDateTimeRFC3339(objectMap, "timeStamp", a.TimeStamp) return json.Marshal(objectMap) } @@ -6505,7 +6505,7 @@ func (a *AzureReachabilityReportLatencyInfo) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Score", &a.Score) delete(rawMsg, key) case "timeStamp": - err = unpopulateTimeRFC3339(val, "TimeStamp", &a.TimeStamp) + err = unpopulateDateTimeRFC3339(val, "TimeStamp", &a.TimeStamp) delete(rawMsg, key) } if err != nil { @@ -6554,10 +6554,10 @@ func (a *AzureReachabilityReportLocation) UnmarshalJSON(data []byte) error { func (a AzureReachabilityReportParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "azureLocations", a.AzureLocations) - populateTimeRFC3339(objectMap, "endTime", a.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", a.EndTime) populate(objectMap, "providerLocation", a.ProviderLocation) populate(objectMap, "providers", a.Providers) - populateTimeRFC3339(objectMap, "startTime", a.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", a.StartTime) return json.Marshal(objectMap) } @@ -6574,7 +6574,7 @@ func (a *AzureReachabilityReportParameters) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AzureLocations", &a.AzureLocations) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &a.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &a.EndTime) delete(rawMsg, key) case "providerLocation": err = unpopulate(val, "ProviderLocation", &a.ProviderLocation) @@ -6583,7 +6583,7 @@ func (a *AzureReachabilityReportParameters) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Providers", &a.Providers) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &a.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &a.StartTime) delete(rawMsg, key) } if err != nil { @@ -8598,7 +8598,7 @@ func (c ConnectionMonitorResultProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "outputs", c.Outputs) populate(objectMap, "provisioningState", c.ProvisioningState) populate(objectMap, "source", c.Source) - populateTimeRFC3339(objectMap, "startTime", c.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", c.StartTime) populate(objectMap, "testConfigurations", c.TestConfigurations) populate(objectMap, "testGroups", c.TestGroups) return json.Marshal(objectMap) @@ -8644,7 +8644,7 @@ func (c *ConnectionMonitorResultProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Source", &c.Source) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &c.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &c.StartTime) delete(rawMsg, key) case "testConfigurations": err = unpopulate(val, "TestConfigurations", &c.TestConfigurations) @@ -8945,14 +8945,14 @@ func (c ConnectionStateSnapshot) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "avgLatencyInMs", c.AvgLatencyInMs) populate(objectMap, "connectionState", c.ConnectionState) - populateTimeRFC3339(objectMap, "endTime", c.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", c.EndTime) populate(objectMap, "evaluationState", c.EvaluationState) populate(objectMap, "hops", c.Hops) populate(objectMap, "maxLatencyInMs", c.MaxLatencyInMs) populate(objectMap, "minLatencyInMs", c.MinLatencyInMs) populate(objectMap, "probesFailed", c.ProbesFailed) populate(objectMap, "probesSent", c.ProbesSent) - populateTimeRFC3339(objectMap, "startTime", c.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", c.StartTime) return json.Marshal(objectMap) } @@ -8972,7 +8972,7 @@ func (c *ConnectionStateSnapshot) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ConnectionState", &c.ConnectionState) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &c.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &c.EndTime) delete(rawMsg, key) case "evaluationState": err = unpopulate(val, "EvaluationState", &c.EvaluationState) @@ -8993,7 +8993,7 @@ func (c *ConnectionStateSnapshot) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ProbesSent", &c.ProbesSent) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &c.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &c.StartTime) delete(rawMsg, key) } if err != nil { @@ -20217,7 +20217,7 @@ func (m *ManagerConnectionProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagerDeploymentStatus. func (m ManagerDeploymentStatus) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "commitTime", m.CommitTime) + populateDateTimeRFC3339(objectMap, "commitTime", m.CommitTime) populate(objectMap, "configurationIds", m.ConfigurationIDs) populate(objectMap, "deploymentStatus", m.DeploymentStatus) populate(objectMap, "deploymentType", m.DeploymentType) @@ -20236,7 +20236,7 @@ func (m *ManagerDeploymentStatus) UnmarshalJSON(data []byte) error { var err error switch key { case "commitTime": - err = unpopulateTimeRFC3339(val, "CommitTime", &m.CommitTime) + err = unpopulateDateTimeRFC3339(val, "CommitTime", &m.CommitTime) delete(rawMsg, key) case "configurationIds": err = unpopulate(val, "ConfigurationIDs", &m.ConfigurationIDs) @@ -22013,7 +22013,7 @@ func (p *PacketCaptureParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PacketCaptureQueryStatusResult. func (p PacketCaptureQueryStatusResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "captureStartTime", p.CaptureStartTime) + populateDateTimeRFC3339(objectMap, "captureStartTime", p.CaptureStartTime) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) populate(objectMap, "packetCaptureError", p.PacketCaptureError) @@ -22032,7 +22032,7 @@ func (p *PacketCaptureQueryStatusResult) UnmarshalJSON(data []byte) error { var err error switch key { case "captureStartTime": - err = unpopulateTimeRFC3339(val, "CaptureStartTime", &p.CaptureStartTime) + err = unpopulateDateTimeRFC3339(val, "CaptureStartTime", &p.CaptureStartTime) delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &p.ID) @@ -28056,10 +28056,10 @@ func (s *SwapResourceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) populate(objectMap, "lastModifiedBy", s.LastModifiedBy) populate(objectMap, "lastModifiedByType", s.LastModifiedByType) return json.Marshal(objectMap) @@ -28075,7 +28075,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": err = unpopulate(val, "CreatedBy", &s.CreatedBy) @@ -28084,7 +28084,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) @@ -28130,9 +28130,9 @@ func (t *TagsObject) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Topology. func (t Topology) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdDateTime", t.CreatedDateTime) + populateDateTimeRFC3339(objectMap, "createdDateTime", t.CreatedDateTime) populate(objectMap, "id", t.ID) - populateTimeRFC3339(objectMap, "lastModified", t.LastModified) + populateDateTimeRFC3339(objectMap, "lastModified", t.LastModified) populate(objectMap, "resources", t.Resources) return json.Marshal(objectMap) } @@ -28147,13 +28147,13 @@ func (t *Topology) UnmarshalJSON(data []byte) error { var err error switch key { case "createdDateTime": - err = unpopulateTimeRFC3339(val, "CreatedDateTime", &t.CreatedDateTime) + err = unpopulateDateTimeRFC3339(val, "CreatedDateTime", &t.CreatedDateTime) delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &t.ID) delete(rawMsg, key) case "lastModified": - err = unpopulateTimeRFC3339(val, "LastModified", &t.LastModified) + err = unpopulateDateTimeRFC3339(val, "LastModified", &t.LastModified) delete(rawMsg, key) case "resources": err = unpopulate(val, "Resources", &t.Resources) @@ -28524,9 +28524,9 @@ func (t *TroubleshootingRecommendedActions) UnmarshalJSON(data []byte) error { func (t TroubleshootingResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "code", t.Code) - populateTimeRFC3339(objectMap, "endTime", t.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", t.EndTime) populate(objectMap, "results", t.Results) - populateTimeRFC3339(objectMap, "startTime", t.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", t.StartTime) return json.Marshal(objectMap) } @@ -28543,13 +28543,13 @@ func (t *TroubleshootingResult) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Code", &t.Code) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &t.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &t.EndTime) delete(rawMsg, key) case "results": err = unpopulate(val, "Results", &t.Results) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &t.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &t.StartTime) delete(rawMsg, key) } if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/natgateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/natgateways_client.go index 82cdf57da..d7cf68098 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/natgateways_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/natgateways_client.go @@ -33,7 +33,7 @@ type NatGatewaysClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewNatGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NatGatewaysClient, error) { - cl, err := arm.NewClient(moduleName+".NatGatewaysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *NatGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resour } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NatGatewaysClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[NatGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[NatGatewaysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -137,10 +140,13 @@ func (client *NatGatewaysClient) BeginDelete(ctx context.Context, resourceGroupN } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NatGatewaysClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[NatGatewaysClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[NatGatewaysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -274,23 +280,16 @@ func (client *NatGatewaysClient) NewListPager(resourceGroupName string, options }, Fetcher: func(ctx context.Context, page *NatGatewaysClientListResponse) (NatGatewaysClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "NatGatewaysClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return NatGatewaysClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return NatGatewaysClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NatGatewaysClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -339,23 +338,16 @@ func (client *NatGatewaysClient) NewListAllPager(options *NatGatewaysClientListA }, Fetcher: func(ctx context.Context, page *NatGatewaysClientListAllResponse) (NatGatewaysClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "NatGatewaysClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return NatGatewaysClientListAllResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return NatGatewaysClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NatGatewaysClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/natrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/natrules_client.go index 4cb9a2b44..3bfc0b6ae 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/natrules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/natrules_client.go @@ -33,7 +33,7 @@ type NatRulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NatRulesClient, error) { - cl, err := arm.NewClient(moduleName+".NatRulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *NatRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceG } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NatRulesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[NatRulesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[NatRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -143,10 +146,13 @@ func (client *NatRulesClient) BeginDelete(ctx context.Context, resourceGroupName } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NatRulesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[NatRulesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[NatRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -288,23 +294,16 @@ func (client *NatRulesClient) NewListByVPNGatewayPager(resourceGroupName string, }, Fetcher: func(ctx context.Context, page *NatRulesClientListByVPNGatewayResponse) (NatRulesClientListByVPNGatewayResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "NatRulesClient.NewListByVPNGatewayPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByVPNGatewayCreateRequest(ctx, resourceGroupName, gatewayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return NatRulesClientListByVPNGatewayResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByVPNGatewayCreateRequest(ctx, resourceGroupName, gatewayName, options) + }, nil) if err != nil { return NatRulesClientListByVPNGatewayResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NatRulesClientListByVPNGatewayResponse{}, runtime.NewResponseError(resp) - } return client.listByVPNGatewayHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/operations_client.go index eea08374d..3312c5ba4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/operations_client.go @@ -27,7 +27,7 @@ type OperationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - cl, err := arm.NewClient(moduleName+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,23 +48,16 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return OperationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/p2svpngateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/p2svpngateways_client.go index a3ac3d2c9..112e1e5c9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/p2svpngateways_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/p2svpngateways_client.go @@ -33,7 +33,7 @@ type P2SVPNGatewaysClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewP2SVPNGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*P2SVPNGatewaysClient, error) { - cl, err := arm.NewClient(moduleName+".P2SVPNGatewaysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *P2SVPNGatewaysClient) BeginCreateOrUpdate(ctx context.Context, res } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[P2SVPNGatewaysClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[P2SVPNGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[P2SVPNGatewaysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *P2SVPNGatewaysClient) BeginDelete(ctx context.Context, resourceGro } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[P2SVPNGatewaysClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[P2SVPNGatewaysClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[P2SVPNGatewaysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -214,10 +220,13 @@ func (client *P2SVPNGatewaysClient) BeginDisconnectP2SVPNConnections(ctx context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -293,10 +302,13 @@ func (client *P2SVPNGatewaysClient) BeginGenerateVPNProfile(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[P2SVPNGatewaysClientGenerateVPNProfileResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[P2SVPNGatewaysClientGenerateVPNProfileResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[P2SVPNGatewaysClientGenerateVPNProfileResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -435,10 +447,13 @@ func (client *P2SVPNGatewaysClient) BeginGetP2SVPNConnectionHealth(ctx context.C } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -512,10 +527,13 @@ func (client *P2SVPNGatewaysClient) BeginGetP2SVPNConnectionHealthDetailed(ctx c } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -585,23 +603,16 @@ func (client *P2SVPNGatewaysClient) NewListPager(options *P2SVPNGatewaysClientLi }, Fetcher: func(ctx context.Context, page *P2SVPNGatewaysClientListResponse) (P2SVPNGatewaysClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "P2SVPNGatewaysClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return P2SVPNGatewaysClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return P2SVPNGatewaysClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return P2SVPNGatewaysClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -648,23 +659,16 @@ func (client *P2SVPNGatewaysClient) NewListByResourceGroupPager(resourceGroupNam }, Fetcher: func(ctx context.Context, page *P2SVPNGatewaysClientListByResourceGroupResponse) (P2SVPNGatewaysClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "P2SVPNGatewaysClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return P2SVPNGatewaysClientListByResourceGroupResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return P2SVPNGatewaysClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return P2SVPNGatewaysClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -718,10 +722,13 @@ func (client *P2SVPNGatewaysClient) BeginReset(ctx context.Context, resourceGrou } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[P2SVPNGatewaysClientResetResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[P2SVPNGatewaysClientResetResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[P2SVPNGatewaysClientResetResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -793,10 +800,13 @@ func (client *P2SVPNGatewaysClient) BeginUpdateTags(ctx context.Context, resourc } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[P2SVPNGatewaysClientUpdateTagsResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[P2SVPNGatewaysClientUpdateTagsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[P2SVPNGatewaysClientUpdateTagsResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/packetcaptures_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/packetcaptures_client.go index 47ae77d8f..3b19453fb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/packetcaptures_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/packetcaptures_client.go @@ -33,7 +33,7 @@ type PacketCapturesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPacketCapturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PacketCapturesClient, error) { - cl, err := arm.NewClient(moduleName+".PacketCapturesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *PacketCapturesClient) BeginCreate(ctx context.Context, resourceGro } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PacketCapturesClientCreateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PacketCapturesClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PacketCapturesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *PacketCapturesClient) BeginDelete(ctx context.Context, resourceGro } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PacketCapturesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PacketCapturesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PacketCapturesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -292,10 +298,13 @@ func (client *PacketCapturesClient) BeginGetStatus(ctx context.Context, resource } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PacketCapturesClientGetStatusResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PacketCapturesClientGetStatusResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PacketCapturesClientGetStatusResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -436,10 +445,13 @@ func (client *PacketCapturesClient) BeginStop(ctx context.Context, resourceGroup } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PacketCapturesClientStopResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PacketCapturesClientStopResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PacketCapturesClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/peerexpressroutecircuitconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/peerexpressroutecircuitconnections_client.go index 46011654c..d8a87d68c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/peerexpressroutecircuitconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/peerexpressroutecircuitconnections_client.go @@ -33,7 +33,7 @@ type PeerExpressRouteCircuitConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PeerExpressRouteCircuitConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".PeerExpressRouteCircuitConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -134,23 +134,16 @@ func (client *PeerExpressRouteCircuitConnectionsClient) NewListPager(resourceGro }, Fetcher: func(ctx context.Context, page *PeerExpressRouteCircuitConnectionsClientListResponse) (PeerExpressRouteCircuitConnectionsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PeerExpressRouteCircuitConnectionsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) + }, nil) if err != nil { return PeerExpressRouteCircuitConnectionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PeerExpressRouteCircuitConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PeerExpressRouteCircuitConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/privatednszonegroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/privatednszonegroups_client.go index 805199373..e4177612b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/privatednszonegroups_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/privatednszonegroups_client.go @@ -33,7 +33,7 @@ type PrivateDNSZoneGroupsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPrivateDNSZoneGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateDNSZoneGroupsClient, error) { - cl, err := arm.NewClient(moduleName+".PrivateDNSZoneGroupsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *PrivateDNSZoneGroupsClient) BeginCreateOrUpdate(ctx context.Contex } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateDNSZoneGroupsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateDNSZoneGroupsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateDNSZoneGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *PrivateDNSZoneGroupsClient) BeginDelete(ctx context.Context, resou } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateDNSZoneGroupsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateDNSZoneGroupsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateDNSZoneGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -290,23 +296,16 @@ func (client *PrivateDNSZoneGroupsClient) NewListPager(privateEndpointName strin }, Fetcher: func(ctx context.Context, page *PrivateDNSZoneGroupsClientListResponse) (PrivateDNSZoneGroupsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateDNSZoneGroupsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, privateEndpointName, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateDNSZoneGroupsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, privateEndpointName, resourceGroupName, options) + }, nil) if err != nil { return PrivateDNSZoneGroupsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateDNSZoneGroupsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/privateendpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/privateendpoints_client.go index eb7069f9f..496153f08 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/privateendpoints_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/privateendpoints_client.go @@ -33,7 +33,7 @@ type PrivateEndpointsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPrivateEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointsClient, error) { - cl, err := arm.NewClient(moduleName+".PrivateEndpointsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *PrivateEndpointsClient) BeginCreateOrUpdate(ctx context.Context, r } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *PrivateEndpointsClient) BeginDelete(ctx context.Context, resourceG } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -276,23 +282,16 @@ func (client *PrivateEndpointsClient) NewListPager(resourceGroupName string, opt }, Fetcher: func(ctx context.Context, page *PrivateEndpointsClientListResponse) (PrivateEndpointsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateEndpointsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return PrivateEndpointsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -342,23 +341,16 @@ func (client *PrivateEndpointsClient) NewListBySubscriptionPager(options *Privat }, Fetcher: func(ctx context.Context, page *PrivateEndpointsClientListBySubscriptionResponse) (PrivateEndpointsClientListBySubscriptionResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointsClient.NewListBySubscriptionPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) if err != nil { return PrivateEndpointsClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PrivateEndpointsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/privatelinkservices_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/privatelinkservices_client.go index b5b475387..703fda2d2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/privatelinkservices_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/privatelinkservices_client.go @@ -33,7 +33,7 @@ type PrivateLinkServicesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPrivateLinkServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkServicesClient, error) { - cl, err := arm.NewClient(moduleName+".PrivateLinkServicesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,10 +60,13 @@ func (client *PrivateLinkServicesClient) BeginCheckPrivateLinkServiceVisibility( } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -135,10 +138,13 @@ func (client *PrivateLinkServicesClient) BeginCheckPrivateLinkServiceVisibilityB } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -214,10 +220,13 @@ func (client *PrivateLinkServicesClient) BeginCreateOrUpdate(ctx context.Context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateLinkServicesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateLinkServicesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateLinkServicesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -291,10 +300,13 @@ func (client *PrivateLinkServicesClient) BeginDelete(ctx context.Context, resour } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateLinkServicesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateLinkServicesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateLinkServicesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -366,10 +378,13 @@ func (client *PrivateLinkServicesClient) BeginDeletePrivateEndpointConnection(ct } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -582,23 +597,16 @@ func (client *PrivateLinkServicesClient) NewListPager(resourceGroupName string, }, Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListResponse) (PrivateLinkServicesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkServicesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return PrivateLinkServicesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PrivateLinkServicesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkServicesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -650,23 +658,16 @@ func (client *PrivateLinkServicesClient) NewListAutoApprovedPrivateLinkServicesP }, Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse) (PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAutoApprovedPrivateLinkServicesCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAutoApprovedPrivateLinkServicesCreateRequest(ctx, location, options) + }, nil) if err != nil { return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse{}, runtime.NewResponseError(resp) - } return client.listAutoApprovedPrivateLinkServicesHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -719,23 +720,16 @@ func (client *PrivateLinkServicesClient) NewListAutoApprovedPrivateLinkServicesB }, Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse) (PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAutoApprovedPrivateLinkServicesByResourceGroupCreateRequest(ctx, location, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAutoApprovedPrivateLinkServicesByResourceGroupCreateRequest(ctx, location, resourceGroupName, options) + }, nil) if err != nil { return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listAutoApprovedPrivateLinkServicesByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -789,23 +783,16 @@ func (client *PrivateLinkServicesClient) NewListBySubscriptionPager(options *Pri }, Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListBySubscriptionResponse) (PrivateLinkServicesClientListBySubscriptionResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkServicesClient.NewListBySubscriptionPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateLinkServicesClientListBySubscriptionResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) if err != nil { return PrivateLinkServicesClientListBySubscriptionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkServicesClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -853,23 +840,16 @@ func (client *PrivateLinkServicesClient) NewListPrivateEndpointConnectionsPager( }, Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListPrivateEndpointConnectionsResponse) (PrivateLinkServicesClientListPrivateEndpointConnectionsResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkServicesClient.NewListPrivateEndpointConnectionsPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listPrivateEndpointConnectionsCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateLinkServicesClientListPrivateEndpointConnectionsResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listPrivateEndpointConnectionsCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return PrivateLinkServicesClientListPrivateEndpointConnectionsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkServicesClientListPrivateEndpointConnectionsResponse{}, runtime.NewResponseError(resp) - } return client.listPrivateEndpointConnectionsHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/profiles_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/profiles_client.go index 495827271..729f1c036 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/profiles_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/profiles_client.go @@ -33,7 +33,7 @@ type ProfilesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProfilesClient, error) { - cl, err := arm.NewClient(moduleName+".ProfilesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -127,10 +127,13 @@ func (client *ProfilesClient) BeginDelete(ctx context.Context, resourceGroupName } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ProfilesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ProfilesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ProfilesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -264,23 +267,16 @@ func (client *ProfilesClient) NewListPager(resourceGroupName string, options *Pr }, Fetcher: func(ctx context.Context, page *ProfilesClientListResponse) (ProfilesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProfilesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return ProfilesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ProfilesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProfilesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -329,23 +325,16 @@ func (client *ProfilesClient) NewListAllPager(options *ProfilesClientListAllOpti }, Fetcher: func(ctx context.Context, page *ProfilesClientListAllResponse) (ProfilesClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProfilesClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return ProfilesClientListAllResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ProfilesClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProfilesClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/publicipaddresses_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/publicipaddresses_client.go index eb86425b1..62d60e062 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/publicipaddresses_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/publicipaddresses_client.go @@ -33,7 +33,7 @@ type PublicIPAddressesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPublicIPAddressesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PublicIPAddressesClient, error) { - cl, err := arm.NewClient(moduleName+".PublicIPAddressesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *PublicIPAddressesClient) BeginCreateOrUpdate(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PublicIPAddressesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PublicIPAddressesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PublicIPAddressesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *PublicIPAddressesClient) BeginDdosProtectionStatus(ctx context.Con } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PublicIPAddressesClientDdosProtectionStatusResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PublicIPAddressesClientDdosProtectionStatusResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PublicIPAddressesClientDdosProtectionStatusResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -212,10 +218,13 @@ func (client *PublicIPAddressesClient) BeginDelete(ctx context.Context, resource } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PublicIPAddressesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PublicIPAddressesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PublicIPAddressesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -526,23 +535,16 @@ func (client *PublicIPAddressesClient) NewListPager(resourceGroupName string, op }, Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListResponse) (PublicIPAddressesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PublicIPAddressesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return PublicIPAddressesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PublicIPAddressesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPAddressesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -592,23 +594,16 @@ func (client *PublicIPAddressesClient) NewListAllPager(options *PublicIPAddresse }, Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListAllResponse) (PublicIPAddressesClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PublicIPAddressesClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return PublicIPAddressesClientListAllResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PublicIPAddressesClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPAddressesClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -656,23 +651,16 @@ func (client *PublicIPAddressesClient) NewListCloudServicePublicIPAddressesPager }, Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListCloudServicePublicIPAddressesResponse) (PublicIPAddressesClientListCloudServicePublicIPAddressesResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PublicIPAddressesClient.NewListCloudServicePublicIPAddressesPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCloudServicePublicIPAddressesCreateRequest(ctx, resourceGroupName, cloudServiceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCloudServicePublicIPAddressesCreateRequest(ctx, resourceGroupName, cloudServiceName, options) + }, nil) if err != nil { return PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{}, runtime.NewResponseError(resp) - } return client.listCloudServicePublicIPAddressesHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -732,23 +720,16 @@ func (client *PublicIPAddressesClient) NewListCloudServiceRoleInstancePublicIPAd }, Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse) (PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PublicIPAddressesClient.NewListCloudServiceRoleInstancePublicIPAddressesPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCloudServiceRoleInstancePublicIPAddressesCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, networkInterfaceName, ipConfigurationName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCloudServiceRoleInstancePublicIPAddressesCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, networkInterfaceName, ipConfigurationName, options) + }, nil) if err != nil { return PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{}, runtime.NewResponseError(resp) - } return client.listCloudServiceRoleInstancePublicIPAddressesHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -817,23 +798,16 @@ func (client *PublicIPAddressesClient) NewListVirtualMachineScaleSetPublicIPAddr }, Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse) (PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PublicIPAddressesClient.NewListVirtualMachineScaleSetPublicIPAddressesPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listVirtualMachineScaleSetPublicIPAddressesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listVirtualMachineScaleSetPublicIPAddressesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, options) + }, nil) if err != nil { return PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse{}, runtime.NewResponseError(resp) - } return client.listVirtualMachineScaleSetPublicIPAddressesHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -893,23 +867,16 @@ func (client *PublicIPAddressesClient) NewListVirtualMachineScaleSetVMPublicIPAd }, Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse) (PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PublicIPAddressesClient.NewListVirtualMachineScaleSetVMPublicIPAddressesPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listVirtualMachineScaleSetVMPublicIPAddressesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listVirtualMachineScaleSetVMPublicIPAddressesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, options) + }, nil) if err != nil { return PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse{}, runtime.NewResponseError(resp) - } return client.listVirtualMachineScaleSetVMPublicIPAddressesHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/publicipprefixes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/publicipprefixes_client.go index a6c6d3a57..992e20200 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/publicipprefixes_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/publicipprefixes_client.go @@ -33,7 +33,7 @@ type PublicIPPrefixesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPublicIPPrefixesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PublicIPPrefixesClient, error) { - cl, err := arm.NewClient(moduleName+".PublicIPPrefixesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *PublicIPPrefixesClient) BeginCreateOrUpdate(ctx context.Context, r } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PublicIPPrefixesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PublicIPPrefixesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PublicIPPrefixesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *PublicIPPrefixesClient) BeginDelete(ctx context.Context, resourceG } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PublicIPPrefixesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[PublicIPPrefixesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PublicIPPrefixesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -276,23 +282,16 @@ func (client *PublicIPPrefixesClient) NewListPager(resourceGroupName string, opt }, Fetcher: func(ctx context.Context, page *PublicIPPrefixesClientListResponse) (PublicIPPrefixesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PublicIPPrefixesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PublicIPPrefixesClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return PublicIPPrefixesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPPrefixesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -342,23 +341,16 @@ func (client *PublicIPPrefixesClient) NewListAllPager(options *PublicIPPrefixesC }, Fetcher: func(ctx context.Context, page *PublicIPPrefixesClientListAllResponse) (PublicIPPrefixesClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PublicIPPrefixesClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return PublicIPPrefixesClientListAllResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PublicIPPrefixesClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPPrefixesClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/resourcenavigationlinks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/resourcenavigationlinks_client.go index 00edc4378..9968fd01f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/resourcenavigationlinks_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/resourcenavigationlinks_client.go @@ -33,7 +33,7 @@ type ResourceNavigationLinksClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewResourceNavigationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceNavigationLinksClient, error) { - cl, err := arm.NewClient(moduleName+".ResourceNavigationLinksClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routefilterrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routefilterrules_client.go index b5b5b7608..641b9f566 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routefilterrules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routefilterrules_client.go @@ -33,7 +33,7 @@ type RouteFilterRulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewRouteFilterRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteFilterRulesClient, error) { - cl, err := arm.NewClient(moduleName+".RouteFilterRulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *RouteFilterRulesClient) BeginCreateOrUpdate(ctx context.Context, r } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RouteFilterRulesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[RouteFilterRulesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RouteFilterRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *RouteFilterRulesClient) BeginDelete(ctx context.Context, resourceG } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RouteFilterRulesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[RouteFilterRulesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RouteFilterRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -289,23 +295,16 @@ func (client *RouteFilterRulesClient) NewListByRouteFilterPager(resourceGroupNam }, Fetcher: func(ctx context.Context, page *RouteFilterRulesClientListByRouteFilterResponse) (RouteFilterRulesClientListByRouteFilterResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RouteFilterRulesClient.NewListByRouteFilterPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByRouteFilterCreateRequest(ctx, resourceGroupName, routeFilterName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RouteFilterRulesClientListByRouteFilterResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByRouteFilterCreateRequest(ctx, resourceGroupName, routeFilterName, options) + }, nil) if err != nil { return RouteFilterRulesClientListByRouteFilterResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RouteFilterRulesClientListByRouteFilterResponse{}, runtime.NewResponseError(resp) - } return client.listByRouteFilterHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routefilters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routefilters_client.go index 532691df4..58b6b7c29 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routefilters_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routefilters_client.go @@ -33,7 +33,7 @@ type RouteFiltersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewRouteFiltersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteFiltersClient, error) { - cl, err := arm.NewClient(moduleName+".RouteFiltersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *RouteFiltersClient) BeginCreateOrUpdate(ctx context.Context, resou } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RouteFiltersClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[RouteFiltersClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RouteFiltersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *RouteFiltersClient) BeginDelete(ctx context.Context, resourceGroup } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RouteFiltersClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[RouteFiltersClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RouteFiltersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -274,23 +280,16 @@ func (client *RouteFiltersClient) NewListPager(options *RouteFiltersClientListOp }, Fetcher: func(ctx context.Context, page *RouteFiltersClientListResponse) (RouteFiltersClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RouteFiltersClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RouteFiltersClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return RouteFiltersClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RouteFiltersClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -337,23 +336,16 @@ func (client *RouteFiltersClient) NewListByResourceGroupPager(resourceGroupName }, Fetcher: func(ctx context.Context, page *RouteFiltersClientListByResourceGroupResponse) (RouteFiltersClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RouteFiltersClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return RouteFiltersClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return RouteFiltersClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RouteFiltersClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routemaps_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routemaps_client.go index 7fa1ba018..9ccc8abcd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routemaps_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routemaps_client.go @@ -33,7 +33,7 @@ type RouteMapsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewRouteMapsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteMapsClient, error) { - cl, err := arm.NewClient(moduleName+".RouteMapsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *RouteMapsClient) BeginCreateOrUpdate(ctx context.Context, resource } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RouteMapsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[RouteMapsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RouteMapsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -143,10 +146,13 @@ func (client *RouteMapsClient) BeginDelete(ctx context.Context, resourceGroupNam } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RouteMapsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[RouteMapsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RouteMapsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -287,23 +293,16 @@ func (client *RouteMapsClient) NewListPager(resourceGroupName string, virtualHub }, Fetcher: func(ctx context.Context, page *RouteMapsClientListResponse) (RouteMapsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RouteMapsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RouteMapsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + }, nil) if err != nil { return RouteMapsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RouteMapsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routes_client.go index a2a02dd2c..1574341d5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routes_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routes_client.go @@ -33,7 +33,7 @@ type RoutesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewRoutesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoutesClient, error) { - cl, err := arm.NewClient(moduleName+".RoutesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *RoutesClient) BeginCreateOrUpdate(ctx context.Context, resourceGro } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RoutesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[RoutesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RoutesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -143,10 +146,13 @@ func (client *RoutesClient) BeginDelete(ctx context.Context, resourceGroupName s } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RoutesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[RoutesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RoutesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -287,23 +293,16 @@ func (client *RoutesClient) NewListPager(resourceGroupName string, routeTableNam }, Fetcher: func(ctx context.Context, page *RoutesClientListResponse) (RoutesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RoutesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, routeTableName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RoutesClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, routeTableName, options) + }, nil) if err != nil { return RoutesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RoutesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routetables_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routetables_client.go index 2ca79638b..c3da88450 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routetables_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routetables_client.go @@ -33,7 +33,7 @@ type RouteTablesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewRouteTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteTablesClient, error) { - cl, err := arm.NewClient(moduleName+".RouteTablesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *RouteTablesClient) BeginCreateOrUpdate(ctx context.Context, resour } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RouteTablesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[RouteTablesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RouteTablesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -137,10 +140,13 @@ func (client *RouteTablesClient) BeginDelete(ctx context.Context, resourceGroupN } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RouteTablesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[RouteTablesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RouteTablesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -274,23 +280,16 @@ func (client *RouteTablesClient) NewListPager(resourceGroupName string, options }, Fetcher: func(ctx context.Context, page *RouteTablesClientListResponse) (RouteTablesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RouteTablesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RouteTablesClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return RouteTablesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RouteTablesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -339,23 +338,16 @@ func (client *RouteTablesClient) NewListAllPager(options *RouteTablesClientListA }, Fetcher: func(ctx context.Context, page *RouteTablesClientListAllResponse) (RouteTablesClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RouteTablesClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return RouteTablesClientListAllResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return RouteTablesClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RouteTablesClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routingintent_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routingintent_client.go index bb5a955b2..14c690fe7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routingintent_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/routingintent_client.go @@ -33,7 +33,7 @@ type RoutingIntentClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewRoutingIntentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoutingIntentClient, error) { - cl, err := arm.NewClient(moduleName+".RoutingIntentClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *RoutingIntentClient) BeginCreateOrUpdate(ctx context.Context, reso } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RoutingIntentClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[RoutingIntentClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RoutingIntentClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *RoutingIntentClient) BeginDelete(ctx context.Context, resourceGrou } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RoutingIntentClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[RoutingIntentClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RoutingIntentClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -288,23 +294,16 @@ func (client *RoutingIntentClient) NewListPager(resourceGroupName string, virtua }, Fetcher: func(ctx context.Context, page *RoutingIntentClientListResponse) (RoutingIntentClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RoutingIntentClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RoutingIntentClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + }, nil) if err != nil { return RoutingIntentClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RoutingIntentClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/scopeconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/scopeconnections_client.go index 08b36878d..eed7c65cc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/scopeconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/scopeconnections_client.go @@ -34,7 +34,7 @@ type ScopeConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewScopeConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScopeConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".ScopeConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -261,23 +261,16 @@ func (client *ScopeConnectionsClient) NewListPager(resourceGroupName string, net }, Fetcher: func(ctx context.Context, page *ScopeConnectionsClientListResponse) (ScopeConnectionsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ScopeConnectionsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) + }, nil) if err != nil { return ScopeConnectionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ScopeConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScopeConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/securityadminconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/securityadminconfigurations_client.go index cfeb6b8f4..65a685236 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/securityadminconfigurations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/securityadminconfigurations_client.go @@ -34,7 +34,7 @@ type SecurityAdminConfigurationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSecurityAdminConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityAdminConfigurationsClient, error) { - cl, err := arm.NewClient(moduleName+".SecurityAdminConfigurationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -136,10 +136,13 @@ func (client *SecurityAdminConfigurationsClient) BeginDelete(ctx context.Context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityAdminConfigurationsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[SecurityAdminConfigurationsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityAdminConfigurationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -285,23 +288,16 @@ func (client *SecurityAdminConfigurationsClient) NewListPager(resourceGroupName }, Fetcher: func(ctx context.Context, page *SecurityAdminConfigurationsClientListResponse) (SecurityAdminConfigurationsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecurityAdminConfigurationsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) + }, nil) if err != nil { return SecurityAdminConfigurationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SecurityAdminConfigurationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityAdminConfigurationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/securitygroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/securitygroups_client.go index b21dfe117..4465ab507 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/securitygroups_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/securitygroups_client.go @@ -33,7 +33,7 @@ type SecurityGroupsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSecurityGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityGroupsClient, error) { - cl, err := arm.NewClient(moduleName+".SecurityGroupsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *SecurityGroupsClient) BeginCreateOrUpdate(ctx context.Context, res } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityGroupsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[SecurityGroupsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *SecurityGroupsClient) BeginDelete(ctx context.Context, resourceGro } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityGroupsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[SecurityGroupsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -275,23 +281,16 @@ func (client *SecurityGroupsClient) NewListPager(resourceGroupName string, optio }, Fetcher: func(ctx context.Context, page *SecurityGroupsClientListResponse) (SecurityGroupsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecurityGroupsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SecurityGroupsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return SecurityGroupsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityGroupsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -341,23 +340,16 @@ func (client *SecurityGroupsClient) NewListAllPager(options *SecurityGroupsClien }, Fetcher: func(ctx context.Context, page *SecurityGroupsClientListAllResponse) (SecurityGroupsClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecurityGroupsClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return SecurityGroupsClientListAllResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SecurityGroupsClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityGroupsClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/securitypartnerproviders_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/securitypartnerproviders_client.go index 4ba6f6f76..08f18ad20 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/securitypartnerproviders_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/securitypartnerproviders_client.go @@ -33,7 +33,7 @@ type SecurityPartnerProvidersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSecurityPartnerProvidersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityPartnerProvidersClient, error) { - cl, err := arm.NewClient(moduleName+".SecurityPartnerProvidersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *SecurityPartnerProvidersClient) BeginCreateOrUpdate(ctx context.Co } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityPartnerProvidersClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[SecurityPartnerProvidersClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityPartnerProvidersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *SecurityPartnerProvidersClient) BeginDelete(ctx context.Context, r } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityPartnerProvidersClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[SecurityPartnerProvidersClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityPartnerProvidersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -273,23 +279,16 @@ func (client *SecurityPartnerProvidersClient) NewListPager(options *SecurityPart }, Fetcher: func(ctx context.Context, page *SecurityPartnerProvidersClientListResponse) (SecurityPartnerProvidersClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecurityPartnerProvidersClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SecurityPartnerProvidersClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return SecurityPartnerProvidersClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityPartnerProvidersClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -336,23 +335,16 @@ func (client *SecurityPartnerProvidersClient) NewListByResourceGroupPager(resour }, Fetcher: func(ctx context.Context, page *SecurityPartnerProvidersClientListByResourceGroupResponse) (SecurityPartnerProvidersClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecurityPartnerProvidersClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return SecurityPartnerProvidersClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SecurityPartnerProvidersClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityPartnerProvidersClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/securityrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/securityrules_client.go index 6d2104378..bf51f10ba 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/securityrules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/securityrules_client.go @@ -33,7 +33,7 @@ type SecurityRulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSecurityRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityRulesClient, error) { - cl, err := arm.NewClient(moduleName+".SecurityRulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *SecurityRulesClient) BeginCreateOrUpdate(ctx context.Context, reso } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityRulesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[SecurityRulesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *SecurityRulesClient) BeginDelete(ctx context.Context, resourceGrou } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityRulesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[SecurityRulesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -288,23 +294,16 @@ func (client *SecurityRulesClient) NewListPager(resourceGroupName string, networ }, Fetcher: func(ctx context.Context, page *SecurityRulesClientListResponse) (SecurityRulesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecurityRulesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SecurityRulesClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) + }, nil) if err != nil { return SecurityRulesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityRulesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/serviceassociationlinks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/serviceassociationlinks_client.go index 26ccb329a..da40a3502 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/serviceassociationlinks_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/serviceassociationlinks_client.go @@ -33,7 +33,7 @@ type ServiceAssociationLinksClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewServiceAssociationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceAssociationLinksClient, error) { - cl, err := arm.NewClient(moduleName+".ServiceAssociationLinksClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/serviceendpointpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/serviceendpointpolicies_client.go index bbdb8fd00..8609cd22a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/serviceendpointpolicies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/serviceendpointpolicies_client.go @@ -33,7 +33,7 @@ type ServiceEndpointPoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewServiceEndpointPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceEndpointPoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".ServiceEndpointPoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *ServiceEndpointPoliciesClient) BeginCreateOrUpdate(ctx context.Con } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceEndpointPoliciesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ServiceEndpointPoliciesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceEndpointPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *ServiceEndpointPoliciesClient) BeginDelete(ctx context.Context, re } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceEndpointPoliciesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ServiceEndpointPoliciesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceEndpointPoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -276,23 +282,16 @@ func (client *ServiceEndpointPoliciesClient) NewListPager(options *ServiceEndpoi }, Fetcher: func(ctx context.Context, page *ServiceEndpointPoliciesClientListResponse) (ServiceEndpointPoliciesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServiceEndpointPoliciesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ServiceEndpointPoliciesClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return ServiceEndpointPoliciesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceEndpointPoliciesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -339,23 +338,16 @@ func (client *ServiceEndpointPoliciesClient) NewListByResourceGroupPager(resourc }, Fetcher: func(ctx context.Context, page *ServiceEndpointPoliciesClientListByResourceGroupResponse) (ServiceEndpointPoliciesClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServiceEndpointPoliciesClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return ServiceEndpointPoliciesClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ServiceEndpointPoliciesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceEndpointPoliciesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/serviceendpointpolicydefinitions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/serviceendpointpolicydefinitions_client.go index 8ffb9b689..ac6597319 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/serviceendpointpolicydefinitions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/serviceendpointpolicydefinitions_client.go @@ -33,7 +33,7 @@ type ServiceEndpointPolicyDefinitionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceEndpointPolicyDefinitionsClient, error) { - cl, err := arm.NewClient(moduleName+".ServiceEndpointPolicyDefinitionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *ServiceEndpointPolicyDefinitionsClient) BeginCreateOrUpdate(ctx co } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *ServiceEndpointPolicyDefinitionsClient) BeginDelete(ctx context.Co } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceEndpointPolicyDefinitionsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ServiceEndpointPolicyDefinitionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceEndpointPolicyDefinitionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -290,23 +296,16 @@ func (client *ServiceEndpointPolicyDefinitionsClient) NewListByResourceGroupPage }, Fetcher: func(ctx context.Context, page *ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse) (ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServiceEndpointPolicyDefinitionsClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, options) + }, nil) if err != nil { return ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/servicetaginformation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/servicetaginformation_client.go index 25b3bd961..49d03beab 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/servicetaginformation_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/servicetaginformation_client.go @@ -34,7 +34,7 @@ type ServiceTagInformationClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewServiceTagInformationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceTagInformationClient, error) { - cl, err := arm.NewClient(moduleName+".ServiceTagInformationClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,23 +60,16 @@ func (client *ServiceTagInformationClient) NewListPager(location string, options }, Fetcher: func(ctx context.Context, page *ServiceTagInformationClientListResponse) (ServiceTagInformationClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServiceTagInformationClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) if err != nil { return ServiceTagInformationClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ServiceTagInformationClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceTagInformationClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/servicetags_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/servicetags_client.go index 80cd4b296..f0ecb696d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/servicetags_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/servicetags_client.go @@ -33,7 +33,7 @@ type ServiceTagsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewServiceTagsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceTagsClient, error) { - cl, err := arm.NewClient(moduleName+".ServiceTagsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/staticmembers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/staticmembers_client.go index 0d3c1e0e9..6e5e7ed02 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/staticmembers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/staticmembers_client.go @@ -34,7 +34,7 @@ type StaticMembersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewStaticMembersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StaticMembersClient, error) { - cl, err := arm.NewClient(moduleName+".StaticMembersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -276,23 +276,16 @@ func (client *StaticMembersClient) NewListPager(resourceGroupName string, networ }, Fetcher: func(ctx context.Context, page *StaticMembersClientListResponse) (StaticMembersClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticMembersClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, options) + }, nil) if err != nil { return StaticMembersClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return StaticMembersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticMembersClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/subnets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/subnets_client.go index 45b759808..6a73e8b6f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/subnets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/subnets_client.go @@ -33,7 +33,7 @@ type SubnetsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSubnetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubnetsClient, error) { - cl, err := arm.NewClient(moduleName+".SubnetsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *SubnetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGr } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SubnetsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[SubnetsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SubnetsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -143,10 +146,13 @@ func (client *SubnetsClient) BeginDelete(ctx context.Context, resourceGroupName } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SubnetsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[SubnetsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SubnetsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -290,23 +296,16 @@ func (client *SubnetsClient) NewListPager(resourceGroupName string, virtualNetwo }, Fetcher: func(ctx context.Context, page *SubnetsClientListResponse) (SubnetsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SubnetsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SubnetsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) + }, nil) if err != nil { return SubnetsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SubnetsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -366,10 +365,13 @@ func (client *SubnetsClient) BeginPrepareNetworkPolicies(ctx context.Context, re } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SubnetsClientPrepareNetworkPoliciesResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[SubnetsClientPrepareNetworkPoliciesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SubnetsClientPrepareNetworkPoliciesResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -449,10 +451,13 @@ func (client *SubnetsClient) BeginUnprepareNetworkPolicies(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SubnetsClientUnprepareNetworkPoliciesResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[SubnetsClientUnprepareNetworkPoliciesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SubnetsClientUnprepareNetworkPoliciesResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/subscriptionnetworkmanagerconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/subscriptionnetworkmanagerconnections_client.go index fcbd03eb5..0c5b7d5a6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/subscriptionnetworkmanagerconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/subscriptionnetworkmanagerconnections_client.go @@ -34,7 +34,7 @@ type SubscriptionNetworkManagerConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSubscriptionNetworkManagerConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubscriptionNetworkManagerConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".SubscriptionNetworkManagerConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -231,23 +231,16 @@ func (client *SubscriptionNetworkManagerConnectionsClient) NewListPager(options }, Fetcher: func(ctx context.Context, page *SubscriptionNetworkManagerConnectionsClientListResponse) (SubscriptionNetworkManagerConnectionsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SubscriptionNetworkManagerConnectionsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return SubscriptionNetworkManagerConnectionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SubscriptionNetworkManagerConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SubscriptionNetworkManagerConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/time_rfc3339.go index 851a2002c..ffdedf87e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/time_rfc3339.go @@ -18,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -70,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/usages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/usages_client.go index 8cc911b58..ebacd3e6a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/usages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/usages_client.go @@ -33,7 +33,7 @@ type UsagesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsagesClient, error) { - cl, err := arm.NewClient(moduleName+".UsagesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -56,23 +56,16 @@ func (client *UsagesClient) NewListPager(location string, options *UsagesClientL }, Fetcher: func(ctx context.Context, page *UsagesClientListResponse) (UsagesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "UsagesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) if err != nil { return UsagesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return UsagesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UsagesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vipswap_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vipswap_client.go index 44568f10f..ac92776c0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vipswap_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vipswap_client.go @@ -33,7 +33,7 @@ type VipSwapClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVipSwapClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VipSwapClient, error) { - cl, err := arm.NewClient(moduleName+".VipSwapClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,10 +58,14 @@ func (client *VipSwapClient) BeginCreate(ctx context.Context, groupName string, if err != nil { return nil, err } - poller, err := runtime.NewPoller[VipSwapClientCreateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VipSwapClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VipSwapClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VipSwapClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualapplianceconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualapplianceconnections_client.go index 5e93c55c4..9ecd1b48c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualapplianceconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualapplianceconnections_client.go @@ -33,7 +33,7 @@ type VirtualApplianceConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualApplianceConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualApplianceConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualApplianceConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -63,10 +63,13 @@ func (client *VirtualApplianceConnectionsClient) BeginCreateOrUpdate(ctx context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualApplianceConnectionsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualApplianceConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualApplianceConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -145,10 +148,13 @@ func (client *VirtualApplianceConnectionsClient) BeginDelete(ctx context.Context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualApplianceConnectionsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualApplianceConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualApplianceConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -291,23 +297,16 @@ func (client *VirtualApplianceConnectionsClient) NewListPager(resourceGroupName }, Fetcher: func(ctx context.Context, page *VirtualApplianceConnectionsClientListResponse) (VirtualApplianceConnectionsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualApplianceConnectionsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualApplianceConnectionsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, options) + }, nil) if err != nil { return VirtualApplianceConnectionsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualApplianceConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualappliances_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualappliances_client.go index 1b9d06652..01fa3cfef 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualappliances_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualappliances_client.go @@ -33,7 +33,7 @@ type VirtualAppliancesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualAppliancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualAppliancesClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualAppliancesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *VirtualAppliancesClient) BeginCreateOrUpdate(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualAppliancesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualAppliancesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualAppliancesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *VirtualAppliancesClient) BeginDelete(ctx context.Context, resource } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualAppliancesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualAppliancesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualAppliancesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -275,23 +281,16 @@ func (client *VirtualAppliancesClient) NewListPager(options *VirtualAppliancesCl }, Fetcher: func(ctx context.Context, page *VirtualAppliancesClientListResponse) (VirtualAppliancesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualAppliancesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualAppliancesClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return VirtualAppliancesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualAppliancesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -338,23 +337,16 @@ func (client *VirtualAppliancesClient) NewListByResourceGroupPager(resourceGroup }, Fetcher: func(ctx context.Context, page *VirtualAppliancesClientListByResourceGroupResponse) (VirtualAppliancesClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualAppliancesClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return VirtualAppliancesClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VirtualAppliancesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualAppliancesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualappliancesites_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualappliancesites_client.go index 8e6b80c38..af8f589f8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualappliancesites_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualappliancesites_client.go @@ -33,7 +33,7 @@ type VirtualApplianceSitesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualApplianceSitesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualApplianceSitesClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualApplianceSitesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *VirtualApplianceSitesClient) BeginCreateOrUpdate(ctx context.Conte } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualApplianceSitesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualApplianceSitesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualApplianceSitesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *VirtualApplianceSitesClient) BeginDelete(ctx context.Context, reso } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualApplianceSitesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualApplianceSitesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualApplianceSitesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -290,23 +296,16 @@ func (client *VirtualApplianceSitesClient) NewListPager(resourceGroupName string }, Fetcher: func(ctx context.Context, page *VirtualApplianceSitesClientListResponse) (VirtualApplianceSitesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualApplianceSitesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualApplianceSitesClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, options) + }, nil) if err != nil { return VirtualApplianceSitesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualApplianceSitesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualapplianceskus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualapplianceskus_client.go index 331ee0f93..2247d3c9c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualapplianceskus_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualapplianceskus_client.go @@ -33,7 +33,7 @@ type VirtualApplianceSKUsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualApplianceSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualApplianceSKUsClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualApplianceSKUsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -116,23 +116,16 @@ func (client *VirtualApplianceSKUsClient) NewListPager(options *VirtualAppliance }, Fetcher: func(ctx context.Context, page *VirtualApplianceSKUsClientListResponse) (VirtualApplianceSKUsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualApplianceSKUsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return VirtualApplianceSKUsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VirtualApplianceSKUsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualApplianceSKUsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubbgpconnection_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubbgpconnection_client.go index 0e94c90eb..1334b44f4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubbgpconnection_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubbgpconnection_client.go @@ -33,7 +33,7 @@ type VirtualHubBgpConnectionClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualHubBgpConnectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubBgpConnectionClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualHubBgpConnectionClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *VirtualHubBgpConnectionClient) BeginCreateOrUpdate(ctx context.Con } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubBgpConnectionClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualHubBgpConnectionClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubBgpConnectionClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *VirtualHubBgpConnectionClient) BeginDelete(ctx context.Context, re } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubBgpConnectionClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualHubBgpConnectionClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubBgpConnectionClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubbgpconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubbgpconnections_client.go index f6f44da25..80b64897a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubbgpconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubbgpconnections_client.go @@ -33,7 +33,7 @@ type VirtualHubBgpConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualHubBgpConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubBgpConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualHubBgpConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -58,23 +58,16 @@ func (client *VirtualHubBgpConnectionsClient) NewListPager(resourceGroupName str }, Fetcher: func(ctx context.Context, page *VirtualHubBgpConnectionsClientListResponse) (VirtualHubBgpConnectionsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualHubBgpConnectionsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + }, nil) if err != nil { return VirtualHubBgpConnectionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VirtualHubBgpConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualHubBgpConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -133,10 +126,13 @@ func (client *VirtualHubBgpConnectionsClient) BeginListAdvertisedRoutes(ctx cont } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -212,10 +208,13 @@ func (client *VirtualHubBgpConnectionsClient) BeginListLearnedRoutes(ctx context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubBgpConnectionsClientListLearnedRoutesResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualHubBgpConnectionsClientListLearnedRoutesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubBgpConnectionsClientListLearnedRoutesResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubipconfiguration_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubipconfiguration_client.go index 9a709a4c6..2bd36082f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubipconfiguration_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubipconfiguration_client.go @@ -33,7 +33,7 @@ type VirtualHubIPConfigurationClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualHubIPConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubIPConfigurationClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualHubIPConfigurationClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *VirtualHubIPConfigurationClient) BeginCreateOrUpdate(ctx context.C } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubIPConfigurationClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualHubIPConfigurationClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubIPConfigurationClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *VirtualHubIPConfigurationClient) BeginDelete(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubIPConfigurationClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualHubIPConfigurationClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubIPConfigurationClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -290,23 +296,16 @@ func (client *VirtualHubIPConfigurationClient) NewListPager(resourceGroupName st }, Fetcher: func(ctx context.Context, page *VirtualHubIPConfigurationClientListResponse) (VirtualHubIPConfigurationClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualHubIPConfigurationClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualHubIPConfigurationClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + }, nil) if err != nil { return VirtualHubIPConfigurationClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualHubIPConfigurationClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubroutetablev2s_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubroutetablev2s_client.go index aca6697ee..421996273 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubroutetablev2s_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubroutetablev2s_client.go @@ -33,7 +33,7 @@ type VirtualHubRouteTableV2SClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualHubRouteTableV2SClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubRouteTableV2SClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualHubRouteTableV2SClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *VirtualHubRouteTableV2SClient) BeginCreateOrUpdate(ctx context.Con } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubRouteTableV2SClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualHubRouteTableV2SClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubRouteTableV2SClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *VirtualHubRouteTableV2SClient) BeginDelete(ctx context.Context, re } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubRouteTableV2SClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualHubRouteTableV2SClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubRouteTableV2SClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -290,23 +296,16 @@ func (client *VirtualHubRouteTableV2SClient) NewListPager(resourceGroupName stri }, Fetcher: func(ctx context.Context, page *VirtualHubRouteTableV2SClientListResponse) (VirtualHubRouteTableV2SClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualHubRouteTableV2SClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualHubRouteTableV2SClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + }, nil) if err != nil { return VirtualHubRouteTableV2SClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualHubRouteTableV2SClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubs_client.go index 998ce1981..3cb2a8d30 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubs_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualhubs_client.go @@ -33,7 +33,7 @@ type VirtualHubsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualHubsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubsClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualHubsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *VirtualHubsClient) BeginCreateOrUpdate(ctx context.Context, resour } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualHubsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -137,10 +140,13 @@ func (client *VirtualHubsClient) BeginDelete(ctx context.Context, resourceGroupN } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualHubsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -276,10 +282,13 @@ func (client *VirtualHubsClient) BeginGetEffectiveVirtualHubRoutes(ctx context.C } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubsClientGetEffectiveVirtualHubRoutesResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualHubsClientGetEffectiveVirtualHubRoutesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubsClientGetEffectiveVirtualHubRoutesResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -358,10 +367,13 @@ func (client *VirtualHubsClient) BeginGetInboundRoutes(ctx context.Context, reso } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubsClientGetInboundRoutesResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualHubsClientGetInboundRoutesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubsClientGetInboundRoutesResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -436,10 +448,13 @@ func (client *VirtualHubsClient) BeginGetOutboundRoutes(ctx context.Context, res } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubsClientGetOutboundRoutesResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualHubsClientGetOutboundRoutesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubsClientGetOutboundRoutesResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -508,23 +523,16 @@ func (client *VirtualHubsClient) NewListPager(options *VirtualHubsClientListOpti }, Fetcher: func(ctx context.Context, page *VirtualHubsClientListResponse) (VirtualHubsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualHubsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return VirtualHubsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VirtualHubsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualHubsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -571,23 +579,16 @@ func (client *VirtualHubsClient) NewListByResourceGroupPager(resourceGroupName s }, Fetcher: func(ctx context.Context, page *VirtualHubsClientListByResourceGroupResponse) (VirtualHubsClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualHubsClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualHubsClientListByResourceGroupResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return VirtualHubsClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualHubsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworkgatewayconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworkgatewayconnections_client.go index 672de07b5..f1bdd90b3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworkgatewayconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworkgatewayconnections_client.go @@ -33,7 +33,7 @@ type VirtualNetworkGatewayConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkGatewayConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualNetworkGatewayConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginCreateOrUpdate(ctx co } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginDelete(ctx context.Co } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -277,10 +283,13 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginGetIkeSas(ctx context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientGetIkeSasResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientGetIkeSasResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientGetIkeSasResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -415,23 +424,16 @@ func (client *VirtualNetworkGatewayConnectionsClient) NewListPager(resourceGroup }, Fetcher: func(ctx context.Context, page *VirtualNetworkGatewayConnectionsClientListResponse) (VirtualNetworkGatewayConnectionsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworkGatewayConnectionsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return VirtualNetworkGatewayConnectionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VirtualNetworkGatewayConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkGatewayConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -485,10 +487,13 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginResetConnection(ctx c } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientResetConnectionResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientResetConnectionResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientResetConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -563,10 +568,13 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginResetSharedKey(ctx co } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -646,10 +654,13 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginSetSharedKey(ctx cont } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -725,10 +736,13 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginStartPacketCapture(ct } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -806,10 +820,13 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginStopPacketCapture(ctx } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -884,10 +901,13 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginUpdateTags(ctx contex } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientUpdateTagsResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientUpdateTagsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientUpdateTagsResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworkgatewaynatrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworkgatewaynatrules_client.go index 8aece2534..28dd7a3b7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworkgatewaynatrules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworkgatewaynatrules_client.go @@ -33,7 +33,7 @@ type VirtualNetworkGatewayNatRulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualNetworkGatewayNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkGatewayNatRulesClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualNetworkGatewayNatRulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -63,10 +63,13 @@ func (client *VirtualNetworkGatewayNatRulesClient) BeginCreateOrUpdate(ctx conte } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -146,10 +149,13 @@ func (client *VirtualNetworkGatewayNatRulesClient) BeginDelete(ctx context.Conte } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayNatRulesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayNatRulesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayNatRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -292,23 +298,16 @@ func (client *VirtualNetworkGatewayNatRulesClient) NewListByVirtualNetworkGatewa }, Fetcher: func(ctx context.Context, page *VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse) (VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworkGatewayNatRulesClient.NewListByVirtualNetworkGatewayPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByVirtualNetworkGatewayCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByVirtualNetworkGatewayCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) + }, nil) if err != nil { return VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse{}, runtime.NewResponseError(resp) - } return client.listByVirtualNetworkGatewayHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworkgateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworkgateways_client.go index 6f8b4ffb2..e1bf690f8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworkgateways_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworkgateways_client.go @@ -33,7 +33,7 @@ type VirtualNetworkGatewaysClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualNetworkGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkGatewaysClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualNetworkGatewaysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *VirtualNetworkGatewaysClient) BeginCreateOrUpdate(ctx context.Cont } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *VirtualNetworkGatewaysClient) BeginDelete(ctx context.Context, res } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -214,10 +220,13 @@ func (client *VirtualNetworkGatewaysClient) BeginDisconnectVirtualNetworkGateway } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -294,10 +303,13 @@ func (client *VirtualNetworkGatewaysClient) BeginGenerateVPNProfile(ctx context. } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGenerateVPNProfileResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGenerateVPNProfileResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGenerateVPNProfileResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -374,10 +386,13 @@ func (client *VirtualNetworkGatewaysClient) BeginGeneratevpnclientpackage(ctx co } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -519,10 +534,13 @@ func (client *VirtualNetworkGatewaysClient) BeginGetAdvertisedRoutes(ctx context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -595,10 +613,13 @@ func (client *VirtualNetworkGatewaysClient) BeginGetBgpPeerStatus(ctx context.Co } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetBgpPeerStatusResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetBgpPeerStatusResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGetBgpPeerStatusResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -673,10 +694,13 @@ func (client *VirtualNetworkGatewaysClient) BeginGetLearnedRoutes(ctx context.Co } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetLearnedRoutesResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetLearnedRoutesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGetLearnedRoutesResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -749,10 +773,13 @@ func (client *VirtualNetworkGatewaysClient) BeginGetVPNProfilePackageURL(ctx con } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -825,10 +852,13 @@ func (client *VirtualNetworkGatewaysClient) BeginGetVpnclientConnectionHealth(ct } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -902,10 +932,13 @@ func (client *VirtualNetworkGatewaysClient) BeginGetVpnclientIPSecParameters(ctx } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -975,23 +1008,16 @@ func (client *VirtualNetworkGatewaysClient) NewListPager(resourceGroupName strin }, Fetcher: func(ctx context.Context, page *VirtualNetworkGatewaysClientListResponse) (VirtualNetworkGatewaysClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworkGatewaysClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return VirtualNetworkGatewaysClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VirtualNetworkGatewaysClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkGatewaysClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -1043,23 +1069,16 @@ func (client *VirtualNetworkGatewaysClient) NewListConnectionsPager(resourceGrou }, Fetcher: func(ctx context.Context, page *VirtualNetworkGatewaysClientListConnectionsResponse) (VirtualNetworkGatewaysClientListConnectionsResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworkGatewaysClient.NewListConnectionsPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listConnectionsCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualNetworkGatewaysClientListConnectionsResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listConnectionsCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) + }, nil) if err != nil { return VirtualNetworkGatewaysClientListConnectionsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkGatewaysClientListConnectionsResponse{}, runtime.NewResponseError(resp) - } return client.listConnectionsHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -1117,10 +1136,13 @@ func (client *VirtualNetworkGatewaysClient) BeginReset(ctx context.Context, reso } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientResetResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientResetResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientResetResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1195,10 +1217,13 @@ func (client *VirtualNetworkGatewaysClient) BeginResetVPNClientSharedKey(ctx con } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1272,10 +1297,13 @@ func (client *VirtualNetworkGatewaysClient) BeginSetVpnclientIPSecParameters(ctx } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1350,10 +1378,13 @@ func (client *VirtualNetworkGatewaysClient) BeginStartPacketCapture(ctx context. } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientStartPacketCaptureResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientStartPacketCaptureResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientStartPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1431,10 +1462,13 @@ func (client *VirtualNetworkGatewaysClient) BeginStopPacketCapture(ctx context.C } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientStopPacketCaptureResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientStopPacketCaptureResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientStopPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1574,10 +1608,13 @@ func (client *VirtualNetworkGatewaysClient) BeginUpdateTags(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientUpdateTagsResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientUpdateTagsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientUpdateTagsResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworkpeerings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworkpeerings_client.go index 7834e622b..eaa5d8314 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworkpeerings_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworkpeerings_client.go @@ -33,7 +33,7 @@ type VirtualNetworkPeeringsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualNetworkPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkPeeringsClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualNetworkPeeringsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *VirtualNetworkPeeringsClient) BeginCreateOrUpdate(ctx context.Cont } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkPeeringsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkPeeringsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkPeeringsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -147,10 +150,13 @@ func (client *VirtualNetworkPeeringsClient) BeginDelete(ctx context.Context, res } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkPeeringsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkPeeringsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkPeeringsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -293,23 +299,16 @@ func (client *VirtualNetworkPeeringsClient) NewListPager(resourceGroupName strin }, Fetcher: func(ctx context.Context, page *VirtualNetworkPeeringsClientListResponse) (VirtualNetworkPeeringsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworkPeeringsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualNetworkPeeringsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) + }, nil) if err != nil { return VirtualNetworkPeeringsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkPeeringsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworks_client.go index 6d2ad292c..6feedb751 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworks_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworks_client.go @@ -34,7 +34,7 @@ type VirtualNetworksClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworksClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualNetworksClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -129,10 +129,13 @@ func (client *VirtualNetworksClient) BeginCreateOrUpdate(ctx context.Context, re } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworksClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworksClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworksClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -206,10 +209,13 @@ func (client *VirtualNetworksClient) BeginDelete(ctx context.Context, resourceGr } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworksClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworksClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworksClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -344,23 +350,16 @@ func (client *VirtualNetworksClient) NewListPager(resourceGroupName string, opti }, Fetcher: func(ctx context.Context, page *VirtualNetworksClientListResponse) (VirtualNetworksClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworksClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualNetworksClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return VirtualNetworksClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworksClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -410,23 +409,16 @@ func (client *VirtualNetworksClient) NewListAllPager(options *VirtualNetworksCli }, Fetcher: func(ctx context.Context, page *VirtualNetworksClientListAllResponse) (VirtualNetworksClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworksClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualNetworksClientListAllResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return VirtualNetworksClientListAllResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworksClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -474,17 +466,12 @@ func (client *VirtualNetworksClient) BeginListDdosProtectionStatus(ctx context.C }, Fetcher: func(ctx context.Context, page *VirtualNetworksClientListDdosProtectionStatusResponse) (VirtualNetworksClientListDdosProtectionStatusResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworksClient.BeginListDdosProtectionStatus") - req, err := runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), *page.NextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listDdosProtectionStatusCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) + }, nil) if err != nil { return VirtualNetworksClientListDdosProtectionStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VirtualNetworksClientListDdosProtectionStatusResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworksClientListDdosProtectionStatusResponse{}, runtime.NewResponseError(resp) - } return client.listDdosProtectionStatusHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -497,11 +484,13 @@ func (client *VirtualNetworksClient) BeginListDdosProtectionStatus(ctx context.C poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[*runtime.Pager[VirtualNetworksClientListDdosProtectionStatusResponse]]{ FinalStateVia: runtime.FinalStateViaLocation, Response: &pager, + Tracer: client.internal.Tracer(), }) return poller, err } else { return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[*runtime.Pager[VirtualNetworksClientListDdosProtectionStatusResponse]]{ Response: &pager, + Tracer: client.internal.Tracer(), }) } } @@ -585,23 +574,16 @@ func (client *VirtualNetworksClient) NewListUsagePager(resourceGroupName string, }, Fetcher: func(ctx context.Context, page *VirtualNetworksClientListUsageResponse) (VirtualNetworksClientListUsageResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworksClient.NewListUsagePager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listUsageCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listUsageCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) + }, nil) if err != nil { return VirtualNetworksClientListUsageResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VirtualNetworksClientListUsageResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworksClientListUsageResponse{}, runtime.NewResponseError(resp) - } return client.listUsageHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworktaps_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworktaps_client.go index a03b2aa64..3ab3dd130 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworktaps_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualnetworktaps_client.go @@ -33,7 +33,7 @@ type VirtualNetworkTapsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualNetworkTapsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkTapsClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualNetworkTapsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *VirtualNetworkTapsClient) BeginCreateOrUpdate(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkTapsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkTapsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkTapsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *VirtualNetworkTapsClient) BeginDelete(ctx context.Context, resourc } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkTapsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkTapsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkTapsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -272,23 +278,16 @@ func (client *VirtualNetworkTapsClient) NewListAllPager(options *VirtualNetworkT }, Fetcher: func(ctx context.Context, page *VirtualNetworkTapsClientListAllResponse) (VirtualNetworkTapsClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworkTapsClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualNetworkTapsClientListAllResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return VirtualNetworkTapsClientListAllResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkTapsClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -335,23 +334,16 @@ func (client *VirtualNetworkTapsClient) NewListByResourceGroupPager(resourceGrou }, Fetcher: func(ctx context.Context, page *VirtualNetworkTapsClientListByResourceGroupResponse) (VirtualNetworkTapsClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworkTapsClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return VirtualNetworkTapsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VirtualNetworkTapsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkTapsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualrouterpeerings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualrouterpeerings_client.go index f65306bee..984e683b7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualrouterpeerings_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualrouterpeerings_client.go @@ -33,7 +33,7 @@ type VirtualRouterPeeringsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualRouterPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualRouterPeeringsClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualRouterPeeringsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *VirtualRouterPeeringsClient) BeginCreateOrUpdate(ctx context.Conte } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualRouterPeeringsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualRouterPeeringsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualRouterPeeringsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -144,10 +147,13 @@ func (client *VirtualRouterPeeringsClient) BeginDelete(ctx context.Context, reso } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualRouterPeeringsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualRouterPeeringsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualRouterPeeringsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -290,23 +296,16 @@ func (client *VirtualRouterPeeringsClient) NewListPager(resourceGroupName string }, Fetcher: func(ctx context.Context, page *VirtualRouterPeeringsClientListResponse) (VirtualRouterPeeringsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualRouterPeeringsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualRouterName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualRouterPeeringsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualRouterName, options) + }, nil) if err != nil { return VirtualRouterPeeringsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualRouterPeeringsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualrouters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualrouters_client.go index 09612659c..8b803a5bf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualrouters_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualrouters_client.go @@ -33,7 +33,7 @@ type VirtualRoutersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualRoutersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualRoutersClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualRoutersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *VirtualRoutersClient) BeginCreateOrUpdate(ctx context.Context, res } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualRoutersClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualRoutersClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualRoutersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *VirtualRoutersClient) BeginDelete(ctx context.Context, resourceGro } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualRoutersClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualRoutersClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualRoutersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -274,23 +280,16 @@ func (client *VirtualRoutersClient) NewListPager(options *VirtualRoutersClientLi }, Fetcher: func(ctx context.Context, page *VirtualRoutersClientListResponse) (VirtualRoutersClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualRoutersClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualRoutersClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return VirtualRoutersClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualRoutersClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -337,23 +336,16 @@ func (client *VirtualRoutersClient) NewListByResourceGroupPager(resourceGroupNam }, Fetcher: func(ctx context.Context, page *VirtualRoutersClientListByResourceGroupResponse) (VirtualRoutersClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualRoutersClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return VirtualRoutersClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VirtualRoutersClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualRoutersClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualwans_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualwans_client.go index c41280c06..3b5210fc9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualwans_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/virtualwans_client.go @@ -33,7 +33,7 @@ type VirtualWansClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVirtualWansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualWansClient, error) { - cl, err := arm.NewClient(moduleName+".VirtualWansClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *VirtualWansClient) BeginCreateOrUpdate(ctx context.Context, resour } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualWansClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualWansClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualWansClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -137,10 +140,13 @@ func (client *VirtualWansClient) BeginDelete(ctx context.Context, resourceGroupN } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualWansClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VirtualWansClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualWansClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -270,23 +276,16 @@ func (client *VirtualWansClient) NewListPager(options *VirtualWansClientListOpti }, Fetcher: func(ctx context.Context, page *VirtualWansClientListResponse) (VirtualWansClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualWansClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualWansClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return VirtualWansClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualWansClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -333,23 +332,16 @@ func (client *VirtualWansClient) NewListByResourceGroupPager(resourceGroupName s }, Fetcher: func(ctx context.Context, page *VirtualWansClientListByResourceGroupResponse) (VirtualWansClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualWansClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return VirtualWansClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VirtualWansClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualWansClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnconnections_client.go index 410c51fff..a18a74883 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnconnections_client.go @@ -33,7 +33,7 @@ type VPNConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVPNConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".VPNConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -63,10 +63,13 @@ func (client *VPNConnectionsClient) BeginCreateOrUpdate(ctx context.Context, res } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNConnectionsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -145,10 +148,13 @@ func (client *VPNConnectionsClient) BeginDelete(ctx context.Context, resourceGro } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNConnectionsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -290,23 +296,16 @@ func (client *VPNConnectionsClient) NewListByVPNGatewayPager(resourceGroupName s }, Fetcher: func(ctx context.Context, page *VPNConnectionsClientListByVPNGatewayResponse) (VPNConnectionsClientListByVPNGatewayResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNConnectionsClient.NewListByVPNGatewayPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByVPNGatewayCreateRequest(ctx, resourceGroupName, gatewayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VPNConnectionsClientListByVPNGatewayResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByVPNGatewayCreateRequest(ctx, resourceGroupName, gatewayName, options) + }, nil) if err != nil { return VPNConnectionsClientListByVPNGatewayResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNConnectionsClientListByVPNGatewayResponse{}, runtime.NewResponseError(resp) - } return client.listByVPNGatewayHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -365,10 +364,13 @@ func (client *VPNConnectionsClient) BeginStartPacketCapture(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNConnectionsClientStartPacketCaptureResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNConnectionsClientStartPacketCaptureResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNConnectionsClientStartPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -450,10 +452,13 @@ func (client *VPNConnectionsClient) BeginStopPacketCapture(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNConnectionsClientStopPacketCaptureResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNConnectionsClientStopPacketCaptureResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNConnectionsClientStopPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpngateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpngateways_client.go index 7fc5fa18a..5d28c7988 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpngateways_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpngateways_client.go @@ -33,7 +33,7 @@ type VPNGatewaysClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVPNGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNGatewaysClient, error) { - cl, err := arm.NewClient(moduleName+".VPNGatewaysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *VPNGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resour } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNGatewaysClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNGatewaysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -137,10 +140,13 @@ func (client *VPNGatewaysClient) BeginDelete(ctx context.Context, resourceGroupN } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNGatewaysClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNGatewaysClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNGatewaysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -270,23 +276,16 @@ func (client *VPNGatewaysClient) NewListPager(options *VPNGatewaysClientListOpti }, Fetcher: func(ctx context.Context, page *VPNGatewaysClientListResponse) (VPNGatewaysClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNGatewaysClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return VPNGatewaysClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VPNGatewaysClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNGatewaysClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -333,23 +332,16 @@ func (client *VPNGatewaysClient) NewListByResourceGroupPager(resourceGroupName s }, Fetcher: func(ctx context.Context, page *VPNGatewaysClientListByResourceGroupResponse) (VPNGatewaysClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNGatewaysClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VPNGatewaysClientListByResourceGroupResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return VPNGatewaysClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNGatewaysClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -402,10 +394,13 @@ func (client *VPNGatewaysClient) BeginReset(ctx context.Context, resourceGroupNa } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNGatewaysClientResetResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNGatewaysClientResetResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNGatewaysClientResetResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -479,10 +474,13 @@ func (client *VPNGatewaysClient) BeginStartPacketCapture(ctx context.Context, re } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNGatewaysClientStartPacketCaptureResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNGatewaysClientStartPacketCaptureResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNGatewaysClientStartPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -559,10 +557,13 @@ func (client *VPNGatewaysClient) BeginStopPacketCapture(ctx context.Context, res } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNGatewaysClientStopPacketCaptureResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNGatewaysClientStopPacketCaptureResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNGatewaysClientStopPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -640,10 +641,13 @@ func (client *VPNGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGr } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNGatewaysClientUpdateTagsResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNGatewaysClientUpdateTagsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNGatewaysClientUpdateTagsResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnlinkconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnlinkconnections_client.go index 4bca11770..c9e13cc5f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnlinkconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnlinkconnections_client.go @@ -33,7 +33,7 @@ type VPNLinkConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVPNLinkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNLinkConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".VPNLinkConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *VPNLinkConnectionsClient) BeginGetIkeSas(ctx context.Context, reso } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNLinkConnectionsClientGetIkeSasResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNLinkConnectionsClientGetIkeSasResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNLinkConnectionsClientGetIkeSasResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -143,23 +146,16 @@ func (client *VPNLinkConnectionsClient) NewListByVPNConnectionPager(resourceGrou }, Fetcher: func(ctx context.Context, page *VPNLinkConnectionsClientListByVPNConnectionResponse) (VPNLinkConnectionsClientListByVPNConnectionResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNLinkConnectionsClient.NewListByVPNConnectionPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByVPNConnectionCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VPNLinkConnectionsClientListByVPNConnectionResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByVPNConnectionCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, options) + }, nil) if err != nil { return VPNLinkConnectionsClientListByVPNConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNLinkConnectionsClientListByVPNConnectionResponse{}, runtime.NewResponseError(resp) - } return client.listByVPNConnectionHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -223,10 +219,13 @@ func (client *VPNLinkConnectionsClient) BeginResetConnection(ctx context.Context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNLinkConnectionsClientResetConnectionResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNLinkConnectionsClientResetConnectionResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNLinkConnectionsClientResetConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnserverconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnserverconfigurations_client.go index e5f12158c..1cb954690 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnserverconfigurations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnserverconfigurations_client.go @@ -33,7 +33,7 @@ type VPNServerConfigurationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVPNServerConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNServerConfigurationsClient, error) { - cl, err := arm.NewClient(moduleName+".VPNServerConfigurationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *VPNServerConfigurationsClient) BeginCreateOrUpdate(ctx context.Con } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNServerConfigurationsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNServerConfigurationsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNServerConfigurationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -138,10 +141,13 @@ func (client *VPNServerConfigurationsClient) BeginDelete(ctx context.Context, re } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNServerConfigurationsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNServerConfigurationsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNServerConfigurationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -273,23 +279,16 @@ func (client *VPNServerConfigurationsClient) NewListPager(options *VPNServerConf }, Fetcher: func(ctx context.Context, page *VPNServerConfigurationsClientListResponse) (VPNServerConfigurationsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNServerConfigurationsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VPNServerConfigurationsClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return VPNServerConfigurationsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNServerConfigurationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -336,23 +335,16 @@ func (client *VPNServerConfigurationsClient) NewListByResourceGroupPager(resourc }, Fetcher: func(ctx context.Context, page *VPNServerConfigurationsClientListByResourceGroupResponse) (VPNServerConfigurationsClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNServerConfigurationsClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return VPNServerConfigurationsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VPNServerConfigurationsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNServerConfigurationsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnserverconfigurationsassociatedwithvirtualwan_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnserverconfigurationsassociatedwithvirtualwan_client.go index c63565668..f7e5490f7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnserverconfigurationsassociatedwithvirtualwan_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnserverconfigurationsassociatedwithvirtualwan_client.go @@ -33,7 +33,7 @@ type VPNServerConfigurationsAssociatedWithVirtualWanClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVPNServerConfigurationsAssociatedWithVirtualWanClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNServerConfigurationsAssociatedWithVirtualWanClient, error) { - cl, err := arm.NewClient(moduleName+".VPNServerConfigurationsAssociatedWithVirtualWanClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -60,10 +60,13 @@ func (client *VPNServerConfigurationsAssociatedWithVirtualWanClient) BeginList(c } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnsitelinkconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnsitelinkconnections_client.go index 38464ec08..ce9c64340 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnsitelinkconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnsitelinkconnections_client.go @@ -33,7 +33,7 @@ type VPNSiteLinkConnectionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVPNSiteLinkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSiteLinkConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".VPNSiteLinkConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnsitelinks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnsitelinks_client.go index 07feadec0..ae77b690b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnsitelinks_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnsitelinks_client.go @@ -33,7 +33,7 @@ type VPNSiteLinksClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVPNSiteLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSiteLinksClient, error) { - cl, err := arm.NewClient(moduleName+".VPNSiteLinksClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -127,23 +127,16 @@ func (client *VPNSiteLinksClient) NewListByVPNSitePager(resourceGroupName string }, Fetcher: func(ctx context.Context, page *VPNSiteLinksClientListByVPNSiteResponse) (VPNSiteLinksClientListByVPNSiteResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNSiteLinksClient.NewListByVPNSitePager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByVPNSiteCreateRequest(ctx, resourceGroupName, vpnSiteName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByVPNSiteCreateRequest(ctx, resourceGroupName, vpnSiteName, options) + }, nil) if err != nil { return VPNSiteLinksClientListByVPNSiteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VPNSiteLinksClientListByVPNSiteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNSiteLinksClientListByVPNSiteResponse{}, runtime.NewResponseError(resp) - } return client.listByVPNSiteHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnsites_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnsites_client.go index 256b0da5c..ea91d8bec 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnsites_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnsites_client.go @@ -33,7 +33,7 @@ type VPNSitesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVPNSitesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSitesClient, error) { - cl, err := arm.NewClient(moduleName+".VPNSitesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *VPNSitesClient) BeginCreateOrUpdate(ctx context.Context, resourceG } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNSitesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNSitesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNSitesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -137,10 +140,13 @@ func (client *VPNSitesClient) BeginDelete(ctx context.Context, resourceGroupName } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNSitesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNSitesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNSitesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -270,23 +276,16 @@ func (client *VPNSitesClient) NewListPager(options *VPNSitesClientListOptions) * }, Fetcher: func(ctx context.Context, page *VPNSitesClientListResponse) (VPNSitesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNSitesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VPNSitesClientListResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return VPNSitesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNSitesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -333,23 +332,16 @@ func (client *VPNSitesClient) NewListByResourceGroupPager(resourceGroupName stri }, Fetcher: func(ctx context.Context, page *VPNSitesClientListByResourceGroupResponse) (VPNSitesClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNSitesClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return VPNSitesClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return VPNSitesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNSitesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnsitesconfiguration_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnsitesconfiguration_client.go index 0314d820c..ae821016a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnsitesconfiguration_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/vpnsitesconfiguration_client.go @@ -33,7 +33,7 @@ type VPNSitesConfigurationClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewVPNSitesConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSitesConfigurationClient, error) { - cl, err := arm.NewClient(moduleName+".VPNSitesConfigurationClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -61,10 +61,13 @@ func (client *VPNSitesConfigurationClient) BeginDownload(ctx context.Context, re } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNSitesConfigurationClientDownloadResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[VPNSitesConfigurationClientDownloadResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNSitesConfigurationClientDownloadResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/watchers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/watchers_client.go index 2017388df..b29eebfb1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/watchers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/watchers_client.go @@ -33,7 +33,7 @@ type WatchersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWatchersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WatchersClient, error) { - cl, err := arm.NewClient(moduleName+".WatchersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -62,10 +62,13 @@ func (client *WatchersClient) BeginCheckConnectivity(ctx context.Context, resour } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientCheckConnectivityResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[WatchersClientCheckConnectivityResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientCheckConnectivityResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -207,10 +210,13 @@ func (client *WatchersClient) BeginDelete(ctx context.Context, resourceGroupName } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[WatchersClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -347,10 +353,13 @@ func (client *WatchersClient) BeginGetAzureReachabilityReport(ctx context.Contex } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientGetAzureReachabilityReportResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[WatchersClientGetAzureReachabilityReportResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientGetAzureReachabilityReportResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -426,10 +435,13 @@ func (client *WatchersClient) BeginGetFlowLogStatus(ctx context.Context, resourc } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientGetFlowLogStatusResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[WatchersClientGetFlowLogStatusResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientGetFlowLogStatusResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -508,10 +520,13 @@ func (client *WatchersClient) BeginGetNetworkConfigurationDiagnostic(ctx context } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientGetNetworkConfigurationDiagnosticResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[WatchersClientGetNetworkConfigurationDiagnosticResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientGetNetworkConfigurationDiagnosticResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -590,10 +605,13 @@ func (client *WatchersClient) BeginGetNextHop(ctx context.Context, resourceGroup } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientGetNextHopResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[WatchersClientGetNextHopResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientGetNextHopResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -736,10 +754,13 @@ func (client *WatchersClient) BeginGetTroubleshooting(ctx context.Context, resou } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientGetTroubleshootingResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[WatchersClientGetTroubleshootingResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientGetTroubleshootingResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -814,10 +835,13 @@ func (client *WatchersClient) BeginGetTroubleshootingResult(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientGetTroubleshootingResultResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[WatchersClientGetTroubleshootingResultResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientGetTroubleshootingResultResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -892,10 +916,13 @@ func (client *WatchersClient) BeginGetVMSecurityRules(ctx context.Context, resou } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientGetVMSecurityRulesResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[WatchersClientGetVMSecurityRulesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientGetVMSecurityRulesResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1086,10 +1113,13 @@ func (client *WatchersClient) BeginListAvailableProviders(ctx context.Context, r } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientListAvailableProvidersResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[WatchersClientListAvailableProvidersResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientListAvailableProvidersResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1165,10 +1195,13 @@ func (client *WatchersClient) BeginSetFlowLogConfiguration(ctx context.Context, } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientSetFlowLogConfigurationResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[WatchersClientSetFlowLogConfigurationResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientSetFlowLogConfigurationResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1311,10 +1344,13 @@ func (client *WatchersClient) BeginVerifyIPFlow(ctx context.Context, resourceGro } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientVerifyIPFlowResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[WatchersClientVerifyIPFlowResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientVerifyIPFlowResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/webapplicationfirewallpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/webapplicationfirewallpolicies_client.go index 9a3a23fc4..eb2154b45 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/webapplicationfirewallpolicies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/webapplicationfirewallpolicies_client.go @@ -33,7 +33,7 @@ type WebApplicationFirewallPoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWebApplicationFirewallPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebApplicationFirewallPoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".WebApplicationFirewallPoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -129,10 +129,13 @@ func (client *WebApplicationFirewallPoliciesClient) BeginDelete(ctx context.Cont } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebApplicationFirewallPoliciesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[WebApplicationFirewallPoliciesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebApplicationFirewallPoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -265,23 +268,16 @@ func (client *WebApplicationFirewallPoliciesClient) NewListPager(resourceGroupNa }, Fetcher: func(ctx context.Context, page *WebApplicationFirewallPoliciesClientListResponse) (WebApplicationFirewallPoliciesClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebApplicationFirewallPoliciesClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return WebApplicationFirewallPoliciesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebApplicationFirewallPoliciesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebApplicationFirewallPoliciesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -331,23 +327,16 @@ func (client *WebApplicationFirewallPoliciesClient) NewListAllPager(options *Web }, Fetcher: func(ctx context.Context, page *WebApplicationFirewallPoliciesClientListAllResponse) (WebApplicationFirewallPoliciesClientListAllResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebApplicationFirewallPoliciesClient.NewListAllPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) if err != nil { return WebApplicationFirewallPoliciesClientListAllResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebApplicationFirewallPoliciesClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebApplicationFirewallPoliciesClientListAllResponse{}, runtime.NewResponseError(resp) - } return client.listAllHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/webcategories_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/webcategories_client.go index 9cc137f7e..26f7c27a7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/webcategories_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/webcategories_client.go @@ -33,7 +33,7 @@ type WebCategoriesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWebCategoriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebCategoriesClient, error) { - cl, err := arm.NewClient(moduleName+".WebCategoriesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -118,23 +118,16 @@ func (client *WebCategoriesClient) NewListBySubscriptionPager(options *WebCatego }, Fetcher: func(ctx context.Context, page *WebCategoriesClientListBySubscriptionResponse) (WebCategoriesClientListBySubscriptionResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebCategoriesClient.NewListBySubscriptionPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) if err != nil { return WebCategoriesClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebCategoriesClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebCategoriesClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/CHANGELOG.md index ce1ab8d64..7186a65f1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.2.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + ## 1.2.0-beta.3 (2023-10-09) ### Other Changes diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/README.md index 3d7808ffa..fbe11f6c6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/README.md @@ -61,29 +61,11 @@ client := clientFactory.NewClient() ``` ## Fakes -The `fake` package provides implementations for fake servers that can be used for testing. -To create a fake server, declare an instance of the required fake server type(s). -```go -myFakeServer := fake.Server{} -``` -Next, provide func implementations for the methods you wish to fake. -The named return variables can be used to simplify return value construction. -```go -myFakeServer.CheckExistence = func(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, apiVersion string, options *armresources.ClientCheckExistenceOptions) (resp azfake.Responder[armresources.ClientCheckExistenceResponse], errResp azfake.ErrorResponder) { - // TODO: resp.SetResponse(/* your fake ClientCheckExistenceResponse response */) - return -} -``` -You connect the fake server to a client instance during construction through the optional transport. -Use `NewTokenCredential()` from `azcore/fake` to obtain a fake credential. -```go -import azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" -client, err := armresources.NewClient("subscriptionID", azfake.NewTokenCredential(), &arm.ClientOptions{ - ClientOptions: azcore.ClientOptions{ - Transport: fake.NewServerTransport(&myFakeServer), - }, -}) -``` + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. ## More sample code diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/autorest.md index 8b913922c..58dea419a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/autorest.md @@ -8,10 +8,6 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/4fd842fb73656039ec94ce367bcedee25a57bd18/specification/resources/resource-manager/readme.md - https://github.com/Azure/azure-rest-api-specs/blob/4fd842fb73656039ec94ce367bcedee25a57bd18/specification/resources/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module: github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources -module-version: 1.2.0-beta.3 +module-version: 1.2.0 package-resources: true -azcore-version: 1.9.0-beta.1 -generate-fakes: true -inject-spans: true ``` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/build.go index c48b02b11..546b96f36 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/build.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/build.go @@ -2,6 +2,6 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh ../../../../eng/scripts/build.ps1 -goExtension "@autorest/go@4.0.0-preview.54" -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/resources/armresources +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/resources/armresources package armresources diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/client.go index 8b984cbd5..46fde2c78 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/client.go @@ -33,7 +33,7 @@ type Client struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error) { - cl, err := arm.NewClient(moduleName+".Client", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -168,10 +168,14 @@ func (client *Client) BeginCreateOrUpdate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - poller, err := runtime.NewPoller[ClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -251,10 +255,14 @@ func (client *Client) BeginCreateOrUpdateByID(ctx context.Context, resourceID st if err != nil { return nil, err } - poller, err := runtime.NewPoller[ClientCreateOrUpdateByIDResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientCreateOrUpdateByIDResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ClientCreateOrUpdateByIDResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientCreateOrUpdateByIDResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -318,10 +326,14 @@ func (client *Client) BeginDelete(ctx context.Context, resourceGroupName string, if err != nil { return nil, err } - poller, err := runtime.NewPoller[ClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -396,10 +408,14 @@ func (client *Client) BeginDeleteByID(ctx context.Context, resourceID string, ap if err != nil { return nil, err } - poller, err := runtime.NewPoller[ClientDeleteByIDResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientDeleteByIDResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ClientDeleteByIDResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientDeleteByIDResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -582,23 +598,16 @@ func (client *Client) NewListPager(options *ClientListOptions) *runtime.Pager[Cl }, Fetcher: func(ctx context.Context, page *ClientListResponse) (ClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "Client.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return ClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -654,23 +663,16 @@ func (client *Client) NewListByResourceGroupPager(resourceGroupName string, opti }, Fetcher: func(ctx context.Context, page *ClientListByResourceGroupResponse) (ClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "Client.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return ClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -733,10 +735,14 @@ func (client *Client) BeginMoveResources(ctx context.Context, sourceResourceGrou if err != nil { return nil, err } - poller, err := runtime.NewPoller[ClientMoveResourcesResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientMoveResourcesResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ClientMoveResourcesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientMoveResourcesResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -811,10 +817,14 @@ func (client *Client) BeginUpdate(ctx context.Context, resourceGroupName string, if err != nil { return nil, err } - poller, err := runtime.NewPoller[ClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -893,10 +903,14 @@ func (client *Client) BeginUpdateByID(ctx context.Context, resourceID string, ap if err != nil { return nil, err } - poller, err := runtime.NewPoller[ClientUpdateByIDResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientUpdateByIDResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ClientUpdateByIDResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientUpdateByIDResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -962,10 +976,14 @@ func (client *Client) BeginValidateMoveResources(ctx context.Context, sourceReso if err != nil { return nil, err } - poller, err := runtime.NewPoller[ClientValidateMoveResourcesResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientValidateMoveResourcesResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ClientValidateMoveResourcesResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientValidateMoveResourcesResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/client_factory.go index b8c9f5717..bcd6487d6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/client_factory.go @@ -27,7 +27,7 @@ type ClientFactory struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { - _, err := arm.NewClient(moduleName+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -37,41 +37,49 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } +// NewClient creates a new instance of Client. func (c *ClientFactory) NewClient() *Client { subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDeploymentOperationsClient creates a new instance of DeploymentOperationsClient. func (c *ClientFactory) NewDeploymentOperationsClient() *DeploymentOperationsClient { subClient, _ := NewDeploymentOperationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewDeploymentsClient creates a new instance of DeploymentsClient. func (c *ClientFactory) NewDeploymentsClient() *DeploymentsClient { subClient, _ := NewDeploymentsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewOperationsClient creates a new instance of OperationsClient. func (c *ClientFactory) NewOperationsClient() *OperationsClient { subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } +// NewProviderResourceTypesClient creates a new instance of ProviderResourceTypesClient. func (c *ClientFactory) NewProviderResourceTypesClient() *ProviderResourceTypesClient { subClient, _ := NewProviderResourceTypesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewProvidersClient creates a new instance of ProvidersClient. func (c *ClientFactory) NewProvidersClient() *ProvidersClient { subClient, _ := NewProvidersClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewResourceGroupsClient creates a new instance of ResourceGroupsClient. func (c *ClientFactory) NewResourceGroupsClient() *ResourceGroupsClient { subClient, _ := NewResourceGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewTagsClient creates a new instance of TagsClient. func (c *ClientFactory) NewTagsClient() *TagsClient { subClient, _ := NewTagsClient(c.subscriptionID, c.credential, c.options) return subClient diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/constants.go index dbe415064..6cf0f0dc3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/constants.go @@ -9,8 +9,8 @@ package armresources const ( - moduleName = "armresources" - moduleVersion = "v1.2.0-beta.3" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" + moduleVersion = "v1.2.0" ) // AliasPathAttributes - The attributes of the token that the alias path is referring to. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/deploymentoperations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/deploymentoperations_client.go index 76fe51416..ec1e1ab80 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/deploymentoperations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/deploymentoperations_client.go @@ -33,7 +33,7 @@ type DeploymentOperationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDeploymentOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeploymentOperationsClient, error) { - cl, err := arm.NewClient(moduleName+".DeploymentOperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -383,23 +383,16 @@ func (client *DeploymentOperationsClient) NewListPager(resourceGroupName string, }, Fetcher: func(ctx context.Context, page *DeploymentOperationsClientListResponse) (DeploymentOperationsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeploymentOperationsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, deploymentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, deploymentName, options) + }, nil) if err != nil { return DeploymentOperationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DeploymentOperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeploymentOperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -458,23 +451,16 @@ func (client *DeploymentOperationsClient) NewListAtManagementGroupScopePager(gro }, Fetcher: func(ctx context.Context, page *DeploymentOperationsClientListAtManagementGroupScopeResponse) (DeploymentOperationsClientListAtManagementGroupScopeResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeploymentOperationsClient.NewListAtManagementGroupScopePager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAtManagementGroupScopeCreateRequest(ctx, groupID, deploymentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DeploymentOperationsClientListAtManagementGroupScopeResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAtManagementGroupScopeCreateRequest(ctx, groupID, deploymentName, options) + }, nil) if err != nil { return DeploymentOperationsClientListAtManagementGroupScopeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeploymentOperationsClientListAtManagementGroupScopeResponse{}, runtime.NewResponseError(resp) - } return client.listAtManagementGroupScopeHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -529,23 +515,16 @@ func (client *DeploymentOperationsClient) NewListAtScopePager(scope string, depl }, Fetcher: func(ctx context.Context, page *DeploymentOperationsClientListAtScopeResponse) (DeploymentOperationsClientListAtScopeResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeploymentOperationsClient.NewListAtScopePager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAtScopeCreateRequest(ctx, scope, deploymentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DeploymentOperationsClientListAtScopeResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAtScopeCreateRequest(ctx, scope, deploymentName, options) + }, nil) if err != nil { return DeploymentOperationsClientListAtScopeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeploymentOperationsClientListAtScopeResponse{}, runtime.NewResponseError(resp) - } return client.listAtScopeHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -596,23 +575,16 @@ func (client *DeploymentOperationsClient) NewListAtSubscriptionScopePager(deploy }, Fetcher: func(ctx context.Context, page *DeploymentOperationsClientListAtSubscriptionScopeResponse) (DeploymentOperationsClientListAtSubscriptionScopeResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeploymentOperationsClient.NewListAtSubscriptionScopePager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAtSubscriptionScopeCreateRequest(ctx, deploymentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DeploymentOperationsClientListAtSubscriptionScopeResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAtSubscriptionScopeCreateRequest(ctx, deploymentName, options) + }, nil) if err != nil { return DeploymentOperationsClientListAtSubscriptionScopeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeploymentOperationsClientListAtSubscriptionScopeResponse{}, runtime.NewResponseError(resp) - } return client.listAtSubscriptionScopeHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -666,23 +638,16 @@ func (client *DeploymentOperationsClient) NewListAtTenantScopePager(deploymentNa }, Fetcher: func(ctx context.Context, page *DeploymentOperationsClientListAtTenantScopeResponse) (DeploymentOperationsClientListAtTenantScopeResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeploymentOperationsClient.NewListAtTenantScopePager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAtTenantScopeCreateRequest(ctx, deploymentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAtTenantScopeCreateRequest(ctx, deploymentName, options) + }, nil) if err != nil { return DeploymentOperationsClientListAtTenantScopeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DeploymentOperationsClientListAtTenantScopeResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeploymentOperationsClientListAtTenantScopeResponse{}, runtime.NewResponseError(resp) - } return client.listAtTenantScopeHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/deployments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/deployments_client.go index 7350d1ede..2e9eff6b7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/deployments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/deployments_client.go @@ -33,7 +33,7 @@ type DeploymentsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDeploymentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeploymentsClient, error) { - cl, err := arm.NewClient(moduleName+".DeploymentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -619,10 +619,14 @@ func (client *DeploymentsClient) BeginCreateOrUpdate(ctx context.Context, resour if err != nil { return nil, err } - poller, err := runtime.NewPoller[DeploymentsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -696,10 +700,14 @@ func (client *DeploymentsClient) BeginCreateOrUpdateAtManagementGroupScope(ctx c if err != nil { return nil, err } - poller, err := runtime.NewPoller[DeploymentsClientCreateOrUpdateAtManagementGroupScopeResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientCreateOrUpdateAtManagementGroupScopeResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientCreateOrUpdateAtManagementGroupScopeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientCreateOrUpdateAtManagementGroupScopeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -769,10 +777,14 @@ func (client *DeploymentsClient) BeginCreateOrUpdateAtScope(ctx context.Context, if err != nil { return nil, err } - poller, err := runtime.NewPoller[DeploymentsClientCreateOrUpdateAtScopeResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientCreateOrUpdateAtScopeResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientCreateOrUpdateAtScopeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientCreateOrUpdateAtScopeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -838,10 +850,14 @@ func (client *DeploymentsClient) BeginCreateOrUpdateAtSubscriptionScope(ctx cont if err != nil { return nil, err } - poller, err := runtime.NewPoller[DeploymentsClientCreateOrUpdateAtSubscriptionScopeResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientCreateOrUpdateAtSubscriptionScopeResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientCreateOrUpdateAtSubscriptionScopeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientCreateOrUpdateAtSubscriptionScopeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -911,10 +927,14 @@ func (client *DeploymentsClient) BeginCreateOrUpdateAtTenantScope(ctx context.Co if err != nil { return nil, err } - poller, err := runtime.NewPoller[DeploymentsClientCreateOrUpdateAtTenantScopeResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientCreateOrUpdateAtTenantScopeResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientCreateOrUpdateAtTenantScopeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientCreateOrUpdateAtTenantScopeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -984,10 +1004,14 @@ func (client *DeploymentsClient) BeginDelete(ctx context.Context, resourceGroupN if err != nil { return nil, err } - poller, err := runtime.NewPoller[DeploymentsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1069,10 +1093,14 @@ func (client *DeploymentsClient) BeginDeleteAtManagementGroupScope(ctx context.C if err != nil { return nil, err } - poller, err := runtime.NewPoller[DeploymentsClientDeleteAtManagementGroupScopeResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientDeleteAtManagementGroupScopeResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientDeleteAtManagementGroupScopeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientDeleteAtManagementGroupScopeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1149,10 +1177,14 @@ func (client *DeploymentsClient) BeginDeleteAtScope(ctx context.Context, scope s if err != nil { return nil, err } - poller, err := runtime.NewPoller[DeploymentsClientDeleteAtScopeResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientDeleteAtScopeResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientDeleteAtScopeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientDeleteAtScopeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1225,10 +1257,14 @@ func (client *DeploymentsClient) BeginDeleteAtSubscriptionScope(ctx context.Cont if err != nil { return nil, err } - poller, err := runtime.NewPoller[DeploymentsClientDeleteAtSubscriptionScopeResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientDeleteAtSubscriptionScopeResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientDeleteAtSubscriptionScopeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientDeleteAtSubscriptionScopeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1304,10 +1340,14 @@ func (client *DeploymentsClient) BeginDeleteAtTenantScope(ctx context.Context, d if err != nil { return nil, err } - poller, err := runtime.NewPoller[DeploymentsClientDeleteAtTenantScopeResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientDeleteAtTenantScopeResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientDeleteAtTenantScopeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientDeleteAtTenantScopeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1971,23 +2011,16 @@ func (client *DeploymentsClient) NewListAtManagementGroupScopePager(groupID stri }, Fetcher: func(ctx context.Context, page *DeploymentsClientListAtManagementGroupScopeResponse) (DeploymentsClientListAtManagementGroupScopeResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeploymentsClient.NewListAtManagementGroupScopePager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAtManagementGroupScopeCreateRequest(ctx, groupID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAtManagementGroupScopeCreateRequest(ctx, groupID, options) + }, nil) if err != nil { return DeploymentsClientListAtManagementGroupScopeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DeploymentsClientListAtManagementGroupScopeResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeploymentsClientListAtManagementGroupScopeResponse{}, runtime.NewResponseError(resp) - } return client.listAtManagementGroupScopeHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -2040,23 +2073,16 @@ func (client *DeploymentsClient) NewListAtScopePager(scope string, options *Depl }, Fetcher: func(ctx context.Context, page *DeploymentsClientListAtScopeResponse) (DeploymentsClientListAtScopeResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeploymentsClient.NewListAtScopePager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAtScopeCreateRequest(ctx, scope, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DeploymentsClientListAtScopeResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAtScopeCreateRequest(ctx, scope, options) + }, nil) if err != nil { return DeploymentsClientListAtScopeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeploymentsClientListAtScopeResponse{}, runtime.NewResponseError(resp) - } return client.listAtScopeHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -2105,23 +2131,16 @@ func (client *DeploymentsClient) NewListAtSubscriptionScopePager(options *Deploy }, Fetcher: func(ctx context.Context, page *DeploymentsClientListAtSubscriptionScopeResponse) (DeploymentsClientListAtSubscriptionScopeResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeploymentsClient.NewListAtSubscriptionScopePager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAtSubscriptionScopeCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DeploymentsClientListAtSubscriptionScopeResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAtSubscriptionScopeCreateRequest(ctx, options) + }, nil) if err != nil { return DeploymentsClientListAtSubscriptionScopeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeploymentsClientListAtSubscriptionScopeResponse{}, runtime.NewResponseError(resp) - } return client.listAtSubscriptionScopeHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -2173,23 +2192,16 @@ func (client *DeploymentsClient) NewListAtTenantScopePager(options *DeploymentsC }, Fetcher: func(ctx context.Context, page *DeploymentsClientListAtTenantScopeResponse) (DeploymentsClientListAtTenantScopeResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeploymentsClient.NewListAtTenantScopePager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAtTenantScopeCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DeploymentsClientListAtTenantScopeResponse{}, err + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAtTenantScopeCreateRequest(ctx, options) + }, nil) if err != nil { return DeploymentsClientListAtTenantScopeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeploymentsClientListAtTenantScopeResponse{}, runtime.NewResponseError(resp) - } return client.listAtTenantScopeHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -2238,23 +2250,16 @@ func (client *DeploymentsClient) NewListByResourceGroupPager(resourceGroupName s }, Fetcher: func(ctx context.Context, page *DeploymentsClientListByResourceGroupResponse) (DeploymentsClientListByResourceGroupResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeploymentsClient.NewListByResourceGroupPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return DeploymentsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DeploymentsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeploymentsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -2314,10 +2319,14 @@ func (client *DeploymentsClient) BeginValidate(ctx context.Context, resourceGrou if err != nil { return nil, err } - poller, err := runtime.NewPoller[DeploymentsClientValidateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientValidateResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientValidateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientValidateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -2391,10 +2400,14 @@ func (client *DeploymentsClient) BeginValidateAtManagementGroupScope(ctx context if err != nil { return nil, err } - poller, err := runtime.NewPoller[DeploymentsClientValidateAtManagementGroupScopeResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientValidateAtManagementGroupScopeResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientValidateAtManagementGroupScopeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientValidateAtManagementGroupScopeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -2465,10 +2478,14 @@ func (client *DeploymentsClient) BeginValidateAtScope(ctx context.Context, scope if err != nil { return nil, err } - poller, err := runtime.NewPoller[DeploymentsClientValidateAtScopeResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientValidateAtScopeResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientValidateAtScopeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientValidateAtScopeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -2535,10 +2552,14 @@ func (client *DeploymentsClient) BeginValidateAtSubscriptionScope(ctx context.Co if err != nil { return nil, err } - poller, err := runtime.NewPoller[DeploymentsClientValidateAtSubscriptionScopeResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientValidateAtSubscriptionScopeResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientValidateAtSubscriptionScopeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientValidateAtSubscriptionScopeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -2608,10 +2629,14 @@ func (client *DeploymentsClient) BeginValidateAtTenantScope(ctx context.Context, if err != nil { return nil, err } - poller, err := runtime.NewPoller[DeploymentsClientValidateAtTenantScopeResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientValidateAtTenantScopeResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientValidateAtTenantScopeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientValidateAtTenantScopeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -2678,10 +2703,13 @@ func (client *DeploymentsClient) BeginWhatIf(ctx context.Context, resourceGroupN } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientWhatIfResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientWhatIfResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientWhatIfResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -2757,10 +2785,13 @@ func (client *DeploymentsClient) BeginWhatIfAtManagementGroupScope(ctx context.C } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientWhatIfAtManagementGroupScopeResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientWhatIfAtManagementGroupScopeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientWhatIfAtManagementGroupScopeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -2831,10 +2862,13 @@ func (client *DeploymentsClient) BeginWhatIfAtSubscriptionScope(ctx context.Cont } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientWhatIfAtSubscriptionScopeResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientWhatIfAtSubscriptionScopeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientWhatIfAtSubscriptionScopeResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -2904,10 +2938,13 @@ func (client *DeploymentsClient) BeginWhatIfAtTenantScope(ctx context.Context, d } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientWhatIfAtTenantScopeResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientWhatIfAtTenantScopeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientWhatIfAtTenantScopeResponse]{ + Tracer: client.internal.Tracer(), + }) } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/deploymentoperations_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/deploymentoperations_server.go index dda04d97e..64d1dbf2e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/deploymentoperations_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/deploymentoperations_server.go @@ -144,19 +144,19 @@ func (d *DeploymentOperationsServerTransport) dispatchGet(req *http.Request) (*h if matches == nil || len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - operationIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) + operationIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) if err != nil { return nil, err } - respr, errRespr := d.srv.Get(req.Context(), resourceGroupNameUnescaped, deploymentNameUnescaped, operationIDUnescaped, nil) + respr, errRespr := d.srv.Get(req.Context(), resourceGroupNameParam, deploymentNameParam, operationIDParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -175,25 +175,25 @@ func (d *DeploymentOperationsServerTransport) dispatchGetAtManagementGroupScope( if d.srv.GetAtManagementGroupScope == nil { return nil, &nonRetriableError{errors.New("fake for method GetAtManagementGroupScope not implemented")} } - const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/providers/Microsoft\.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - groupIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) + groupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - operationIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) + operationIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) if err != nil { return nil, err } - respr, errRespr := d.srv.GetAtManagementGroupScope(req.Context(), groupIDUnescaped, deploymentNameUnescaped, operationIDUnescaped, nil) + respr, errRespr := d.srv.GetAtManagementGroupScope(req.Context(), groupIDParam, deploymentNameParam, operationIDParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -212,25 +212,25 @@ func (d *DeploymentOperationsServerTransport) dispatchGetAtScope(req *http.Reque if d.srv.GetAtScope == nil { return nil, &nonRetriableError{errors.New("fake for method GetAtScope not implemented")} } - const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - scopeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) + scopeParam, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - operationIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) + operationIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) if err != nil { return nil, err } - respr, errRespr := d.srv.GetAtScope(req.Context(), scopeUnescaped, deploymentNameUnescaped, operationIDUnescaped, nil) + respr, errRespr := d.srv.GetAtScope(req.Context(), scopeParam, deploymentNameParam, operationIDParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -249,21 +249,21 @@ func (d *DeploymentOperationsServerTransport) dispatchGetAtSubscriptionScope(req if d.srv.GetAtSubscriptionScope == nil { return nil, &nonRetriableError{errors.New("fake for method GetAtSubscriptionScope not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - operationIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) + operationIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) if err != nil { return nil, err } - respr, errRespr := d.srv.GetAtSubscriptionScope(req.Context(), deploymentNameUnescaped, operationIDUnescaped, nil) + respr, errRespr := d.srv.GetAtSubscriptionScope(req.Context(), deploymentNameParam, operationIDParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -282,21 +282,21 @@ func (d *DeploymentOperationsServerTransport) dispatchGetAtTenantScope(req *http if d.srv.GetAtTenantScope == nil { return nil, &nonRetriableError{errors.New("fake for method GetAtTenantScope not implemented")} } - const regexStr = `/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - operationIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) + operationIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) if err != nil { return nil, err } - respr, errRespr := d.srv.GetAtTenantScope(req.Context(), deploymentNameUnescaped, operationIDUnescaped, nil) + respr, errRespr := d.srv.GetAtTenantScope(req.Context(), deploymentNameParam, operationIDParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -324,11 +324,11 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListPager(req *http.Req return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } @@ -352,7 +352,7 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListPager(req *http.Req Top: topParam, } } - resp := d.srv.NewListPager(resourceGroupNameUnescaped, deploymentNameUnescaped, options) + resp := d.srv.NewListPager(resourceGroupNameParam, deploymentNameParam, options) newListPager = &resp d.newListPager.add(req, newListPager) server.PagerResponderInjectNextLinks(newListPager, req, func(page *armresources.DeploymentOperationsClientListResponse, createLink func() string) { @@ -379,18 +379,18 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListAtManagementGroupSc } newListAtManagementGroupScopePager := d.newListAtManagementGroupScopePager.get(req) if newListAtManagementGroupScopePager == nil { - const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations` + const regexStr = `/providers/Microsoft\.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - groupIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) + groupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } @@ -414,7 +414,7 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListAtManagementGroupSc Top: topParam, } } - resp := d.srv.NewListAtManagementGroupScopePager(groupIDUnescaped, deploymentNameUnescaped, options) + resp := d.srv.NewListAtManagementGroupScopePager(groupIDParam, deploymentNameParam, options) newListAtManagementGroupScopePager = &resp d.newListAtManagementGroupScopePager.add(req, newListAtManagementGroupScopePager) server.PagerResponderInjectNextLinks(newListAtManagementGroupScopePager, req, func(page *armresources.DeploymentOperationsClientListAtManagementGroupScopeResponse, createLink func() string) { @@ -441,18 +441,18 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListAtScopePager(req *h } newListAtScopePager := d.newListAtScopePager.get(req) if newListAtScopePager == nil { - const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations` + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - scopeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) + scopeParam, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } @@ -476,7 +476,7 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListAtScopePager(req *h Top: topParam, } } - resp := d.srv.NewListAtScopePager(scopeUnescaped, deploymentNameUnescaped, options) + resp := d.srv.NewListAtScopePager(scopeParam, deploymentNameParam, options) newListAtScopePager = &resp d.newListAtScopePager.add(req, newListAtScopePager) server.PagerResponderInjectNextLinks(newListAtScopePager, req, func(page *armresources.DeploymentOperationsClientListAtScopeResponse, createLink func() string) { @@ -503,14 +503,14 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListAtSubscriptionScope } newListAtSubscriptionScopePager := d.newListAtSubscriptionScopePager.get(req) if newListAtSubscriptionScopePager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } @@ -534,7 +534,7 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListAtSubscriptionScope Top: topParam, } } - resp := d.srv.NewListAtSubscriptionScopePager(deploymentNameUnescaped, options) + resp := d.srv.NewListAtSubscriptionScopePager(deploymentNameParam, options) newListAtSubscriptionScopePager = &resp d.newListAtSubscriptionScopePager.add(req, newListAtSubscriptionScopePager) server.PagerResponderInjectNextLinks(newListAtSubscriptionScopePager, req, func(page *armresources.DeploymentOperationsClientListAtSubscriptionScopeResponse, createLink func() string) { @@ -561,14 +561,14 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListAtTenantScopePager( } newListAtTenantScopePager := d.newListAtTenantScopePager.get(req) if newListAtTenantScopePager == nil { - const regexStr = `/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations` + const regexStr = `/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } @@ -592,7 +592,7 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListAtTenantScopePager( Top: topParam, } } - resp := d.srv.NewListAtTenantScopePager(deploymentNameUnescaped, options) + resp := d.srv.NewListAtTenantScopePager(deploymentNameParam, options) newListAtTenantScopePager = &resp d.newListAtTenantScopePager.add(req, newListAtTenantScopePager) server.PagerResponderInjectNextLinks(newListAtTenantScopePager, req, func(page *armresources.DeploymentOperationsClientListAtTenantScopeResponse, createLink func() string) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/deployments_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/deployments_server.go index d8d119a96..4dbb81cde 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/deployments_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/deployments_server.go @@ -409,21 +409,21 @@ func (d *DeploymentsServerTransport) dispatchCancel(req *http.Request) (*http.Re if d.srv.Cancel == nil { return nil, &nonRetriableError{errors.New("fake for method Cancel not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.Cancel(req.Context(), resourceGroupNameUnescaped, deploymentNameUnescaped, nil) + respr, errRespr := d.srv.Cancel(req.Context(), resourceGroupNameParam, deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -442,21 +442,21 @@ func (d *DeploymentsServerTransport) dispatchCancelAtManagementGroupScope(req *h if d.srv.CancelAtManagementGroupScope == nil { return nil, &nonRetriableError{errors.New("fake for method CancelAtManagementGroupScope not implemented")} } - const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` + const regexStr = `/providers/Microsoft\.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - groupIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) + groupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.CancelAtManagementGroupScope(req.Context(), groupIDUnescaped, deploymentNameUnescaped, nil) + respr, errRespr := d.srv.CancelAtManagementGroupScope(req.Context(), groupIDParam, deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -475,21 +475,21 @@ func (d *DeploymentsServerTransport) dispatchCancelAtScope(req *http.Request) (* if d.srv.CancelAtScope == nil { return nil, &nonRetriableError{errors.New("fake for method CancelAtScope not implemented")} } - const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - scopeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) + scopeParam, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.CancelAtScope(req.Context(), scopeUnescaped, deploymentNameUnescaped, nil) + respr, errRespr := d.srv.CancelAtScope(req.Context(), scopeParam, deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -508,17 +508,17 @@ func (d *DeploymentsServerTransport) dispatchCancelAtSubscriptionScope(req *http if d.srv.CancelAtSubscriptionScope == nil { return nil, &nonRetriableError{errors.New("fake for method CancelAtSubscriptionScope not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.CancelAtSubscriptionScope(req.Context(), deploymentNameUnescaped, nil) + respr, errRespr := d.srv.CancelAtSubscriptionScope(req.Context(), deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -537,17 +537,17 @@ func (d *DeploymentsServerTransport) dispatchCancelAtTenantScope(req *http.Reque if d.srv.CancelAtTenantScope == nil { return nil, &nonRetriableError{errors.New("fake for method CancelAtTenantScope not implemented")} } - const regexStr = `/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` + const regexStr = `/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.CancelAtTenantScope(req.Context(), deploymentNameUnescaped, nil) + respr, errRespr := d.srv.CancelAtTenantScope(req.Context(), deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -566,21 +566,21 @@ func (d *DeploymentsServerTransport) dispatchCheckExistence(req *http.Request) ( if d.srv.CheckExistence == nil { return nil, &nonRetriableError{errors.New("fake for method CheckExistence not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.CheckExistence(req.Context(), resourceGroupNameUnescaped, deploymentNameUnescaped, nil) + respr, errRespr := d.srv.CheckExistence(req.Context(), resourceGroupNameParam, deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -599,21 +599,21 @@ func (d *DeploymentsServerTransport) dispatchCheckExistenceAtManagementGroupScop if d.srv.CheckExistenceAtManagementGroupScope == nil { return nil, &nonRetriableError{errors.New("fake for method CheckExistenceAtManagementGroupScope not implemented")} } - const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/providers/Microsoft\.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - groupIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) + groupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.CheckExistenceAtManagementGroupScope(req.Context(), groupIDUnescaped, deploymentNameUnescaped, nil) + respr, errRespr := d.srv.CheckExistenceAtManagementGroupScope(req.Context(), groupIDParam, deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -632,21 +632,21 @@ func (d *DeploymentsServerTransport) dispatchCheckExistenceAtScope(req *http.Req if d.srv.CheckExistenceAtScope == nil { return nil, &nonRetriableError{errors.New("fake for method CheckExistenceAtScope not implemented")} } - const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - scopeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) + scopeParam, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.CheckExistenceAtScope(req.Context(), scopeUnescaped, deploymentNameUnescaped, nil) + respr, errRespr := d.srv.CheckExistenceAtScope(req.Context(), scopeParam, deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -665,17 +665,17 @@ func (d *DeploymentsServerTransport) dispatchCheckExistenceAtSubscriptionScope(r if d.srv.CheckExistenceAtSubscriptionScope == nil { return nil, &nonRetriableError{errors.New("fake for method CheckExistenceAtSubscriptionScope not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.CheckExistenceAtSubscriptionScope(req.Context(), deploymentNameUnescaped, nil) + respr, errRespr := d.srv.CheckExistenceAtSubscriptionScope(req.Context(), deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -694,17 +694,17 @@ func (d *DeploymentsServerTransport) dispatchCheckExistenceAtTenantScope(req *ht if d.srv.CheckExistenceAtTenantScope == nil { return nil, &nonRetriableError{errors.New("fake for method CheckExistenceAtTenantScope not implemented")} } - const regexStr = `/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.CheckExistenceAtTenantScope(req.Context(), deploymentNameUnescaped, nil) + respr, errRespr := d.srv.CheckExistenceAtTenantScope(req.Context(), deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -725,7 +725,7 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque } beginCreateOrUpdate := d.beginCreateOrUpdate.get(req) if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -735,15 +735,15 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, deploymentNameUnescaped, body, nil) + respr, errRespr := d.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, deploymentNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -773,7 +773,7 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdateAtManagementGrou } beginCreateOrUpdateAtManagementGroupScope := d.beginCreateOrUpdateAtManagementGroupScope.get(req) if beginCreateOrUpdateAtManagementGroupScope == nil { - const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/providers/Microsoft\.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { @@ -783,15 +783,15 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdateAtManagementGrou if err != nil { return nil, err } - groupIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) + groupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginCreateOrUpdateAtManagementGroupScope(req.Context(), groupIDUnescaped, deploymentNameUnescaped, body, nil) + respr, errRespr := d.srv.BeginCreateOrUpdateAtManagementGroupScope(req.Context(), groupIDParam, deploymentNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -821,7 +821,7 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdateAtScope(req *htt } beginCreateOrUpdateAtScope := d.beginCreateOrUpdateAtScope.get(req) if beginCreateOrUpdateAtScope == nil { - const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { @@ -831,15 +831,15 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdateAtScope(req *htt if err != nil { return nil, err } - scopeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) + scopeParam, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginCreateOrUpdateAtScope(req.Context(), scopeUnescaped, deploymentNameUnescaped, body, nil) + respr, errRespr := d.srv.BeginCreateOrUpdateAtScope(req.Context(), scopeParam, deploymentNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -869,7 +869,7 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdateAtSubscriptionSc } beginCreateOrUpdateAtSubscriptionScope := d.beginCreateOrUpdateAtSubscriptionScope.get(req) if beginCreateOrUpdateAtSubscriptionScope == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { @@ -879,11 +879,11 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdateAtSubscriptionSc if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginCreateOrUpdateAtSubscriptionScope(req.Context(), deploymentNameUnescaped, body, nil) + respr, errRespr := d.srv.BeginCreateOrUpdateAtSubscriptionScope(req.Context(), deploymentNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -913,7 +913,7 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdateAtTenantScope(re } beginCreateOrUpdateAtTenantScope := d.beginCreateOrUpdateAtTenantScope.get(req) if beginCreateOrUpdateAtTenantScope == nil { - const regexStr = `/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -923,11 +923,11 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdateAtTenantScope(re if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginCreateOrUpdateAtTenantScope(req.Context(), deploymentNameUnescaped, body, nil) + respr, errRespr := d.srv.BeginCreateOrUpdateAtTenantScope(req.Context(), deploymentNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -957,21 +957,21 @@ func (d *DeploymentsServerTransport) dispatchBeginDelete(req *http.Request) (*ht } beginDelete := d.beginDelete.get(req) if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, deploymentNameUnescaped, nil) + respr, errRespr := d.srv.BeginDelete(req.Context(), resourceGroupNameParam, deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1001,21 +1001,21 @@ func (d *DeploymentsServerTransport) dispatchBeginDeleteAtManagementGroupScope(r } beginDeleteAtManagementGroupScope := d.beginDeleteAtManagementGroupScope.get(req) if beginDeleteAtManagementGroupScope == nil { - const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/providers/Microsoft\.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - groupIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) + groupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginDeleteAtManagementGroupScope(req.Context(), groupIDUnescaped, deploymentNameUnescaped, nil) + respr, errRespr := d.srv.BeginDeleteAtManagementGroupScope(req.Context(), groupIDParam, deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1045,21 +1045,21 @@ func (d *DeploymentsServerTransport) dispatchBeginDeleteAtScope(req *http.Reques } beginDeleteAtScope := d.beginDeleteAtScope.get(req) if beginDeleteAtScope == nil { - const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - scopeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) + scopeParam, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginDeleteAtScope(req.Context(), scopeUnescaped, deploymentNameUnescaped, nil) + respr, errRespr := d.srv.BeginDeleteAtScope(req.Context(), scopeParam, deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1089,17 +1089,17 @@ func (d *DeploymentsServerTransport) dispatchBeginDeleteAtSubscriptionScope(req } beginDeleteAtSubscriptionScope := d.beginDeleteAtSubscriptionScope.get(req) if beginDeleteAtSubscriptionScope == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginDeleteAtSubscriptionScope(req.Context(), deploymentNameUnescaped, nil) + respr, errRespr := d.srv.BeginDeleteAtSubscriptionScope(req.Context(), deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1129,17 +1129,17 @@ func (d *DeploymentsServerTransport) dispatchBeginDeleteAtTenantScope(req *http. } beginDeleteAtTenantScope := d.beginDeleteAtTenantScope.get(req) if beginDeleteAtTenantScope == nil { - const regexStr = `/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginDeleteAtTenantScope(req.Context(), deploymentNameUnescaped, nil) + respr, errRespr := d.srv.BeginDeleteAtTenantScope(req.Context(), deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1167,21 +1167,21 @@ func (d *DeploymentsServerTransport) dispatchExportTemplate(req *http.Request) ( if d.srv.ExportTemplate == nil { return nil, &nonRetriableError{errors.New("fake for method ExportTemplate not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/exportTemplate` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/exportTemplate` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.ExportTemplate(req.Context(), resourceGroupNameUnescaped, deploymentNameUnescaped, nil) + respr, errRespr := d.srv.ExportTemplate(req.Context(), resourceGroupNameParam, deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1200,21 +1200,21 @@ func (d *DeploymentsServerTransport) dispatchExportTemplateAtManagementGroupScop if d.srv.ExportTemplateAtManagementGroupScope == nil { return nil, &nonRetriableError{errors.New("fake for method ExportTemplateAtManagementGroupScope not implemented")} } - const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/exportTemplate` + const regexStr = `/providers/Microsoft\.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/exportTemplate` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - groupIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) + groupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.ExportTemplateAtManagementGroupScope(req.Context(), groupIDUnescaped, deploymentNameUnescaped, nil) + respr, errRespr := d.srv.ExportTemplateAtManagementGroupScope(req.Context(), groupIDParam, deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1233,21 +1233,21 @@ func (d *DeploymentsServerTransport) dispatchExportTemplateAtScope(req *http.Req if d.srv.ExportTemplateAtScope == nil { return nil, &nonRetriableError{errors.New("fake for method ExportTemplateAtScope not implemented")} } - const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/exportTemplate` + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/exportTemplate` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - scopeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) + scopeParam, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.ExportTemplateAtScope(req.Context(), scopeUnescaped, deploymentNameUnescaped, nil) + respr, errRespr := d.srv.ExportTemplateAtScope(req.Context(), scopeParam, deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1266,17 +1266,17 @@ func (d *DeploymentsServerTransport) dispatchExportTemplateAtSubscriptionScope(r if d.srv.ExportTemplateAtSubscriptionScope == nil { return nil, &nonRetriableError{errors.New("fake for method ExportTemplateAtSubscriptionScope not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/exportTemplate` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/exportTemplate` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.ExportTemplateAtSubscriptionScope(req.Context(), deploymentNameUnescaped, nil) + respr, errRespr := d.srv.ExportTemplateAtSubscriptionScope(req.Context(), deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1295,17 +1295,17 @@ func (d *DeploymentsServerTransport) dispatchExportTemplateAtTenantScope(req *ht if d.srv.ExportTemplateAtTenantScope == nil { return nil, &nonRetriableError{errors.New("fake for method ExportTemplateAtTenantScope not implemented")} } - const regexStr = `/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/exportTemplate` + const regexStr = `/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/exportTemplate` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.ExportTemplateAtTenantScope(req.Context(), deploymentNameUnescaped, nil) + respr, errRespr := d.srv.ExportTemplateAtTenantScope(req.Context(), deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1324,21 +1324,21 @@ func (d *DeploymentsServerTransport) dispatchGet(req *http.Request) (*http.Respo if d.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.Get(req.Context(), resourceGroupNameUnescaped, deploymentNameUnescaped, nil) + respr, errRespr := d.srv.Get(req.Context(), resourceGroupNameParam, deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1357,21 +1357,21 @@ func (d *DeploymentsServerTransport) dispatchGetAtManagementGroupScope(req *http if d.srv.GetAtManagementGroupScope == nil { return nil, &nonRetriableError{errors.New("fake for method GetAtManagementGroupScope not implemented")} } - const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/providers/Microsoft\.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - groupIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) + groupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.GetAtManagementGroupScope(req.Context(), groupIDUnescaped, deploymentNameUnescaped, nil) + respr, errRespr := d.srv.GetAtManagementGroupScope(req.Context(), groupIDParam, deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1390,21 +1390,21 @@ func (d *DeploymentsServerTransport) dispatchGetAtScope(req *http.Request) (*htt if d.srv.GetAtScope == nil { return nil, &nonRetriableError{errors.New("fake for method GetAtScope not implemented")} } - const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - scopeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) + scopeParam, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.GetAtScope(req.Context(), scopeUnescaped, deploymentNameUnescaped, nil) + respr, errRespr := d.srv.GetAtScope(req.Context(), scopeParam, deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1423,17 +1423,17 @@ func (d *DeploymentsServerTransport) dispatchGetAtSubscriptionScope(req *http.Re if d.srv.GetAtSubscriptionScope == nil { return nil, &nonRetriableError{errors.New("fake for method GetAtSubscriptionScope not implemented")} } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.GetAtSubscriptionScope(req.Context(), deploymentNameUnescaped, nil) + respr, errRespr := d.srv.GetAtSubscriptionScope(req.Context(), deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1452,17 +1452,17 @@ func (d *DeploymentsServerTransport) dispatchGetAtTenantScope(req *http.Request) if d.srv.GetAtTenantScope == nil { return nil, &nonRetriableError{errors.New("fake for method GetAtTenantScope not implemented")} } - const regexStr = `/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + const regexStr = `/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.GetAtTenantScope(req.Context(), deploymentNameUnescaped, nil) + respr, errRespr := d.srv.GetAtTenantScope(req.Context(), deploymentNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1483,14 +1483,14 @@ func (d *DeploymentsServerTransport) dispatchNewListAtManagementGroupScopePager( } newListAtManagementGroupScopePager := d.newListAtManagementGroupScopePager.get(req) if newListAtManagementGroupScopePager == nil { - const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/` + const regexStr = `/providers/Microsoft\.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - groupIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) + groupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) if err != nil { return nil, err } @@ -1520,7 +1520,7 @@ func (d *DeploymentsServerTransport) dispatchNewListAtManagementGroupScopePager( Top: topParam, } } - resp := d.srv.NewListAtManagementGroupScopePager(groupIDUnescaped, options) + resp := d.srv.NewListAtManagementGroupScopePager(groupIDParam, options) newListAtManagementGroupScopePager = &resp d.newListAtManagementGroupScopePager.add(req, newListAtManagementGroupScopePager) server.PagerResponderInjectNextLinks(newListAtManagementGroupScopePager, req, func(page *armresources.DeploymentsClientListAtManagementGroupScopeResponse, createLink func() string) { @@ -1547,14 +1547,14 @@ func (d *DeploymentsServerTransport) dispatchNewListAtScopePager(req *http.Reque } newListAtScopePager := d.newListAtScopePager.get(req) if newListAtScopePager == nil { - const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/` + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - scopeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) + scopeParam, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) if err != nil { return nil, err } @@ -1584,7 +1584,7 @@ func (d *DeploymentsServerTransport) dispatchNewListAtScopePager(req *http.Reque Top: topParam, } } - resp := d.srv.NewListAtScopePager(scopeUnescaped, options) + resp := d.srv.NewListAtScopePager(scopeParam, options) newListAtScopePager = &resp d.newListAtScopePager.add(req, newListAtScopePager) server.PagerResponderInjectNextLinks(newListAtScopePager, req, func(page *armresources.DeploymentsClientListAtScopeResponse, createLink func() string) { @@ -1611,7 +1611,7 @@ func (d *DeploymentsServerTransport) dispatchNewListAtSubscriptionScopePager(req } newListAtSubscriptionScopePager := d.newListAtSubscriptionScopePager.get(req) if newListAtSubscriptionScopePager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -1725,14 +1725,14 @@ func (d *DeploymentsServerTransport) dispatchNewListByResourceGroupPager(req *ht } newListByResourceGroupPager := d.newListByResourceGroupPager.get(req) if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } @@ -1762,7 +1762,7 @@ func (d *DeploymentsServerTransport) dispatchNewListByResourceGroupPager(req *ht Top: topParam, } } - resp := d.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, options) + resp := d.srv.NewListByResourceGroupPager(resourceGroupNameParam, options) newListByResourceGroupPager = &resp d.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armresources.DeploymentsClientListByResourceGroupResponse, createLink func() string) { @@ -1789,7 +1789,7 @@ func (d *DeploymentsServerTransport) dispatchBeginValidate(req *http.Request) (* } beginValidate := d.beginValidate.get(req) if beginValidate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -1799,15 +1799,15 @@ func (d *DeploymentsServerTransport) dispatchBeginValidate(req *http.Request) (* if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginValidate(req.Context(), resourceGroupNameUnescaped, deploymentNameUnescaped, body, nil) + respr, errRespr := d.srv.BeginValidate(req.Context(), resourceGroupNameParam, deploymentNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1837,7 +1837,7 @@ func (d *DeploymentsServerTransport) dispatchBeginValidateAtManagementGroupScope } beginValidateAtManagementGroupScope := d.beginValidateAtManagementGroupScope.get(req) if beginValidateAtManagementGroupScope == nil { - const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` + const regexStr = `/providers/Microsoft\.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { @@ -1847,15 +1847,15 @@ func (d *DeploymentsServerTransport) dispatchBeginValidateAtManagementGroupScope if err != nil { return nil, err } - groupIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) + groupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginValidateAtManagementGroupScope(req.Context(), groupIDUnescaped, deploymentNameUnescaped, body, nil) + respr, errRespr := d.srv.BeginValidateAtManagementGroupScope(req.Context(), groupIDParam, deploymentNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1885,7 +1885,7 @@ func (d *DeploymentsServerTransport) dispatchBeginValidateAtScope(req *http.Requ } beginValidateAtScope := d.beginValidateAtScope.get(req) if beginValidateAtScope == nil { - const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { @@ -1895,15 +1895,15 @@ func (d *DeploymentsServerTransport) dispatchBeginValidateAtScope(req *http.Requ if err != nil { return nil, err } - scopeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) + scopeParam, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginValidateAtScope(req.Context(), scopeUnescaped, deploymentNameUnescaped, body, nil) + respr, errRespr := d.srv.BeginValidateAtScope(req.Context(), scopeParam, deploymentNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1933,7 +1933,7 @@ func (d *DeploymentsServerTransport) dispatchBeginValidateAtSubscriptionScope(re } beginValidateAtSubscriptionScope := d.beginValidateAtSubscriptionScope.get(req) if beginValidateAtSubscriptionScope == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { @@ -1943,11 +1943,11 @@ func (d *DeploymentsServerTransport) dispatchBeginValidateAtSubscriptionScope(re if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginValidateAtSubscriptionScope(req.Context(), deploymentNameUnescaped, body, nil) + respr, errRespr := d.srv.BeginValidateAtSubscriptionScope(req.Context(), deploymentNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -1977,7 +1977,7 @@ func (d *DeploymentsServerTransport) dispatchBeginValidateAtTenantScope(req *htt } beginValidateAtTenantScope := d.beginValidateAtTenantScope.get(req) if beginValidateAtTenantScope == nil { - const regexStr = `/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` + const regexStr = `/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -1987,11 +1987,11 @@ func (d *DeploymentsServerTransport) dispatchBeginValidateAtTenantScope(req *htt if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginValidateAtTenantScope(req.Context(), deploymentNameUnescaped, body, nil) + respr, errRespr := d.srv.BeginValidateAtTenantScope(req.Context(), deploymentNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -2021,7 +2021,7 @@ func (d *DeploymentsServerTransport) dispatchBeginWhatIf(req *http.Request) (*ht } beginWhatIf := d.beginWhatIf.get(req) if beginWhatIf == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/whatIf` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/whatIf` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 3 { @@ -2031,15 +2031,15 @@ func (d *DeploymentsServerTransport) dispatchBeginWhatIf(req *http.Request) (*ht if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginWhatIf(req.Context(), resourceGroupNameUnescaped, deploymentNameUnescaped, body, nil) + respr, errRespr := d.srv.BeginWhatIf(req.Context(), resourceGroupNameParam, deploymentNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -2069,7 +2069,7 @@ func (d *DeploymentsServerTransport) dispatchBeginWhatIfAtManagementGroupScope(r } beginWhatIfAtManagementGroupScope := d.beginWhatIfAtManagementGroupScope.get(req) if beginWhatIfAtManagementGroupScope == nil { - const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/whatIf` + const regexStr = `/providers/Microsoft\.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/whatIf` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { @@ -2079,15 +2079,15 @@ func (d *DeploymentsServerTransport) dispatchBeginWhatIfAtManagementGroupScope(r if err != nil { return nil, err } - groupIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) + groupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginWhatIfAtManagementGroupScope(req.Context(), groupIDUnescaped, deploymentNameUnescaped, body, nil) + respr, errRespr := d.srv.BeginWhatIfAtManagementGroupScope(req.Context(), groupIDParam, deploymentNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -2117,7 +2117,7 @@ func (d *DeploymentsServerTransport) dispatchBeginWhatIfAtSubscriptionScope(req } beginWhatIfAtSubscriptionScope := d.beginWhatIfAtSubscriptionScope.get(req) if beginWhatIfAtSubscriptionScope == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/whatIf` + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/whatIf` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { @@ -2127,11 +2127,11 @@ func (d *DeploymentsServerTransport) dispatchBeginWhatIfAtSubscriptionScope(req if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginWhatIfAtSubscriptionScope(req.Context(), deploymentNameUnescaped, body, nil) + respr, errRespr := d.srv.BeginWhatIfAtSubscriptionScope(req.Context(), deploymentNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -2161,7 +2161,7 @@ func (d *DeploymentsServerTransport) dispatchBeginWhatIfAtTenantScope(req *http. } beginWhatIfAtTenantScope := d.beginWhatIfAtTenantScope.get(req) if beginWhatIfAtTenantScope == nil { - const regexStr = `/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/whatIf` + const regexStr = `/providers/Microsoft\.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/whatIf` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -2171,11 +2171,11 @@ func (d *DeploymentsServerTransport) dispatchBeginWhatIfAtTenantScope(req *http. if err != nil { return nil, err } - deploymentNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) + deploymentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentName")]) if err != nil { return nil, err } - respr, errRespr := d.srv.BeginWhatIfAtTenantScope(req.Context(), deploymentNameUnescaped, body, nil) + respr, errRespr := d.srv.BeginWhatIfAtTenantScope(req.Context(), deploymentNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/internal.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/internal.go index 03b635903..7d2f89ba4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/internal.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/internal.go @@ -9,11 +9,9 @@ package fake import ( - "io" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "net/http" "reflect" - "regexp" - "strings" "sync" ) @@ -25,6 +23,15 @@ func (nonRetriableError) NonRetriable() { // marker method } +func contains[T comparable](s []T, v T) bool { + for _, vv := range s { + if vv == v { + return true + } + } + return false +} + func getOptional[T any](v T) *T { if reflect.ValueOf(v).IsZero() { return nil @@ -32,14 +39,6 @@ func getOptional[T any](v T) *T { return &v } -func getHeaderValue(h http.Header, k string) string { - v := h[k] - if len(v) == 0 { - return "" - } - return v[0] -} - func parseOptional[T any](v string, parse func(v string) (T, error)) (*T, error) { if v == "" { return nil, nil @@ -51,35 +50,6 @@ func parseOptional[T any](v string, parse func(v string) (T, error)) (*T, error) return &t, err } -func parseWithCast[T any](v string, parse func(v string) (T, error)) (T, error) { - t, err := parse(v) - if err != nil { - return *new(T), err - } - return t, err -} - -func readRequestBody(req *http.Request) ([]byte, error) { - if req.Body == nil { - return nil, nil - } - body, err := io.ReadAll(req.Body) - if err != nil { - return nil, err - } - req.Body.Close() - return body, nil -} - -func contains[T comparable](s []T, v T) bool { - for _, vv := range s { - if vv == v { - return true - } - } - return false -} - func newTracker[T any]() *tracker[T] { return &tracker[T]{ items: map[string]*T{}, @@ -91,20 +61,10 @@ type tracker[T any] struct { mu sync.Mutex } -func (p *tracker[T]) key(req *http.Request) string { - path := req.URL.Path - if match, _ := regexp.Match(`/page_\d+$`, []byte(path)); match { - path = path[:strings.LastIndex(path, "/")] - } else if strings.HasSuffix(path, "/get/fake/status") { - path = path[:len(path)-16] - } - return path -} - func (p *tracker[T]) get(req *http.Request) *T { p.mu.Lock() defer p.mu.Unlock() - if item, ok := p.items[p.key(req)]; ok { + if item, ok := p.items[server.SanitizePagerPollerPath(req.URL.Path)]; ok { return item } return nil @@ -113,11 +73,11 @@ func (p *tracker[T]) get(req *http.Request) *T { func (p *tracker[T]) add(req *http.Request, item *T) { p.mu.Lock() defer p.mu.Unlock() - p.items[p.key(req)] = item + p.items[server.SanitizePagerPollerPath(req.URL.Path)] = item } func (p *tracker[T]) remove(req *http.Request) { p.mu.Lock() defer p.mu.Unlock() - delete(p.items, p.key(req)) + delete(p.items, server.SanitizePagerPollerPath(req.URL.Path)) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/providerresourcetypes_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/providerresourcetypes_server.go index 907b98cea..67c2e7e91 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/providerresourcetypes_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/providerresourcetypes_server.go @@ -82,7 +82,7 @@ func (p *ProviderResourceTypesServerTransport) dispatchList(req *http.Request) ( return nil, err } expandParam := getOptional(expandUnescaped) - resourceProviderNamespaceUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) + resourceProviderNamespaceParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) if err != nil { return nil, err } @@ -92,7 +92,7 @@ func (p *ProviderResourceTypesServerTransport) dispatchList(req *http.Request) ( Expand: expandParam, } } - respr, errRespr := p.srv.List(req.Context(), resourceProviderNamespaceUnescaped, options) + respr, errRespr := p.srv.List(req.Context(), resourceProviderNamespaceParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/providers_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/providers_server.go index 6ed17df05..5681c8622 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/providers_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/providers_server.go @@ -132,7 +132,7 @@ func (p *ProvidersServerTransport) dispatchGet(req *http.Request) (*http.Respons return nil, err } expandParam := getOptional(expandUnescaped) - resourceProviderNamespaceUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) + resourceProviderNamespaceParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) if err != nil { return nil, err } @@ -142,7 +142,7 @@ func (p *ProvidersServerTransport) dispatchGet(req *http.Request) (*http.Respons Expand: expandParam, } } - respr, errRespr := p.srv.Get(req.Context(), resourceProviderNamespaceUnescaped, options) + respr, errRespr := p.srv.Get(req.Context(), resourceProviderNamespaceParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -173,7 +173,7 @@ func (p *ProvidersServerTransport) dispatchGetAtTenantScope(req *http.Request) ( return nil, err } expandParam := getOptional(expandUnescaped) - resourceProviderNamespaceUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) + resourceProviderNamespaceParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) if err != nil { return nil, err } @@ -183,7 +183,7 @@ func (p *ProvidersServerTransport) dispatchGetAtTenantScope(req *http.Request) ( Expand: expandParam, } } - respr, errRespr := p.srv.GetAtTenantScope(req.Context(), resourceProviderNamespaceUnescaped, options) + respr, errRespr := p.srv.GetAtTenantScope(req.Context(), resourceProviderNamespaceParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -292,11 +292,11 @@ func (p *ProvidersServerTransport) dispatchProviderPermissions(req *http.Request if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceProviderNamespaceUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) + resourceProviderNamespaceParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) if err != nil { return nil, err } - respr, errRespr := p.srv.ProviderPermissions(req.Context(), resourceProviderNamespaceUnescaped, nil) + respr, errRespr := p.srv.ProviderPermissions(req.Context(), resourceProviderNamespaceParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -325,7 +325,7 @@ func (p *ProvidersServerTransport) dispatchRegister(req *http.Request) (*http.Re if err != nil { return nil, err } - resourceProviderNamespaceUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) + resourceProviderNamespaceParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) if err != nil { return nil, err } @@ -335,7 +335,7 @@ func (p *ProvidersServerTransport) dispatchRegister(req *http.Request) (*http.Re Properties: &body, } } - respr, errRespr := p.srv.Register(req.Context(), resourceProviderNamespaceUnescaped, options) + respr, errRespr := p.srv.Register(req.Context(), resourceProviderNamespaceParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -354,21 +354,21 @@ func (p *ProvidersServerTransport) dispatchRegisterAtManagementGroupScope(req *h if p.srv.RegisterAtManagementGroupScope == nil { return nil, &nonRetriableError{errors.New("fake for method RegisterAtManagementGroupScope not implemented")} } - const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/register` + const regexStr = `/providers/Microsoft\.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/register` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceProviderNamespaceUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) + resourceProviderNamespaceParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) if err != nil { return nil, err } - groupIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) + groupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("groupId")]) if err != nil { return nil, err } - respr, errRespr := p.srv.RegisterAtManagementGroupScope(req.Context(), resourceProviderNamespaceUnescaped, groupIDUnescaped, nil) + respr, errRespr := p.srv.RegisterAtManagementGroupScope(req.Context(), resourceProviderNamespaceParam, groupIDParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -393,11 +393,11 @@ func (p *ProvidersServerTransport) dispatchUnregister(req *http.Request) (*http. if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceProviderNamespaceUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) + resourceProviderNamespaceParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) if err != nil { return nil, err } - respr, errRespr := p.srv.Unregister(req.Context(), resourceProviderNamespaceUnescaped, nil) + respr, errRespr := p.srv.Unregister(req.Context(), resourceProviderNamespaceParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/resourcegroups_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/resourcegroups_server.go index e16c5e5a7..c44d076de 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/resourcegroups_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/resourcegroups_server.go @@ -122,11 +122,11 @@ func (r *ResourceGroupsServerTransport) dispatchCheckExistence(req *http.Request if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.CheckExistence(req.Context(), resourceGroupNameUnescaped, nil) + respr, errRespr := r.srv.CheckExistence(req.Context(), resourceGroupNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -155,11 +155,11 @@ func (r *ResourceGroupsServerTransport) dispatchCreateOrUpdate(req *http.Request if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.CreateOrUpdate(req.Context(), resourceGroupNameUnescaped, body, nil) + respr, errRespr := r.srv.CreateOrUpdate(req.Context(), resourceGroupNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -187,7 +187,7 @@ func (r *ResourceGroupsServerTransport) dispatchBeginDelete(req *http.Request) ( return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } @@ -202,7 +202,7 @@ func (r *ResourceGroupsServerTransport) dispatchBeginDelete(req *http.Request) ( ForceDeletionTypes: forceDeletionTypesParam, } } - respr, errRespr := r.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, options) + respr, errRespr := r.srv.BeginDelete(req.Context(), resourceGroupNameParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -242,11 +242,11 @@ func (r *ResourceGroupsServerTransport) dispatchBeginExportTemplate(req *http.Re if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.BeginExportTemplate(req.Context(), resourceGroupNameUnescaped, body, nil) + respr, errRespr := r.srv.BeginExportTemplate(req.Context(), resourceGroupNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -280,11 +280,11 @@ func (r *ResourceGroupsServerTransport) dispatchGet(req *http.Request) (*http.Re if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.Get(req.Context(), resourceGroupNameUnescaped, nil) + respr, errRespr := r.srv.Get(req.Context(), resourceGroupNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -373,11 +373,11 @@ func (r *ResourceGroupsServerTransport) dispatchUpdate(req *http.Request) (*http if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - respr, errRespr := r.srv.Update(req.Context(), resourceGroupNameUnescaped, body, nil) + respr, errRespr := r.srv.Update(req.Context(), resourceGroupNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/server.go index df120d035..e0706267a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/server.go @@ -179,31 +179,31 @@ func (s *ServerTransport) dispatchCheckExistence(req *http.Request) (*http.Respo return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resourceProviderNamespaceUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) + resourceProviderNamespaceParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) if err != nil { return nil, err } - parentResourcePathUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("parentResourcePath")]) + parentResourcePathParam, err := url.PathUnescape(matches[regex.SubexpIndex("parentResourcePath")]) if err != nil { return nil, err } - resourceTypeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceType")]) + resourceTypeParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceType")]) if err != nil { return nil, err } - resourceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) + resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) if err != nil { return nil, err } - apiVersionUnescaped, err := url.QueryUnescape(qp.Get("api-version")) + apiVersionParam, err := url.QueryUnescape(qp.Get("api-version")) if err != nil { return nil, err } - respr, errRespr := s.srv.CheckExistence(req.Context(), resourceGroupNameUnescaped, resourceProviderNamespaceUnescaped, parentResourcePathUnescaped, resourceTypeUnescaped, resourceNameUnescaped, apiVersionUnescaped, nil) + respr, errRespr := s.srv.CheckExistence(req.Context(), resourceGroupNameParam, resourceProviderNamespaceParam, parentResourcePathParam, resourceTypeParam, resourceNameParam, apiVersionParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -229,15 +229,15 @@ func (s *ServerTransport) dispatchCheckExistenceByID(req *http.Request) (*http.R return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceId")]) + resourceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceId")]) if err != nil { return nil, err } - apiVersionUnescaped, err := url.QueryUnescape(qp.Get("api-version")) + apiVersionParam, err := url.QueryUnescape(qp.Get("api-version")) if err != nil { return nil, err } - respr, errRespr := s.srv.CheckExistenceByID(req.Context(), resourceIDUnescaped, apiVersionUnescaped, nil) + respr, errRespr := s.srv.CheckExistenceByID(req.Context(), resourceIDParam, apiVersionParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -269,31 +269,31 @@ func (s *ServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http. if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resourceProviderNamespaceUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) + resourceProviderNamespaceParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) if err != nil { return nil, err } - parentResourcePathUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("parentResourcePath")]) + parentResourcePathParam, err := url.PathUnescape(matches[regex.SubexpIndex("parentResourcePath")]) if err != nil { return nil, err } - resourceTypeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceType")]) + resourceTypeParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceType")]) if err != nil { return nil, err } - resourceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) + resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) if err != nil { return nil, err } - apiVersionUnescaped, err := url.QueryUnescape(qp.Get("api-version")) + apiVersionParam, err := url.QueryUnescape(qp.Get("api-version")) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameUnescaped, resourceProviderNamespaceUnescaped, parentResourcePathUnescaped, resourceTypeUnescaped, resourceNameUnescaped, apiVersionUnescaped, body, nil) + respr, errRespr := s.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, resourceProviderNamespaceParam, parentResourcePathParam, resourceTypeParam, resourceNameParam, apiVersionParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -334,15 +334,15 @@ func (s *ServerTransport) dispatchBeginCreateOrUpdateByID(req *http.Request) (*h if err != nil { return nil, err } - resourceIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceId")]) + resourceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceId")]) if err != nil { return nil, err } - apiVersionUnescaped, err := url.QueryUnescape(qp.Get("api-version")) + apiVersionParam, err := url.QueryUnescape(qp.Get("api-version")) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginCreateOrUpdateByID(req.Context(), resourceIDUnescaped, apiVersionUnescaped, body, nil) + respr, errRespr := s.srv.BeginCreateOrUpdateByID(req.Context(), resourceIDParam, apiVersionParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -379,31 +379,31 @@ func (s *ServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resourceProviderNamespaceUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) + resourceProviderNamespaceParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) if err != nil { return nil, err } - parentResourcePathUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("parentResourcePath")]) + parentResourcePathParam, err := url.PathUnescape(matches[regex.SubexpIndex("parentResourcePath")]) if err != nil { return nil, err } - resourceTypeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceType")]) + resourceTypeParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceType")]) if err != nil { return nil, err } - resourceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) + resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) if err != nil { return nil, err } - apiVersionUnescaped, err := url.QueryUnescape(qp.Get("api-version")) + apiVersionParam, err := url.QueryUnescape(qp.Get("api-version")) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginDelete(req.Context(), resourceGroupNameUnescaped, resourceProviderNamespaceUnescaped, parentResourcePathUnescaped, resourceTypeUnescaped, resourceNameUnescaped, apiVersionUnescaped, nil) + respr, errRespr := s.srv.BeginDelete(req.Context(), resourceGroupNameParam, resourceProviderNamespaceParam, parentResourcePathParam, resourceTypeParam, resourceNameParam, apiVersionParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -440,15 +440,15 @@ func (s *ServerTransport) dispatchBeginDeleteByID(req *http.Request) (*http.Resp return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceId")]) + resourceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceId")]) if err != nil { return nil, err } - apiVersionUnescaped, err := url.QueryUnescape(qp.Get("api-version")) + apiVersionParam, err := url.QueryUnescape(qp.Get("api-version")) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginDeleteByID(req.Context(), resourceIDUnescaped, apiVersionUnescaped, nil) + respr, errRespr := s.srv.BeginDeleteByID(req.Context(), resourceIDParam, apiVersionParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -483,31 +483,31 @@ func (s *ServerTransport) dispatchGet(req *http.Request) (*http.Response, error) return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resourceProviderNamespaceUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) + resourceProviderNamespaceParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) if err != nil { return nil, err } - parentResourcePathUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("parentResourcePath")]) + parentResourcePathParam, err := url.PathUnescape(matches[regex.SubexpIndex("parentResourcePath")]) if err != nil { return nil, err } - resourceTypeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceType")]) + resourceTypeParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceType")]) if err != nil { return nil, err } - resourceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) + resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) if err != nil { return nil, err } - apiVersionUnescaped, err := url.QueryUnescape(qp.Get("api-version")) + apiVersionParam, err := url.QueryUnescape(qp.Get("api-version")) if err != nil { return nil, err } - respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameUnescaped, resourceProviderNamespaceUnescaped, parentResourcePathUnescaped, resourceTypeUnescaped, resourceNameUnescaped, apiVersionUnescaped, nil) + respr, errRespr := s.srv.Get(req.Context(), resourceGroupNameParam, resourceProviderNamespaceParam, parentResourcePathParam, resourceTypeParam, resourceNameParam, apiVersionParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -533,15 +533,15 @@ func (s *ServerTransport) dispatchGetByID(req *http.Request) (*http.Response, er return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceId")]) + resourceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceId")]) if err != nil { return nil, err } - apiVersionUnescaped, err := url.QueryUnescape(qp.Get("api-version")) + apiVersionParam, err := url.QueryUnescape(qp.Get("api-version")) if err != nil { return nil, err } - respr, errRespr := s.srv.GetByID(req.Context(), resourceIDUnescaped, apiVersionUnescaped, nil) + respr, errRespr := s.srv.GetByID(req.Context(), resourceIDParam, apiVersionParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -635,7 +635,7 @@ func (s *ServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } qp := req.URL.Query() - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } @@ -671,7 +671,7 @@ func (s *ServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) Top: topParam, } } - resp := s.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, options) + resp := s.srv.NewListByResourceGroupPager(resourceGroupNameParam, options) newListByResourceGroupPager = &resp s.newListByResourceGroupPager.add(req, newListByResourceGroupPager) server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armresources.ClientListByResourceGroupResponse, createLink func() string) { @@ -708,11 +708,11 @@ func (s *ServerTransport) dispatchBeginMoveResources(req *http.Request) (*http.R if err != nil { return nil, err } - sourceResourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("sourceResourceGroupName")]) + sourceResourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("sourceResourceGroupName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginMoveResources(req.Context(), sourceResourceGroupNameUnescaped, body, nil) + respr, errRespr := s.srv.BeginMoveResources(req.Context(), sourceResourceGroupNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -753,31 +753,31 @@ func (s *ServerTransport) dispatchBeginUpdate(req *http.Request) (*http.Response if err != nil { return nil, err } - resourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err } - resourceProviderNamespaceUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) + resourceProviderNamespaceParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceProviderNamespace")]) if err != nil { return nil, err } - parentResourcePathUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("parentResourcePath")]) + parentResourcePathParam, err := url.PathUnescape(matches[regex.SubexpIndex("parentResourcePath")]) if err != nil { return nil, err } - resourceTypeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceType")]) + resourceTypeParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceType")]) if err != nil { return nil, err } - resourceNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) + resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) if err != nil { return nil, err } - apiVersionUnescaped, err := url.QueryUnescape(qp.Get("api-version")) + apiVersionParam, err := url.QueryUnescape(qp.Get("api-version")) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginUpdate(req.Context(), resourceGroupNameUnescaped, resourceProviderNamespaceUnescaped, parentResourcePathUnescaped, resourceTypeUnescaped, resourceNameUnescaped, apiVersionUnescaped, body, nil) + respr, errRespr := s.srv.BeginUpdate(req.Context(), resourceGroupNameParam, resourceProviderNamespaceParam, parentResourcePathParam, resourceTypeParam, resourceNameParam, apiVersionParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -818,15 +818,15 @@ func (s *ServerTransport) dispatchBeginUpdateByID(req *http.Request) (*http.Resp if err != nil { return nil, err } - resourceIDUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("resourceId")]) + resourceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceId")]) if err != nil { return nil, err } - apiVersionUnescaped, err := url.QueryUnescape(qp.Get("api-version")) + apiVersionParam, err := url.QueryUnescape(qp.Get("api-version")) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginUpdateByID(req.Context(), resourceIDUnescaped, apiVersionUnescaped, body, nil) + respr, errRespr := s.srv.BeginUpdateByID(req.Context(), resourceIDParam, apiVersionParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -866,11 +866,11 @@ func (s *ServerTransport) dispatchBeginValidateMoveResources(req *http.Request) if err != nil { return nil, err } - sourceResourceGroupNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("sourceResourceGroupName")]) + sourceResourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("sourceResourceGroupName")]) if err != nil { return nil, err } - respr, errRespr := s.srv.BeginValidateMoveResources(req.Context(), sourceResourceGroupNameUnescaped, body, nil) + respr, errRespr := s.srv.BeginValidateMoveResources(req.Context(), sourceResourceGroupNameParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/server_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/server_factory.go new file mode 100644 index 000000000..9b10cbd19 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/server_factory.go @@ -0,0 +1,116 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "errors" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "strings" + "sync" +) + +// ServerFactory is a fake server for instances of the armresources.ClientFactory type. +type ServerFactory struct { + Server Server + DeploymentOperationsServer DeploymentOperationsServer + DeploymentsServer DeploymentsServer + OperationsServer OperationsServer + ProviderResourceTypesServer ProviderResourceTypesServer + ProvidersServer ProvidersServer + ResourceGroupsServer ResourceGroupsServer + TagsServer TagsServer +} + +// NewServerFactoryTransport creates a new instance of ServerFactoryTransport with the provided implementation. +// The returned ServerFactoryTransport instance is connected to an instance of armresources.ClientFactory via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewServerFactoryTransport(srv *ServerFactory) *ServerFactoryTransport { + return &ServerFactoryTransport{ + srv: srv, + } +} + +// ServerFactoryTransport connects instances of armresources.ClientFactory to instances of ServerFactory. +// Don't use this type directly, use NewServerFactoryTransport instead. +type ServerFactoryTransport struct { + srv *ServerFactory + trMu sync.Mutex + trServer *ServerTransport + trDeploymentOperationsServer *DeploymentOperationsServerTransport + trDeploymentsServer *DeploymentsServerTransport + trOperationsServer *OperationsServerTransport + trProviderResourceTypesServer *ProviderResourceTypesServerTransport + trProvidersServer *ProvidersServerTransport + trResourceGroupsServer *ResourceGroupsServerTransport + trTagsServer *TagsServerTransport +} + +// Do implements the policy.Transporter interface for ServerFactoryTransport. +func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + client := method[:strings.Index(method, ".")] + var resp *http.Response + var err error + + switch client { + case "Client": + initServer(s, &s.trServer, func() *ServerTransport { return NewServerTransport(&s.srv.Server) }) + resp, err = s.trServer.Do(req) + case "DeploymentOperationsClient": + initServer(s, &s.trDeploymentOperationsServer, func() *DeploymentOperationsServerTransport { + return NewDeploymentOperationsServerTransport(&s.srv.DeploymentOperationsServer) + }) + resp, err = s.trDeploymentOperationsServer.Do(req) + case "DeploymentsClient": + initServer(s, &s.trDeploymentsServer, func() *DeploymentsServerTransport { return NewDeploymentsServerTransport(&s.srv.DeploymentsServer) }) + resp, err = s.trDeploymentsServer.Do(req) + case "OperationsClient": + initServer(s, &s.trOperationsServer, func() *OperationsServerTransport { return NewOperationsServerTransport(&s.srv.OperationsServer) }) + resp, err = s.trOperationsServer.Do(req) + case "ProviderResourceTypesClient": + initServer(s, &s.trProviderResourceTypesServer, func() *ProviderResourceTypesServerTransport { + return NewProviderResourceTypesServerTransport(&s.srv.ProviderResourceTypesServer) + }) + resp, err = s.trProviderResourceTypesServer.Do(req) + case "ProvidersClient": + initServer(s, &s.trProvidersServer, func() *ProvidersServerTransport { return NewProvidersServerTransport(&s.srv.ProvidersServer) }) + resp, err = s.trProvidersServer.Do(req) + case "ResourceGroupsClient": + initServer(s, &s.trResourceGroupsServer, func() *ResourceGroupsServerTransport { + return NewResourceGroupsServerTransport(&s.srv.ResourceGroupsServer) + }) + resp, err = s.trResourceGroupsServer.Do(req) + case "TagsClient": + initServer(s, &s.trTagsServer, func() *TagsServerTransport { return NewTagsServerTransport(&s.srv.TagsServer) }) + resp, err = s.trTagsServer.Do(req) + default: + err = fmt.Errorf("unhandled client %s", client) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func initServer[T any](s *ServerFactoryTransport, dst **T, src func() *T) { + s.trMu.Lock() + if *dst == nil { + *dst = src() + } + s.trMu.Unlock() +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/tags_server.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/tags_server.go index 94d664942..91a1dfa51 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/tags_server.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/tags_server.go @@ -129,11 +129,11 @@ func (t *TagsServerTransport) dispatchCreateOrUpdate(req *http.Request) (*http.R if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - tagNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("tagName")]) + tagNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("tagName")]) if err != nil { return nil, err } - respr, errRespr := t.srv.CreateOrUpdate(req.Context(), tagNameUnescaped, nil) + respr, errRespr := t.srv.CreateOrUpdate(req.Context(), tagNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -152,7 +152,7 @@ func (t *TagsServerTransport) dispatchCreateOrUpdateAtScope(req *http.Request) ( if t.srv.CreateOrUpdateAtScope == nil { return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateAtScope not implemented")} } - const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/tags/default` + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/tags/default` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -162,11 +162,11 @@ func (t *TagsServerTransport) dispatchCreateOrUpdateAtScope(req *http.Request) ( if err != nil { return nil, err } - scopeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) + scopeParam, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) if err != nil { return nil, err } - respr, errRespr := t.srv.CreateOrUpdateAtScope(req.Context(), scopeUnescaped, body, nil) + respr, errRespr := t.srv.CreateOrUpdateAtScope(req.Context(), scopeParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -191,15 +191,15 @@ func (t *TagsServerTransport) dispatchCreateOrUpdateValue(req *http.Request) (*h if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - tagNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("tagName")]) + tagNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("tagName")]) if err != nil { return nil, err } - tagValueUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("tagValue")]) + tagValueParam, err := url.PathUnescape(matches[regex.SubexpIndex("tagValue")]) if err != nil { return nil, err } - respr, errRespr := t.srv.CreateOrUpdateValue(req.Context(), tagNameUnescaped, tagValueUnescaped, nil) + respr, errRespr := t.srv.CreateOrUpdateValue(req.Context(), tagNameParam, tagValueParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -224,11 +224,11 @@ func (t *TagsServerTransport) dispatchDelete(req *http.Request) (*http.Response, if matches == nil || len(matches) < 2 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - tagNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("tagName")]) + tagNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("tagName")]) if err != nil { return nil, err } - respr, errRespr := t.srv.Delete(req.Context(), tagNameUnescaped, nil) + respr, errRespr := t.srv.Delete(req.Context(), tagNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -247,17 +247,17 @@ func (t *TagsServerTransport) dispatchDeleteAtScope(req *http.Request) (*http.Re if t.srv.DeleteAtScope == nil { return nil, &nonRetriableError{errors.New("fake for method DeleteAtScope not implemented")} } - const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/tags/default` + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/tags/default` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - scopeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) + scopeParam, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) if err != nil { return nil, err } - respr, errRespr := t.srv.DeleteAtScope(req.Context(), scopeUnescaped, nil) + respr, errRespr := t.srv.DeleteAtScope(req.Context(), scopeParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -282,15 +282,15 @@ func (t *TagsServerTransport) dispatchDeleteValue(req *http.Request) (*http.Resp if matches == nil || len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - tagNameUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("tagName")]) + tagNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("tagName")]) if err != nil { return nil, err } - tagValueUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("tagValue")]) + tagValueParam, err := url.PathUnescape(matches[regex.SubexpIndex("tagValue")]) if err != nil { return nil, err } - respr, errRespr := t.srv.DeleteValue(req.Context(), tagNameUnescaped, tagValueUnescaped, nil) + respr, errRespr := t.srv.DeleteValue(req.Context(), tagNameParam, tagValueParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -309,17 +309,17 @@ func (t *TagsServerTransport) dispatchGetAtScope(req *http.Request) (*http.Respo if t.srv.GetAtScope == nil { return nil, &nonRetriableError{errors.New("fake for method GetAtScope not implemented")} } - const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/tags/default` + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/tags/default` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - scopeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) + scopeParam, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) if err != nil { return nil, err } - respr, errRespr := t.srv.GetAtScope(req.Context(), scopeUnescaped, nil) + respr, errRespr := t.srv.GetAtScope(req.Context(), scopeParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -371,7 +371,7 @@ func (t *TagsServerTransport) dispatchUpdateAtScope(req *http.Request) (*http.Re if t.srv.UpdateAtScope == nil { return nil, &nonRetriableError{errors.New("fake for method UpdateAtScope not implemented")} } - const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/tags/default` + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Resources/tags/default` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) if matches == nil || len(matches) < 1 { @@ -381,11 +381,11 @@ func (t *TagsServerTransport) dispatchUpdateAtScope(req *http.Request) (*http.Re if err != nil { return nil, err } - scopeUnescaped, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) + scopeParam, err := url.PathUnescape(matches[regex.SubexpIndex("scope")]) if err != nil { return nil, err } - respr, errRespr := t.srv.UpdateAtScope(req.Context(), scopeUnescaped, body, nil) + respr, errRespr := t.srv.UpdateAtScope(req.Context(), scopeParam, body, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/time_rfc3339.go index 45fe10cbc..b0535a7b6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake/time_rfc3339.go @@ -18,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -70,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/models_serde.go index fe07f1f2d..5c6e3ac77 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/models_serde.go @@ -513,7 +513,7 @@ func (d DeploymentOperationProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "statusCode", d.StatusCode) populate(objectMap, "statusMessage", d.StatusMessage) populate(objectMap, "targetResource", d.TargetResource) - populateTimeRFC3339(objectMap, "timestamp", d.Timestamp) + populateDateTimeRFC3339(objectMap, "timestamp", d.Timestamp) return json.Marshal(objectMap) } @@ -554,7 +554,7 @@ func (d *DeploymentOperationProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "TargetResource", &d.TargetResource) delete(rawMsg, key) case "timestamp": - err = unpopulateTimeRFC3339(val, "Timestamp", &d.Timestamp) + err = unpopulateDateTimeRFC3339(val, "Timestamp", &d.Timestamp) delete(rawMsg, key) } if err != nil { @@ -668,7 +668,7 @@ func (d DeploymentPropertiesExtended) MarshalJSON() ([]byte, error) { populate(objectMap, "provisioningState", d.ProvisioningState) populate(objectMap, "templateHash", d.TemplateHash) populate(objectMap, "templateLink", d.TemplateLink) - populateTimeRFC3339(objectMap, "timestamp", d.Timestamp) + populateDateTimeRFC3339(objectMap, "timestamp", d.Timestamp) populate(objectMap, "validatedResources", d.ValidatedResources) return json.Marshal(objectMap) } @@ -728,7 +728,7 @@ func (d *DeploymentPropertiesExtended) UnmarshalJSON(data []byte) error { err = unpopulate(val, "TemplateLink", &d.TemplateLink) delete(rawMsg, key) case "timestamp": - err = unpopulateTimeRFC3339(val, "Timestamp", &d.Timestamp) + err = unpopulateDateTimeRFC3339(val, "Timestamp", &d.Timestamp) delete(rawMsg, key) case "validatedResources": err = unpopulate(val, "ValidatedResources", &d.ValidatedResources) @@ -1126,8 +1126,8 @@ func (g *GenericResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GenericResourceExpanded. func (g GenericResourceExpanded) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "changedTime", g.ChangedTime) - populateTimeRFC3339(objectMap, "createdTime", g.CreatedTime) + populateDateTimeRFC3339(objectMap, "changedTime", g.ChangedTime) + populateDateTimeRFC3339(objectMap, "createdTime", g.CreatedTime) populate(objectMap, "extendedLocation", g.ExtendedLocation) populate(objectMap, "id", g.ID) populate(objectMap, "identity", g.Identity) @@ -1154,10 +1154,10 @@ func (g *GenericResourceExpanded) UnmarshalJSON(data []byte) error { var err error switch key { case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &g.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &g.ChangedTime) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &g.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &g.CreatedTime) delete(rawMsg, key) case "extendedLocation": err = unpopulate(val, "ExtendedLocation", &g.ExtendedLocation) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/operations_client.go index 326aadab0..e0fc6b961 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/operations_client.go @@ -27,7 +27,7 @@ type OperationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - cl, err := arm.NewClient(moduleName+".OperationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,23 +48,16 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption }, Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return OperationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/providerresourcetypes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/providerresourcetypes_client.go index 7f160860a..a64c08f02 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/providerresourcetypes_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/providerresourcetypes_client.go @@ -32,7 +32,7 @@ type ProviderResourceTypesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewProviderResourceTypesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProviderResourceTypesClient, error) { - cl, err := arm.NewClient(moduleName+".ProviderResourceTypesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/providers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/providers_client.go index 21c52166a..e1612d160 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/providers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/providers_client.go @@ -32,7 +32,7 @@ type ProvidersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewProvidersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProvidersClient, error) { - cl, err := arm.NewClient(moduleName+".ProvidersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -175,23 +175,16 @@ func (client *ProvidersClient) NewListPager(options *ProvidersClientListOptions) }, Fetcher: func(ctx context.Context, page *ProvidersClientListResponse) (ProvidersClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProvidersClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return ProvidersClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ProvidersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProvidersClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), @@ -240,23 +233,16 @@ func (client *ProvidersClient) NewListAtTenantScopePager(options *ProvidersClien }, Fetcher: func(ctx context.Context, page *ProvidersClientListAtTenantScopeResponse) (ProvidersClientListAtTenantScopeResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProvidersClient.NewListAtTenantScopePager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listAtTenantScopeCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAtTenantScopeCreateRequest(ctx, options) + }, nil) if err != nil { return ProvidersClientListAtTenantScopeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ProvidersClientListAtTenantScopeResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProvidersClientListAtTenantScopeResponse{}, runtime.NewResponseError(resp) - } return client.listAtTenantScopeHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/resourcegroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/resourcegroups_client.go index 123bf47a1..b228d9f64 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/resourcegroups_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/resourcegroups_client.go @@ -33,7 +33,7 @@ type ResourceGroupsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewResourceGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceGroupsClient, error) { - cl, err := arm.NewClient(moduleName+".ResourceGroupsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -172,10 +172,14 @@ func (client *ResourceGroupsClient) BeginDelete(ctx context.Context, resourceGro if err != nil { return nil, err } - poller, err := runtime.NewPoller[ResourceGroupsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ResourceGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ResourceGroupsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ResourceGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -246,10 +250,13 @@ func (client *ResourceGroupsClient) BeginExportTemplate(ctx context.Context, res } poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ResourceGroupsClientExportTemplateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) return poller, err } else { - return runtime.NewPollerFromResumeToken[ResourceGroupsClientExportTemplateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ResourceGroupsClientExportTemplateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -373,23 +380,16 @@ func (client *ResourceGroupsClient) NewListPager(options *ResourceGroupsClientLi }, Fetcher: func(ctx context.Context, page *ResourceGroupsClientListResponse) (ResourceGroupsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceGroupsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return ResourceGroupsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ResourceGroupsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGroupsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/tags_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/tags_client.go index caa54194a..b6d0fc249 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/tags_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/tags_client.go @@ -32,7 +32,7 @@ type TagsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewTagsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TagsClient, error) { - cl, err := arm.NewClient(moduleName+".TagsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -441,23 +441,16 @@ func (client *TagsClient) NewListPager(options *TagsClientListOptions) *runtime. }, Fetcher: func(ctx context.Context, page *TagsClientListResponse) (TagsClientListResponse, error) { ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TagsClient.NewListPager") - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return TagsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return TagsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TagsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, Tracer: client.internal.Tracer(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/time_rfc3339.go index b4726b97b..5026e349b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/time_rfc3339.go @@ -18,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -70,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/vendor/modules.txt b/vendor/modules.txt index ca6c3a05f..2fb092f1a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -37,15 +37,15 @@ github.com/Azure/azure-sdk-for-go/sdk/internal/log github.com/Azure/azure-sdk-for-go/sdk/internal/poller github.com/Azure/azure-sdk-for-go/sdk/internal/temporal github.com/Azure/azure-sdk-for-go/sdk/internal/uuid -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.3.0-beta.2 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.3.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/fake -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering v1.2.0-beta.3 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering/fake -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0-beta.1 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake @@ -53,7 +53,7 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4/fake ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph/fake -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0-beta.3 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/fake From f33e082170c4d7b36d75ebb948fe7a4439f567ac Mon Sep 17 00:00:00 2001 From: Madhav Bhargava Date: Mon, 27 Nov 2023 13:17:36 +0530 Subject: [PATCH 3/4] fixed vm name extraction from list machines, added unit tests --- pkg/azure/access/helpers/vm.go | 8 +- pkg/azure/provider/helpers/driver.go | 50 +++---- pkg/azure/provider/provider.go | 18 ++- pkg/azure/provider/provider_test.go | 195 ++++++++++++++------------- pkg/azure/utils/names.go | 4 +- 5 files changed, 150 insertions(+), 125 deletions(-) diff --git a/pkg/azure/access/helpers/vm.go b/pkg/azure/access/helpers/vm.go index f8656eb7a..fcc3c168a 100644 --- a/pkg/azure/access/helpers/vm.go +++ b/pkg/azure/access/helpers/vm.go @@ -60,15 +60,11 @@ func GetVirtualMachine(ctx context.Context, vmClient *armcompute.VirtualMachines // DeleteVirtualMachine deletes the Virtual Machine with the give name and belonging to the passed in resource group. // If cascade delete is set for associated NICs and Disks then these resources will also be deleted along with the VM. // NOTE: All calls to this Azure API are instrumented as prometheus metric. -func DeleteVirtualMachine(ctx context.Context, vmAccess *armcompute.VirtualMachinesClient, resourceGroup, vmName string, forceDelete bool) (err error) { +func DeleteVirtualMachine(ctx context.Context, vmAccess *armcompute.VirtualMachinesClient, resourceGroup, vmName string) (err error) { defer instrument.RecordAzAPIMetric(err, vmDeleteServiceLabel, time.Now()) delCtx, cancelFn := context.WithTimeout(ctx, defaultDeleteVMTimeout) defer cancelFn() - deleteOptions := armcompute.VirtualMachinesClientBeginDeleteOptions{} - if forceDelete { - deleteOptions.ForceDeletion = &forceDelete - } - poller, err := vmAccess.BeginDelete(delCtx, resourceGroup, vmName, &deleteOptions) + poller, err := vmAccess.BeginDelete(delCtx, resourceGroup, vmName, nil) if err != nil { errors.LogAzAPIError(err, "Failed to trigger delete of VM [ResourceGroup: %s, VMName: %s]", resourceGroup, vmName) return diff --git a/pkg/azure/provider/helpers/driver.go b/pkg/azure/provider/helpers/driver.go index 0e1e32321..94dd60c8a 100644 --- a/pkg/azure/provider/helpers/driver.go +++ b/pkg/azure/provider/helpers/driver.go @@ -163,39 +163,43 @@ func CheckAndDeleteLeftoverNICsAndDisks(ctx context.Context, factory access.Fact return nil } -// UpdateCascadeDeleteOptionsAndDeleteVM updates the VirtualMachine properties and sets cascade delete options for NIC's and DISK's if it is not already set. +// UpdateCascadeDeleteOptions updates the VirtualMachine properties and sets cascade delete options for NIC's and DISK's if it is not already set. // Once that is set then it deletes the VM. This will ensure that no separate calls to delete each NIC and DISK are made as they will get deleted along with the VM in one single atomic call. -func UpdateCascadeDeleteOptionsAndDeleteVM(ctx context.Context, vmAccess *armcompute.VirtualMachinesClient, resourceGroup string, vm *armcompute.VirtualMachine) error { +func UpdateCascadeDeleteOptions(ctx context.Context, vmAccess *armcompute.VirtualMachinesClient, resourceGroup string, vm *armcompute.VirtualMachine) error { vmName := *vm.Name - if isVirtualMachineInTerminalState(vm) { - klog.Infof("VM: [ResourceGroup: %s, Name: %s] is stuck in terminal state, force deleting the VM", resourceGroup, vmName) - if err := accesshelpers.DeleteVirtualMachine(ctx, vmAccess, resourceGroup, vmName, true); err != nil { - return status.WrapError(codes.Internal, fmt.Sprintf("Failed to delete VM: [ResourceGroup: %s, Name: %s], Err: %v", resourceGroup, vmName, err), err) + if canUpdateVirtualMachine(vm) { + vmUpdateParams := computeDeleteOptionUpdatesForNICsAndDisksIfRequired(resourceGroup, vm) + if vmUpdateParams != nil { + // update the VM and set cascade delete on NIC and Disks (OSDisk and DataDisks) if not already set and then trigger VM deletion. + klog.V(4).Infof("Updating cascade deletion options for VM: [ResourceGroup: %s, Name: %s] resources", resourceGroup, vmName) + err := accesshelpers.SetCascadeDeleteForNICsAndDisks(ctx, vmAccess, resourceGroup, vmName, vmUpdateParams) + if err != nil { + return status.WrapError(codes.Internal, fmt.Sprintf("Failed to update cascade delete of associated resources for VM: [ResourceGroup: %s, Name: %s], Err: %v", resourceGroup, vmName, err), err) + } } - return nil + } else { + return status.New(codes.Internal, fmt.Sprintf("Cannot update VM: [ResourceGroup: %s, Name: %s]. Either the VM has provisionState set to Failed or there are one or more data disks that are marked for detachment, update call to this VM will fail. Skipping the update call.", resourceGroup, vmName)) } + return nil +} - vmUpdateParams := computeDeleteOptionUpdatesForNICsAndDisksIfRequired(resourceGroup, vm) - if vmUpdateParams != nil { - if utils.DataDisksMarkedForDetachment(vm) { - return status.New(codes.Internal, fmt.Sprintf("Cannot update VM: [ResourceGroup: %s, Name: %s]. There are one or more data disks that are marked for detachment, update to this VM will fail.", resourceGroup, vmName)) - } - // update the VM and set cascade delete on NIC and Disks (OSDisk and DataDisks) if not already set and then trigger VM deletion. - klog.V(4).Infof("Updating cascade deletion options for VM: [ResourceGroup: %s, Name: %s] resources", resourceGroup, vmName) - err := accesshelpers.SetCascadeDeleteForNICsAndDisks(ctx, vmAccess, resourceGroup, vmName, vmUpdateParams) - if err != nil { - return status.WrapError(codes.Internal, fmt.Sprintf("Failed to update cascade delete of associated resources for VM: [ResourceGroup: %s, Name: %s], Err: %v", resourceGroup, vmName, err), err) - } - } - err := accesshelpers.DeleteVirtualMachine(ctx, vmAccess, resourceGroup, vmName, false) +// DeleteVirtualMachine deletes the VirtualMachine, if there is any error it will wrap it into a status.Status error. +func DeleteVirtualMachine(ctx context.Context, vmAccess *armcompute.VirtualMachinesClient, resourceGroup string, vmName string) error { + klog.Infof("Deleting VM: [ResourceGroup: %s, Name: %s]", resourceGroup, vmName) + err := accesshelpers.DeleteVirtualMachine(ctx, vmAccess, resourceGroup, vmName) if err != nil { return status.WrapError(codes.Internal, fmt.Sprintf("Failed to delete VM: [ResourceGroup: %s, Name: %s], Err: %v", resourceGroup, vmName, err), err) } return nil } -func isVirtualMachineInTerminalState(vm *armcompute.VirtualMachine) bool { - return vm.Properties != nil && vm.Properties.ProvisioningState != nil && strings.ToLower(*vm.Properties.ProvisioningState) == "failed" +// IsVirtualMachineInTerminalState checks if the provisioningState of the VM is set to Failed. +func IsVirtualMachineInTerminalState(vm *armcompute.VirtualMachine) bool { + return vm.Properties != nil && vm.Properties.ProvisioningState != nil && strings.ToLower(*vm.Properties.ProvisioningState) == strings.ToLower(utils.ProvisioningStateFailed) +} + +func canUpdateVirtualMachine(vm *armcompute.VirtualMachine) bool { + return IsVirtualMachineInTerminalState(vm) || utils.DataDisksMarkedForDetachment(vm) } // computeDeleteOptionUpdatesForNICsAndDisksIfRequired computes changes required to set cascade delete options for NICs, OSDisk and DataDisks. @@ -238,7 +242,7 @@ func computeDeleteOptionUpdatesForNICsAndDisksIfRequired(resourceGroup string, v } } if updatedOSDisk != nil { - klog.Infof("Identified OSDisk: %s requiring DeleteOption update for VM: [ResourceGroup: %s, Name: %s]", updatedOSDisk.Name, resourceGroup, vmName) + klog.Infof("Identified OSDisk: %s requiring DeleteOption update for VM: [ResourceGroup: %s, Name: %s]", *updatedOSDisk.Name, resourceGroup, vmName) vmUpdateParams.Properties.StorageProfile.OSDisk = updatedOSDisk } if !utils.IsSliceNilOrEmpty(updatedDataDisks) { diff --git a/pkg/azure/provider/provider.go b/pkg/azure/provider/provider.go index 683c4298a..be866d34a 100644 --- a/pkg/azure/provider/provider.go +++ b/pkg/azure/provider/provider.go @@ -141,9 +141,21 @@ func (d defaultDriver) DeleteMachine(ctx context.Context, req *driver.DeleteMach return } } else { - err = helpers.UpdateCascadeDeleteOptionsAndDeleteVM(ctx, vmAccess, resourceGroup, vm) - if err != nil { - return + if helpers.IsVirtualMachineInTerminalState(vm) { + klog.Infof("VM: [ResourceGroup: %s, Name: %s] has ProvisionState set to Failed, will delete the VM and all its associated resources.", resourceGroup, vmName) + if err = helpers.DeleteVirtualMachine(ctx, vmAccess, resourceGroup, vmName); err != nil { + return + } + if err = helpers.CheckAndDeleteLeftoverNICsAndDisks(ctx, d.factory, vmName, connectConfig, providerSpec); err != nil { + return + } + } else { + if err = helpers.UpdateCascadeDeleteOptions(ctx, vmAccess, resourceGroup, vm); err != nil { + return + } + if err = helpers.DeleteVirtualMachine(ctx, vmAccess, resourceGroup, vmName); err != nil { + return + } } klog.Infof("Successfully deleted all Machine resources[VM, NIC, Disks] for [ResourceGroup: %s, VMName: %s]", providerSpec.ResourceGroup, vmName) } diff --git a/pkg/azure/provider/provider_test.go b/pkg/azure/provider/provider_test.go index 63debf947..3716f41b5 100644 --- a/pkg/azure/provider/provider_test.go +++ b/pkg/azure/provider/provider_test.go @@ -43,7 +43,7 @@ const ( testResourceGroupName = "test-rg" testShootNs = "test-shoot-ns" testWorkerPool0Name = "test-worker-pool-0" - testDataDiskName = "test-data-disk" + testDataDiskName = "test-dd" ) func TestDeleteMachineWhenVMExists(t *testing.T) { @@ -257,71 +257,71 @@ func TestDeleteMachineWhenVMDoesNotExist(t *testing.T) { } } -//func TestForceDeleteVMInTerminalState(t *testing.T) { -// const vmName = "test-vm-0" -// -// table := []struct { -// description string -// cascadeDeleteOpts fakes.CascadeDeleteOpts -// numDataDisks int -// checkClusterStateFn func(g *WithT, ctx context.Context, factory fakes.Factory, vmName string, dataDiskNames []string) -// }{ -// { -// "should only delete the VM since no cascade delete is set for NIC and Disks", -// fakes.CascadeDeleteOpts{}, 1, -// func(g *WithT, ctx context.Context, factory fakes.Factory, vmName string, dataDiskNames []string) { -// checkClusterStateAndGetMachineResources(g, ctx, factory, vmName, false, true, true, dataDiskNames, true, true) -// }, -// }, -// { -// "should delete the VM and all its associated resources when cascade delete is set", -// fakes.CascadeDeleteAllResources, 1, -// func(g *WithT, ctx context.Context, factory fakes.Factory, vmName string, dataDiskNames []string) { -// checkClusterStateAndGetMachineResources(g, ctx, factory, vmName, false, false, false, dataDiskNames, false, false) -// }, -// }, -// } -// -// g := NewWithT(t) -// for _, entry := range table { -// t.Run(entry.description, func(t *testing.T) { -// ctx := context.Background() -// // create provider spec -// providerSpecBuilder := testhelp.NewProviderSpecBuilder(testResourceGroupName, testShootNs, testWorkerPool0Name).WithDefaultValues() -// if entry.numDataDisks > 0 { -// //Add data disks -// providerSpecBuilder.WithDataDisks(testDataDiskName, entry.numDataDisks) -// } -// providerSpec := providerSpecBuilder.Build() -// // create cluster state -// clusterState := fakes.NewClusterState(providerSpec) -// clusterState.AddMachineResources(fakes.NewMachineResourcesBuilder(providerSpec, vmName).WithCascadeDeleteOptions(entry.cascadeDeleteOpts).BuildWith(true, true, true, true, nil)) -// clusterState.MarkVirtualMachineInTerminalState(vmName) -// -// // create fake factory -// fakeFactory := createDefaultFakeFactoryForDeleteMachine(g, providerSpec.ResourceGroup, clusterState) -// -// // Create machine and machine class to be used to create DeleteMachineRequest -// machineClass, err := fakes.CreateMachineClass(providerSpec, to.Ptr(testResourceGroupName)) -// g.Expect(err).To(BeNil()) -// machine := &v1alpha1.Machine{ -// ObjectMeta: fakes.NewMachineObjectMeta(testShootNs, vmName), -// } -// -// // Test -// //---------------------------------------------------------------------------- -// testDriver := NewDefaultDriver(fakeFactory) -// _, err = testDriver.DeleteMachine(ctx, &driver.DeleteMachineRequest{ -// Machine: machine, -// MachineClass: machineClass, -// Secret: fakes.CreateProviderSecret(), -// }) -// g.Expect(err).To(BeNil()) -// dataDiskNames := testhelp.CreateDataDiskNames(vmName, providerSpec) -// entry.checkClusterStateFn(g, ctx, *fakeFactory, vmName, dataDiskNames) -// }) -// } -//} +func TestDeleteVMInTerminalState(t *testing.T) { + const vmName = "test-vm-0" + + table := []struct { + description string + cascadeDeleteOpts fakes.CascadeDeleteOpts + numDataDisks int + checkClusterStateFn func(g *WithT, ctx context.Context, factory fakes.Factory, vmName string, dataDiskNames []string) + }{ + { + "should delete the VM even if no cascade delete is set for NIC and Disks", + fakes.CascadeDeleteOpts{}, 1, + func(g *WithT, ctx context.Context, factory fakes.Factory, vmName string, dataDiskNames []string) { + checkClusterStateAndGetMachineResources(g, ctx, factory, vmName, false, false, false, dataDiskNames, false, false) + }, + }, + { + "should delete the VM and all its associated resources when cascade delete is set", + fakes.CascadeDeleteAllResources, 1, + func(g *WithT, ctx context.Context, factory fakes.Factory, vmName string, dataDiskNames []string) { + checkClusterStateAndGetMachineResources(g, ctx, factory, vmName, false, false, false, dataDiskNames, false, false) + }, + }, + } + + g := NewWithT(t) + for _, entry := range table { + t.Run(entry.description, func(t *testing.T) { + ctx := context.Background() + // create provider spec + providerSpecBuilder := testhelp.NewProviderSpecBuilder(testResourceGroupName, testShootNs, testWorkerPool0Name).WithDefaultValues() + if entry.numDataDisks > 0 { + //Add data disks + providerSpecBuilder.WithDataDisks(testDataDiskName, entry.numDataDisks) + } + providerSpec := providerSpecBuilder.Build() + // create cluster state + clusterState := fakes.NewClusterState(providerSpec) + clusterState.AddMachineResources(fakes.NewMachineResourcesBuilder(providerSpec, vmName).WithCascadeDeleteOptions(entry.cascadeDeleteOpts).BuildWith(true, true, true, true, nil)) + clusterState.MarkVirtualMachineInTerminalState(vmName) + + // create fake factory + fakeFactory := createDefaultFakeFactoryForDeleteMachine(g, providerSpec.ResourceGroup, clusterState) + + // Create machine and machine class to be used to create DeleteMachineRequest + machineClass, err := fakes.CreateMachineClass(providerSpec, to.Ptr(testResourceGroupName)) + g.Expect(err).To(BeNil()) + machine := &v1alpha1.Machine{ + ObjectMeta: fakes.NewMachineObjectMeta(testShootNs, vmName), + } + + // Test + //---------------------------------------------------------------------------- + testDriver := NewDefaultDriver(fakeFactory) + _, err = testDriver.DeleteMachine(ctx, &driver.DeleteMachineRequest{ + Machine: machine, + MachineClass: machineClass, + Secret: fakes.CreateProviderSecret(), + }) + g.Expect(err).To(BeNil()) + dataDiskNames := testhelp.CreateDataDiskNames(vmName, providerSpec) + entry.checkClusterStateFn(g, ctx, *fakeFactory, vmName, dataDiskNames) + }) + } +} func TestDeleteExistingVMWithDataDisksInDetachment(t *testing.T) { const vmName = "test-vm-0" @@ -591,16 +591,19 @@ func TestGetMachineStatus(t *testing.T) { func TestListMachines(t *testing.T) { type machineResourcesTestSpec struct { - vmName string - vmPresent bool - osDiskPresent bool - nicPresent bool + vmName string + vmPresent bool + osDiskPresent bool + dataDiskPresent bool + nicPresent bool // if present this will overwrite the tags that are borrowed from provider spec for this machine resource VM. Only specify this when vmPresent is true else it will never reflect. vmTags map[string]string // if present this will overwrite the tags that are borrowed from provider spec for this machine resource NIC. Only specify this when nicPresent is true else it will never reflect. nicTags map[string]string // if present this will overwrite the tags that are borrowed from provider spec for this machine resource OSDisk. Only specify this when nicPresent is true else it will never reflect. osDiskTags map[string]string + // if present this will overwrite the tags that are borrowed from provider spec for this machine resource DataDisks. Only specify this when nicPresent is true else it will never reflect. + dataDiskTags map[string]string } const nonMatchingShootNs = "non-matching-shoot-ns" @@ -614,53 +617,58 @@ func TestListMachines(t *testing.T) { description string mrTestSpecs []machineResourcesTestSpec apiBehaviorSpec *fakes.APIBehaviorSpec + numDataDisks int expectedResult []string expectedErr bool }{ { - "should return no result if no resources exist", nil, nil, []string{}, false, + "should return no result if no resources exist", nil, nil, 0, []string{}, false, }, { "should return all vm names where vms exist", []machineResourcesTestSpec{ - {"vm-0", true, true, true, nil, nil, nil}, - {"vm-1", true, true, true, nil, nil, nil}, - }, nil, []string{"vm-0", "vm-1"}, false, + {"vm-0", true, true, true, true, nil, nil, nil, nil}, + {"vm-1", true, true, true, true, nil, nil, nil, nil}, + }, nil, 1, []string{"vm-0", "vm-1"}, false, }, { "should return vm names only for vms where vm does not exist but a nic exists", []machineResourcesTestSpec{ - {"vm-0", false, false, false, nil, nil, nil}, - {"vm-1", false, false, true, nil, nil, nil}, - }, nil, []string{"vm-1"}, false, + {"vm-0", false, false, false, false, nil, nil, nil, nil}, + {"vm-1", false, false, true, false, nil, nil, nil, nil}, + }, nil, 1, []string{"vm-1"}, false, }, { - "should return vm names only for vms where vm does not exist but an osdisk exists", + "should return vm names only for vms where vm does not exist but an OSDisk exists", []machineResourcesTestSpec{ - {"vm-0", false, false, false, nil, nil, nil}, - {"vm-1", false, true, false, nil, nil, nil}, - }, nil, []string{"vm-1"}, false, + {"vm-0", false, false, false, false, nil, nil, nil, nil}, + {"vm-1", false, true, false, false, nil, nil, nil, nil}, + }, nil, 2, []string{"vm-1"}, false, }, { "should only return vms matching mandatory provider spec tags", []machineResourcesTestSpec{ - {"vm-0", true, true, true, nonMatchingTags, nonMatchingTags, nonMatchingTags}, - {"vm-1", true, true, true, nil, nil, nil}, - {"vm-2", true, true, true, nonMatchingTags, nonMatchingTags, nonMatchingTags}, - {"vm-3", true, true, true, nil, nil, nil}, - {"vm-4", true, true, true, nonMatchingTags, nil, nonMatchingTags}, - }, nil, []string{"vm-1", "vm-3", "vm-4"}, false, + {"vm-0", true, true, true, true, nonMatchingTags, nonMatchingTags, nonMatchingTags, nonMatchingTags}, + {"vm-1", true, true, true, true, nil, nil, nil, nil}, + {"vm-2", true, true, true, false, nonMatchingTags, nonMatchingTags, nonMatchingTags, nonMatchingTags}, + {"vm-3", true, true, true, false, nil, nil, nil, nil}, + {"vm-4", true, true, true, true, nonMatchingTags, nil, nonMatchingTags, nil}, + }, nil, 1, []string{"vm-1", "vm-3", "vm-4"}, false, }, } g := NewWithT(t) ctx := context.Background() - // create provider spec - providerSpec := testhelp.NewProviderSpecBuilder(testResourceGroupName, testShootNs, testWorkerPool0Name).WithDefaultValues().Build() - for _, entry := range table { t.Run(entry.description, func(t *testing.T) { + // create provider spec + providerSpecBuilder := testhelp.NewProviderSpecBuilder(testResourceGroupName, testShootNs, testWorkerPool0Name).WithDefaultValues() + if entry.numDataDisks > 0 { + //Add data disks + providerSpecBuilder.WithDataDisks(testDataDiskName, entry.numDataDisks) + } + providerSpec := providerSpecBuilder.Build() // initialize cluster state //---------------------------------------------------------------------------- // create cluster state @@ -671,7 +679,7 @@ func TestListMachines(t *testing.T) { if !mrTestSpec.vmPresent { testVMID = to.Ptr(fakes.CreateVirtualMachineID(testhelp.SubscriptionID, testResourceGroupName, mrTestSpec.vmName)) } - mr := fakes.NewMachineResourcesBuilder(providerSpec, mrTestSpec.vmName).BuildWith(mrTestSpec.vmPresent, mrTestSpec.nicPresent, mrTestSpec.osDiskPresent, false, testVMID) + mr := fakes.NewMachineResourcesBuilder(providerSpec, mrTestSpec.vmName).BuildWith(mrTestSpec.vmPresent, mrTestSpec.nicPresent, mrTestSpec.osDiskPresent, mrTestSpec.dataDiskPresent, testVMID) if mrTestSpec.vmPresent && mrTestSpec.vmTags != nil { mr.VM.Tags = utils.CreateResourceTags(mrTestSpec.vmTags) } @@ -681,6 +689,11 @@ func TestListMachines(t *testing.T) { if mrTestSpec.osDiskPresent && mrTestSpec.osDiskTags != nil { mr.OSDisk.Tags = utils.CreateResourceTags(mrTestSpec.osDiskTags) } + if mrTestSpec.dataDiskPresent && mrTestSpec.dataDiskTags != nil { + for _, dataDisk := range mr.DataDisks { + dataDisk.Tags = utils.CreateResourceTags(mrTestSpec.dataDiskTags) + } + } clusterState.AddMachineResources(mr) } } diff --git a/pkg/azure/utils/names.go b/pkg/azure/utils/names.go index 4835470c5..c23dea942 100644 --- a/pkg/azure/utils/names.go +++ b/pkg/azure/utils/names.go @@ -55,13 +55,13 @@ func CreateOSDiskName(vmName string) string { func CreateDataDiskName(vmName string, dataDisk api.AzureDataDisk) string { prefix := vmName suffix := GetDataDiskNameSuffix(dataDisk) - return fmt.Sprintf("%s-%s", prefix, suffix) + return fmt.Sprintf("%s%s", prefix, suffix) } // GetDataDiskNameSuffix creates the suffix based on an optional data disk name and required lun fields. func GetDataDiskNameSuffix(dataDisk api.AzureDataDisk) string { infix := getDataDiskInfix(dataDisk) - return fmt.Sprintf("%s%s", infix, DataDiskSuffix) + return fmt.Sprintf("-%s%s", infix, DataDiskSuffix) } func getDataDiskInfix(dataDisk api.AzureDataDisk) string { From e848e3d48b9e08a44d50d4d7daae40dd6042cf3c Mon Sep 17 00:00:00 2001 From: Madhav Bhargava Date: Mon, 27 Nov 2023 13:59:38 +0530 Subject: [PATCH 4/4] fixed unit test --- pkg/azure/provider/helpers/driver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/azure/provider/helpers/driver.go b/pkg/azure/provider/helpers/driver.go index 94dd60c8a..596070012 100644 --- a/pkg/azure/provider/helpers/driver.go +++ b/pkg/azure/provider/helpers/driver.go @@ -199,7 +199,7 @@ func IsVirtualMachineInTerminalState(vm *armcompute.VirtualMachine) bool { } func canUpdateVirtualMachine(vm *armcompute.VirtualMachine) bool { - return IsVirtualMachineInTerminalState(vm) || utils.DataDisksMarkedForDetachment(vm) + return !IsVirtualMachineInTerminalState(vm) && !utils.DataDisksMarkedForDetachment(vm) } // computeDeleteOptionUpdatesForNICsAndDisksIfRequired computes changes required to set cascade delete options for NICs, OSDisk and DataDisks.