From 4c254a29ace0b734d9ff522f582763a3152b9b9c Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Thu, 11 Jan 2024 11:00:36 +0100 Subject: [PATCH] dependencies: updating to `v0.20240111.1094251` of `github.com/hashicorp/go-azure-sdk` --- go.mod | 2 +- go.sum | 4 +- .../attacheddatabaseconfigurations/README.md | 4 +- .../id_cluster.go | 125 ---------------- .../method_checknameavailability_autorest.go | 5 +- .../method_listbycluster_autorest.go | 5 +- .../clusterprincipalassignments/README.md | 4 +- .../clusterprincipalassignments/id_cluster.go | 125 ---------------- .../method_checknameavailability_autorest.go | 5 +- .../method_list_autorest.go | 5 +- .../kusto/2023-08-15/clusters/README.md | 28 ++-- .../kusto/2023-08-15/clusters/id_cluster.go | 125 ---------------- .../method_addlanguageextensions_autorest.go | 7 +- .../method_createorupdate_autorest.go | 7 +- .../clusters/method_delete_autorest.go | 7 +- ...method_detachfollowerdatabases_autorest.go | 7 +- .../method_diagnosevirtualnetwork_autorest.go | 7 +- .../clusters/method_get_autorest.go | 5 +- .../method_listfollowerdatabases_autorest.go | 5 +- .../method_listlanguageextensions_autorest.go | 5 +- .../method_listskusbyresource_autorest.go | 5 +- .../clusters/method_migrate_autorest.go | 7 +- ...ethod_removelanguageextensions_autorest.go | 7 +- .../clusters/method_start_autorest.go | 7 +- .../clusters/method_stop_autorest.go | 7 +- .../clusters/method_update_autorest.go | 7 +- .../databaseprincipalassignments/README.md | 4 +- .../id_database.go | 134 ------------------ .../method_checknameavailability_autorest.go | 5 +- .../method_list_autorest.go | 5 +- .../kusto/2023-08-15/databases/README.md | 20 +-- .../kusto/2023-08-15/databases/id_cluster.go | 125 ---------------- .../kusto/2023-08-15/databases/id_database.go | 134 ------------------ .../method_addprincipals_autorest.go | 5 +- .../method_checknameavailability_autorest.go | 5 +- .../method_createorupdate_autorest.go | 7 +- .../method_databaseinvitefollower_autorest.go | 5 +- .../databases/method_delete_autorest.go | 7 +- .../databases/method_get_autorest.go | 5 +- .../method_listbycluster_autorest.go | 9 +- .../method_listprincipals_autorest.go | 5 +- .../method_removeprincipals_autorest.go | 5 +- .../databases/method_update_autorest.go | 7 +- .../2023-08-15/dataconnections/README.md | 6 +- .../2023-08-15/dataconnections/id_database.go | 134 ------------------ .../method_checknameavailability_autorest.go | 5 +- ...ethod_dataconnectionvalidation_autorest.go | 7 +- .../method_listbydatabase_autorest.go | 5 +- .../managedprivateendpoints/README.md | 4 +- .../managedprivateendpoints/id_cluster.go | 125 ---------------- .../method_checknameavailability_autorest.go | 5 +- .../method_list_autorest.go | 5 +- .../kusto/2023-08-15/scripts/README.md | 4 +- .../kusto/2023-08-15/scripts/id_database.go | 134 ------------------ .../method_checknameavailability_autorest.go | 5 +- .../scripts/method_listbydatabase_autorest.go | 5 +- vendor/modules.txt | 2 +- 57 files changed, 168 insertions(+), 1292 deletions(-) delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/id_cluster.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/id_cluster.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/id_cluster.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/id_database.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/id_cluster.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/id_database.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/id_database.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/id_cluster.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/id_database.go diff --git a/go.mod b/go.mod index e7eca0bd61c1..4a54f7360776 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/google/go-cmp v0.5.9 github.com/google/uuid v1.3.1 github.com/hashicorp/go-azure-helpers v0.65.0 - github.com/hashicorp/go-azure-sdk v0.20240110.1102249 + github.com/hashicorp/go-azure-sdk v0.20240111.1094251 github.com/hashicorp/go-hclog v1.5.0 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-uuid v1.0.3 diff --git a/go.sum b/go.sum index 36a60f4c8fc1..a6c7149f5a2b 100644 --- a/go.sum +++ b/go.sum @@ -114,8 +114,8 @@ github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/go-azure-helpers v0.12.0/go.mod h1:Zc3v4DNeX6PDdy7NljlYpnrdac1++qNW0I4U+ofGwpg= github.com/hashicorp/go-azure-helpers v0.65.0 h1:aOZV7HcxvqAlnaWJ/Fhfu321dXLs++TyBIVelWOb/8w= github.com/hashicorp/go-azure-helpers v0.65.0/go.mod h1:ELmZ65vzHJNTk6ml4jsPD+xq2gZb7t78D35s+XN02Kk= -github.com/hashicorp/go-azure-sdk v0.20240110.1102249 h1:KRTbLIOmyvJ/WTwAiXbbT878Mxka9pCuKGPyRgwUey4= -github.com/hashicorp/go-azure-sdk v0.20240110.1102249/go.mod h1:m5lGAt22BNeuIAgBZFnA7I9E4Gm9h4PflqFbR/Ey7Fs= +github.com/hashicorp/go-azure-sdk v0.20240111.1094251 h1:tBsbiZILcmyZe8kazO7lrt/2JX/iGqmAD9N+xqZhmXE= +github.com/hashicorp/go-azure-sdk v0.20240111.1094251/go.mod h1:m5lGAt22BNeuIAgBZFnA7I9E4Gm9h4PflqFbR/Ey7Fs= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/README.md index 60968ede583d..2146c96e8d36 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/README.md @@ -24,7 +24,7 @@ client.Client.Authorizer = authorizer ```go ctx := context.TODO() -id := attacheddatabaseconfigurations.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := attacheddatabaseconfigurations.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") payload := attacheddatabaseconfigurations.AttachedDatabaseConfigurationsCheckNameRequest{ // ... @@ -90,7 +90,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := attacheddatabaseconfigurations.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := attacheddatabaseconfigurations.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") read, err := client.ListByCluster(ctx, id) if err != nil { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/id_cluster.go deleted file mode 100644 index bc9f3f862b5a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/id_cluster.go +++ /dev/null @@ -1,125 +0,0 @@ -package attacheddatabaseconfigurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ClusterId{} - -// ClusterId is a struct representing the Resource ID for a Cluster -type ClusterId struct { - SubscriptionId string - ResourceGroupName string - ClusterName string -} - -// NewClusterID returns a new ClusterId struct -func NewClusterID(subscriptionId string, resourceGroupName string, clusterName string) ClusterId { - return ClusterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ClusterName: clusterName, - } -} - -// ParseClusterID parses 'input' into a ClusterId -func ParseClusterID(input string) (*ClusterId, error) { - parser := resourceids.NewParserFromResourceIdType(ClusterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseClusterIDInsensitively parses 'input' case-insensitively into a ClusterId -// note: this method should only be used for API response data and not user input -func ParseClusterIDInsensitively(input string) (*ClusterId, error) { - parser := resourceids.NewParserFromResourceIdType(ClusterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ClusterId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) - } - - return nil -} - -// ValidateClusterID checks that 'input' can be parsed as a Cluster ID -func ValidateClusterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseClusterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Cluster ID -func (id ClusterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Kusto/clusters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ClusterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Cluster ID -func (id ClusterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftKusto", "Microsoft.Kusto", "Microsoft.Kusto"), - resourceids.StaticSegment("staticClusters", "clusters", "clusters"), - resourceids.UserSpecifiedSegment("clusterName", "clusterValue"), - } -} - -// String returns a human-readable description of this Cluster ID -func (id ClusterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cluster Name: %q", id.ClusterName), - } - return fmt.Sprintf("Cluster (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_checknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_checknameavailability_autorest.go index 86109f857437..732d7ec501a4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_checknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_checknameavailability_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type CheckNameAvailabilityOperationResponse struct { } // CheckNameAvailability ... -func (c AttachedDatabaseConfigurationsClient) CheckNameAvailability(ctx context.Context, id ClusterId, input AttachedDatabaseConfigurationsCheckNameRequest) (result CheckNameAvailabilityOperationResponse, err error) { +func (c AttachedDatabaseConfigurationsClient) CheckNameAvailability(ctx context.Context, id commonids.KustoClusterId, input AttachedDatabaseConfigurationsCheckNameRequest) (result CheckNameAvailabilityOperationResponse, err error) { req, err := c.preparerForCheckNameAvailability(ctx, id, input) if err != nil { err = autorest.NewErrorWithError(err, "attacheddatabaseconfigurations.AttachedDatabaseConfigurationsClient", "CheckNameAvailability", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c AttachedDatabaseConfigurationsClient) CheckNameAvailability(ctx context. } // preparerForCheckNameAvailability prepares the CheckNameAvailability request. -func (c AttachedDatabaseConfigurationsClient) preparerForCheckNameAvailability(ctx context.Context, id ClusterId, input AttachedDatabaseConfigurationsCheckNameRequest) (*http.Request, error) { +func (c AttachedDatabaseConfigurationsClient) preparerForCheckNameAvailability(ctx context.Context, id commonids.KustoClusterId, input AttachedDatabaseConfigurationsCheckNameRequest) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_listbycluster_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_listbycluster_autorest.go index c116a66babc0..f84744f4f9cf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_listbycluster_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_listbycluster_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type ListByClusterOperationResponse struct { } // ListByCluster ... -func (c AttachedDatabaseConfigurationsClient) ListByCluster(ctx context.Context, id ClusterId) (result ListByClusterOperationResponse, err error) { +func (c AttachedDatabaseConfigurationsClient) ListByCluster(ctx context.Context, id commonids.KustoClusterId) (result ListByClusterOperationResponse, err error) { req, err := c.preparerForListByCluster(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "attacheddatabaseconfigurations.AttachedDatabaseConfigurationsClient", "ListByCluster", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c AttachedDatabaseConfigurationsClient) ListByCluster(ctx context.Context, } // preparerForListByCluster prepares the ListByCluster request. -func (c AttachedDatabaseConfigurationsClient) preparerForListByCluster(ctx context.Context, id ClusterId) (*http.Request, error) { +func (c AttachedDatabaseConfigurationsClient) preparerForListByCluster(ctx context.Context, id commonids.KustoClusterId) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/README.md index 4949282a2c90..aa1870a41efd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/README.md @@ -24,7 +24,7 @@ client.Client.Authorizer = authorizer ```go ctx := context.TODO() -id := clusterprincipalassignments.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := clusterprincipalassignments.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") payload := clusterprincipalassignments.ClusterPrincipalAssignmentCheckNameRequest{ // ... @@ -90,7 +90,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := clusterprincipalassignments.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := clusterprincipalassignments.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") read, err := client.List(ctx, id) if err != nil { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/id_cluster.go deleted file mode 100644 index d00fd75eab6e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/id_cluster.go +++ /dev/null @@ -1,125 +0,0 @@ -package clusterprincipalassignments - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ClusterId{} - -// ClusterId is a struct representing the Resource ID for a Cluster -type ClusterId struct { - SubscriptionId string - ResourceGroupName string - ClusterName string -} - -// NewClusterID returns a new ClusterId struct -func NewClusterID(subscriptionId string, resourceGroupName string, clusterName string) ClusterId { - return ClusterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ClusterName: clusterName, - } -} - -// ParseClusterID parses 'input' into a ClusterId -func ParseClusterID(input string) (*ClusterId, error) { - parser := resourceids.NewParserFromResourceIdType(ClusterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseClusterIDInsensitively parses 'input' case-insensitively into a ClusterId -// note: this method should only be used for API response data and not user input -func ParseClusterIDInsensitively(input string) (*ClusterId, error) { - parser := resourceids.NewParserFromResourceIdType(ClusterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ClusterId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) - } - - return nil -} - -// ValidateClusterID checks that 'input' can be parsed as a Cluster ID -func ValidateClusterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseClusterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Cluster ID -func (id ClusterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Kusto/clusters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ClusterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Cluster ID -func (id ClusterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftKusto", "Microsoft.Kusto", "Microsoft.Kusto"), - resourceids.StaticSegment("staticClusters", "clusters", "clusters"), - resourceids.UserSpecifiedSegment("clusterName", "clusterValue"), - } -} - -// String returns a human-readable description of this Cluster ID -func (id ClusterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cluster Name: %q", id.ClusterName), - } - return fmt.Sprintf("Cluster (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_checknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_checknameavailability_autorest.go index bfd6f89bbe52..4fd4f017e579 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_checknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_checknameavailability_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type CheckNameAvailabilityOperationResponse struct { } // CheckNameAvailability ... -func (c ClusterPrincipalAssignmentsClient) CheckNameAvailability(ctx context.Context, id ClusterId, input ClusterPrincipalAssignmentCheckNameRequest) (result CheckNameAvailabilityOperationResponse, err error) { +func (c ClusterPrincipalAssignmentsClient) CheckNameAvailability(ctx context.Context, id commonids.KustoClusterId, input ClusterPrincipalAssignmentCheckNameRequest) (result CheckNameAvailabilityOperationResponse, err error) { req, err := c.preparerForCheckNameAvailability(ctx, id, input) if err != nil { err = autorest.NewErrorWithError(err, "clusterprincipalassignments.ClusterPrincipalAssignmentsClient", "CheckNameAvailability", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c ClusterPrincipalAssignmentsClient) CheckNameAvailability(ctx context.Con } // preparerForCheckNameAvailability prepares the CheckNameAvailability request. -func (c ClusterPrincipalAssignmentsClient) preparerForCheckNameAvailability(ctx context.Context, id ClusterId, input ClusterPrincipalAssignmentCheckNameRequest) (*http.Request, error) { +func (c ClusterPrincipalAssignmentsClient) preparerForCheckNameAvailability(ctx context.Context, id commonids.KustoClusterId, input ClusterPrincipalAssignmentCheckNameRequest) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_list_autorest.go index 102745eb598a..65b8ec6703ab 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_list_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type ListOperationResponse struct { } // List ... -func (c ClusterPrincipalAssignmentsClient) List(ctx context.Context, id ClusterId) (result ListOperationResponse, err error) { +func (c ClusterPrincipalAssignmentsClient) List(ctx context.Context, id commonids.KustoClusterId) (result ListOperationResponse, err error) { req, err := c.preparerForList(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "clusterprincipalassignments.ClusterPrincipalAssignmentsClient", "List", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c ClusterPrincipalAssignmentsClient) List(ctx context.Context, id ClusterI } // preparerForList prepares the List request. -func (c ClusterPrincipalAssignmentsClient) preparerForList(ctx context.Context, id ClusterId) (*http.Request, error) { +func (c ClusterPrincipalAssignmentsClient) preparerForList(ctx context.Context, id commonids.KustoClusterId) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/README.md index eed448b58d5d..78ac26027a47 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/README.md @@ -24,7 +24,7 @@ client.Client.Authorizer = authorizer ```go ctx := context.TODO() -id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := clusters.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") payload := clusters.LanguageExtensionsList{ // ... @@ -62,7 +62,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := clusters.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") payload := clusters.Cluster{ // ... @@ -79,7 +79,7 @@ if err := client.CreateOrUpdateThenPoll(ctx, id, payload, clusters.DefaultCreate ```go ctx := context.TODO() -id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := clusters.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error @@ -91,7 +91,7 @@ if err := client.DeleteThenPoll(ctx, id); err != nil { ```go ctx := context.TODO() -id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := clusters.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") payload := clusters.FollowerDatabaseDefinition{ // ... @@ -108,7 +108,7 @@ if err := client.DetachFollowerDatabasesThenPoll(ctx, id, payload); err != nil { ```go ctx := context.TODO() -id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := clusters.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") if err := client.DiagnoseVirtualNetworkThenPoll(ctx, id); err != nil { // handle the error @@ -120,7 +120,7 @@ if err := client.DiagnoseVirtualNetworkThenPoll(ctx, id); err != nil { ```go ctx := context.TODO() -id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := clusters.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") read, err := client.Get(ctx, id) if err != nil { @@ -168,7 +168,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := clusters.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") read, err := client.ListFollowerDatabases(ctx, id) if err != nil { @@ -184,7 +184,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := clusters.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") read, err := client.ListLanguageExtensions(ctx, id) if err != nil { @@ -200,7 +200,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := clusters.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") read, err := client.ListSkusByResource(ctx, id) if err != nil { @@ -216,7 +216,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := clusters.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") payload := clusters.ClusterMigrateRequest{ // ... @@ -233,7 +233,7 @@ if err := client.MigrateThenPoll(ctx, id, payload); err != nil { ```go ctx := context.TODO() -id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := clusters.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") payload := clusters.LanguageExtensionsList{ // ... @@ -250,7 +250,7 @@ if err := client.RemoveLanguageExtensionsThenPoll(ctx, id, payload); err != nil ```go ctx := context.TODO() -id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := clusters.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") if err := client.StartThenPoll(ctx, id); err != nil { // handle the error @@ -262,7 +262,7 @@ if err := client.StartThenPoll(ctx, id); err != nil { ```go ctx := context.TODO() -id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := clusters.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") if err := client.StopThenPoll(ctx, id); err != nil { // handle the error @@ -274,7 +274,7 @@ if err := client.StopThenPoll(ctx, id); err != nil { ```go ctx := context.TODO() -id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := clusters.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") payload := clusters.ClusterUpdate{ // ... diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/id_cluster.go deleted file mode 100644 index 5acf72e1ab8b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/id_cluster.go +++ /dev/null @@ -1,125 +0,0 @@ -package clusters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ClusterId{} - -// ClusterId is a struct representing the Resource ID for a Cluster -type ClusterId struct { - SubscriptionId string - ResourceGroupName string - ClusterName string -} - -// NewClusterID returns a new ClusterId struct -func NewClusterID(subscriptionId string, resourceGroupName string, clusterName string) ClusterId { - return ClusterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ClusterName: clusterName, - } -} - -// ParseClusterID parses 'input' into a ClusterId -func ParseClusterID(input string) (*ClusterId, error) { - parser := resourceids.NewParserFromResourceIdType(ClusterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseClusterIDInsensitively parses 'input' case-insensitively into a ClusterId -// note: this method should only be used for API response data and not user input -func ParseClusterIDInsensitively(input string) (*ClusterId, error) { - parser := resourceids.NewParserFromResourceIdType(ClusterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ClusterId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) - } - - return nil -} - -// ValidateClusterID checks that 'input' can be parsed as a Cluster ID -func ValidateClusterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseClusterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Cluster ID -func (id ClusterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Kusto/clusters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ClusterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Cluster ID -func (id ClusterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftKusto", "Microsoft.Kusto", "Microsoft.Kusto"), - resourceids.StaticSegment("staticClusters", "clusters", "clusters"), - resourceids.UserSpecifiedSegment("clusterName", "clusterValue"), - } -} - -// String returns a human-readable description of this Cluster ID -func (id ClusterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cluster Name: %q", id.ClusterName), - } - return fmt.Sprintf("Cluster (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_addlanguageextensions_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_addlanguageextensions_autorest.go index 333636752378..60e6556fb8bf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_addlanguageextensions_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_addlanguageextensions_autorest.go @@ -8,6 +8,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/hashicorp/go-azure-helpers/polling" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -19,7 +20,7 @@ type AddLanguageExtensionsOperationResponse struct { } // AddLanguageExtensions ... -func (c ClustersClient) AddLanguageExtensions(ctx context.Context, id ClusterId, input LanguageExtensionsList) (result AddLanguageExtensionsOperationResponse, err error) { +func (c ClustersClient) AddLanguageExtensions(ctx context.Context, id commonids.KustoClusterId, input LanguageExtensionsList) (result AddLanguageExtensionsOperationResponse, err error) { req, err := c.preparerForAddLanguageExtensions(ctx, id, input) if err != nil { err = autorest.NewErrorWithError(err, "clusters.ClustersClient", "AddLanguageExtensions", nil, "Failure preparing request") @@ -36,7 +37,7 @@ func (c ClustersClient) AddLanguageExtensions(ctx context.Context, id ClusterId, } // AddLanguageExtensionsThenPoll performs AddLanguageExtensions then polls until it's completed -func (c ClustersClient) AddLanguageExtensionsThenPoll(ctx context.Context, id ClusterId, input LanguageExtensionsList) error { +func (c ClustersClient) AddLanguageExtensionsThenPoll(ctx context.Context, id commonids.KustoClusterId, input LanguageExtensionsList) error { result, err := c.AddLanguageExtensions(ctx, id, input) if err != nil { return fmt.Errorf("performing AddLanguageExtensions: %+v", err) @@ -50,7 +51,7 @@ func (c ClustersClient) AddLanguageExtensionsThenPoll(ctx context.Context, id Cl } // preparerForAddLanguageExtensions prepares the AddLanguageExtensions request. -func (c ClustersClient) preparerForAddLanguageExtensions(ctx context.Context, id ClusterId, input LanguageExtensionsList) (*http.Request, error) { +func (c ClustersClient) preparerForAddLanguageExtensions(ctx context.Context, id commonids.KustoClusterId, input LanguageExtensionsList) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_createorupdate_autorest.go index 5b138fdffab7..37f61eda4263 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_createorupdate_autorest.go @@ -8,6 +8,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/hashicorp/go-azure-helpers/polling" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -48,7 +49,7 @@ func (o CreateOrUpdateOperationOptions) toQueryString() map[string]interface{} { } // CreateOrUpdate ... -func (c ClustersClient) CreateOrUpdate(ctx context.Context, id ClusterId, input Cluster, options CreateOrUpdateOperationOptions) (result CreateOrUpdateOperationResponse, err error) { +func (c ClustersClient) CreateOrUpdate(ctx context.Context, id commonids.KustoClusterId, input Cluster, options CreateOrUpdateOperationOptions) (result CreateOrUpdateOperationResponse, err error) { req, err := c.preparerForCreateOrUpdate(ctx, id, input, options) if err != nil { err = autorest.NewErrorWithError(err, "clusters.ClustersClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -65,7 +66,7 @@ func (c ClustersClient) CreateOrUpdate(ctx context.Context, id ClusterId, input } // CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ClustersClient) CreateOrUpdateThenPoll(ctx context.Context, id ClusterId, input Cluster, options CreateOrUpdateOperationOptions) error { +func (c ClustersClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.KustoClusterId, input Cluster, options CreateOrUpdateOperationOptions) error { result, err := c.CreateOrUpdate(ctx, id, input, options) if err != nil { return fmt.Errorf("performing CreateOrUpdate: %+v", err) @@ -79,7 +80,7 @@ func (c ClustersClient) CreateOrUpdateThenPoll(ctx context.Context, id ClusterId } // preparerForCreateOrUpdate prepares the CreateOrUpdate request. -func (c ClustersClient) preparerForCreateOrUpdate(ctx context.Context, id ClusterId, input Cluster, options CreateOrUpdateOperationOptions) (*http.Request, error) { +func (c ClustersClient) preparerForCreateOrUpdate(ctx context.Context, id commonids.KustoClusterId, input Cluster, options CreateOrUpdateOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_delete_autorest.go index 285ecf817e5b..b08295dcd165 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_delete_autorest.go @@ -8,6 +8,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/hashicorp/go-azure-helpers/polling" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -19,7 +20,7 @@ type DeleteOperationResponse struct { } // Delete ... -func (c ClustersClient) Delete(ctx context.Context, id ClusterId) (result DeleteOperationResponse, err error) { +func (c ClustersClient) Delete(ctx context.Context, id commonids.KustoClusterId) (result DeleteOperationResponse, err error) { req, err := c.preparerForDelete(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "clusters.ClustersClient", "Delete", nil, "Failure preparing request") @@ -36,7 +37,7 @@ func (c ClustersClient) Delete(ctx context.Context, id ClusterId) (result Delete } // DeleteThenPoll performs Delete then polls until it's completed -func (c ClustersClient) DeleteThenPoll(ctx context.Context, id ClusterId) error { +func (c ClustersClient) DeleteThenPoll(ctx context.Context, id commonids.KustoClusterId) error { result, err := c.Delete(ctx, id) if err != nil { return fmt.Errorf("performing Delete: %+v", err) @@ -50,7 +51,7 @@ func (c ClustersClient) DeleteThenPoll(ctx context.Context, id ClusterId) error } // preparerForDelete prepares the Delete request. -func (c ClustersClient) preparerForDelete(ctx context.Context, id ClusterId) (*http.Request, error) { +func (c ClustersClient) preparerForDelete(ctx context.Context, id commonids.KustoClusterId) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_detachfollowerdatabases_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_detachfollowerdatabases_autorest.go index 192373e1bc6d..1034ba43df36 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_detachfollowerdatabases_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_detachfollowerdatabases_autorest.go @@ -8,6 +8,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/hashicorp/go-azure-helpers/polling" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -19,7 +20,7 @@ type DetachFollowerDatabasesOperationResponse struct { } // DetachFollowerDatabases ... -func (c ClustersClient) DetachFollowerDatabases(ctx context.Context, id ClusterId, input FollowerDatabaseDefinition) (result DetachFollowerDatabasesOperationResponse, err error) { +func (c ClustersClient) DetachFollowerDatabases(ctx context.Context, id commonids.KustoClusterId, input FollowerDatabaseDefinition) (result DetachFollowerDatabasesOperationResponse, err error) { req, err := c.preparerForDetachFollowerDatabases(ctx, id, input) if err != nil { err = autorest.NewErrorWithError(err, "clusters.ClustersClient", "DetachFollowerDatabases", nil, "Failure preparing request") @@ -36,7 +37,7 @@ func (c ClustersClient) DetachFollowerDatabases(ctx context.Context, id ClusterI } // DetachFollowerDatabasesThenPoll performs DetachFollowerDatabases then polls until it's completed -func (c ClustersClient) DetachFollowerDatabasesThenPoll(ctx context.Context, id ClusterId, input FollowerDatabaseDefinition) error { +func (c ClustersClient) DetachFollowerDatabasesThenPoll(ctx context.Context, id commonids.KustoClusterId, input FollowerDatabaseDefinition) error { result, err := c.DetachFollowerDatabases(ctx, id, input) if err != nil { return fmt.Errorf("performing DetachFollowerDatabases: %+v", err) @@ -50,7 +51,7 @@ func (c ClustersClient) DetachFollowerDatabasesThenPoll(ctx context.Context, id } // preparerForDetachFollowerDatabases prepares the DetachFollowerDatabases request. -func (c ClustersClient) preparerForDetachFollowerDatabases(ctx context.Context, id ClusterId, input FollowerDatabaseDefinition) (*http.Request, error) { +func (c ClustersClient) preparerForDetachFollowerDatabases(ctx context.Context, id commonids.KustoClusterId, input FollowerDatabaseDefinition) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_diagnosevirtualnetwork_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_diagnosevirtualnetwork_autorest.go index a26ec7120436..b77fa7fa424c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_diagnosevirtualnetwork_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_diagnosevirtualnetwork_autorest.go @@ -8,6 +8,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/hashicorp/go-azure-helpers/polling" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -19,7 +20,7 @@ type DiagnoseVirtualNetworkOperationResponse struct { } // DiagnoseVirtualNetwork ... -func (c ClustersClient) DiagnoseVirtualNetwork(ctx context.Context, id ClusterId) (result DiagnoseVirtualNetworkOperationResponse, err error) { +func (c ClustersClient) DiagnoseVirtualNetwork(ctx context.Context, id commonids.KustoClusterId) (result DiagnoseVirtualNetworkOperationResponse, err error) { req, err := c.preparerForDiagnoseVirtualNetwork(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "clusters.ClustersClient", "DiagnoseVirtualNetwork", nil, "Failure preparing request") @@ -36,7 +37,7 @@ func (c ClustersClient) DiagnoseVirtualNetwork(ctx context.Context, id ClusterId } // DiagnoseVirtualNetworkThenPoll performs DiagnoseVirtualNetwork then polls until it's completed -func (c ClustersClient) DiagnoseVirtualNetworkThenPoll(ctx context.Context, id ClusterId) error { +func (c ClustersClient) DiagnoseVirtualNetworkThenPoll(ctx context.Context, id commonids.KustoClusterId) error { result, err := c.DiagnoseVirtualNetwork(ctx, id) if err != nil { return fmt.Errorf("performing DiagnoseVirtualNetwork: %+v", err) @@ -50,7 +51,7 @@ func (c ClustersClient) DiagnoseVirtualNetworkThenPoll(ctx context.Context, id C } // preparerForDiagnoseVirtualNetwork prepares the DiagnoseVirtualNetwork request. -func (c ClustersClient) preparerForDiagnoseVirtualNetwork(ctx context.Context, id ClusterId) (*http.Request, error) { +func (c ClustersClient) preparerForDiagnoseVirtualNetwork(ctx context.Context, id commonids.KustoClusterId) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_get_autorest.go index 2957d3dd8de8..3d389398ca7c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_get_autorest.go @@ -6,6 +6,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -17,7 +18,7 @@ type GetOperationResponse struct { } // Get ... -func (c ClustersClient) Get(ctx context.Context, id ClusterId) (result GetOperationResponse, err error) { +func (c ClustersClient) Get(ctx context.Context, id commonids.KustoClusterId) (result GetOperationResponse, err error) { req, err := c.preparerForGet(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "clusters.ClustersClient", "Get", nil, "Failure preparing request") @@ -40,7 +41,7 @@ func (c ClustersClient) Get(ctx context.Context, id ClusterId) (result GetOperat } // preparerForGet prepares the Get request. -func (c ClustersClient) preparerForGet(ctx context.Context, id ClusterId) (*http.Request, error) { +func (c ClustersClient) preparerForGet(ctx context.Context, id commonids.KustoClusterId) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_listfollowerdatabases_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_listfollowerdatabases_autorest.go index 537aa6adf2d8..56cc872c04ed 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_listfollowerdatabases_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_listfollowerdatabases_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type ListFollowerDatabasesOperationResponse struct { } // ListFollowerDatabases ... -func (c ClustersClient) ListFollowerDatabases(ctx context.Context, id ClusterId) (result ListFollowerDatabasesOperationResponse, err error) { +func (c ClustersClient) ListFollowerDatabases(ctx context.Context, id commonids.KustoClusterId) (result ListFollowerDatabasesOperationResponse, err error) { req, err := c.preparerForListFollowerDatabases(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "clusters.ClustersClient", "ListFollowerDatabases", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c ClustersClient) ListFollowerDatabases(ctx context.Context, id ClusterId) } // preparerForListFollowerDatabases prepares the ListFollowerDatabases request. -func (c ClustersClient) preparerForListFollowerDatabases(ctx context.Context, id ClusterId) (*http.Request, error) { +func (c ClustersClient) preparerForListFollowerDatabases(ctx context.Context, id commonids.KustoClusterId) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_listlanguageextensions_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_listlanguageextensions_autorest.go index 56c9ec608e9f..6fd9149db2c9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_listlanguageextensions_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_listlanguageextensions_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type ListLanguageExtensionsOperationResponse struct { } // ListLanguageExtensions ... -func (c ClustersClient) ListLanguageExtensions(ctx context.Context, id ClusterId) (result ListLanguageExtensionsOperationResponse, err error) { +func (c ClustersClient) ListLanguageExtensions(ctx context.Context, id commonids.KustoClusterId) (result ListLanguageExtensionsOperationResponse, err error) { req, err := c.preparerForListLanguageExtensions(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "clusters.ClustersClient", "ListLanguageExtensions", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c ClustersClient) ListLanguageExtensions(ctx context.Context, id ClusterId } // preparerForListLanguageExtensions prepares the ListLanguageExtensions request. -func (c ClustersClient) preparerForListLanguageExtensions(ctx context.Context, id ClusterId) (*http.Request, error) { +func (c ClustersClient) preparerForListLanguageExtensions(ctx context.Context, id commonids.KustoClusterId) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_listskusbyresource_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_listskusbyresource_autorest.go index d5bc106385fd..5dd40d5ce202 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_listskusbyresource_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_listskusbyresource_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type ListSkusByResourceOperationResponse struct { } // ListSkusByResource ... -func (c ClustersClient) ListSkusByResource(ctx context.Context, id ClusterId) (result ListSkusByResourceOperationResponse, err error) { +func (c ClustersClient) ListSkusByResource(ctx context.Context, id commonids.KustoClusterId) (result ListSkusByResourceOperationResponse, err error) { req, err := c.preparerForListSkusByResource(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "clusters.ClustersClient", "ListSkusByResource", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c ClustersClient) ListSkusByResource(ctx context.Context, id ClusterId) (r } // preparerForListSkusByResource prepares the ListSkusByResource request. -func (c ClustersClient) preparerForListSkusByResource(ctx context.Context, id ClusterId) (*http.Request, error) { +func (c ClustersClient) preparerForListSkusByResource(ctx context.Context, id commonids.KustoClusterId) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_migrate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_migrate_autorest.go index 539da6e80d61..d0c79dbf752f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_migrate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_migrate_autorest.go @@ -8,6 +8,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/hashicorp/go-azure-helpers/polling" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -19,7 +20,7 @@ type MigrateOperationResponse struct { } // Migrate ... -func (c ClustersClient) Migrate(ctx context.Context, id ClusterId, input ClusterMigrateRequest) (result MigrateOperationResponse, err error) { +func (c ClustersClient) Migrate(ctx context.Context, id commonids.KustoClusterId, input ClusterMigrateRequest) (result MigrateOperationResponse, err error) { req, err := c.preparerForMigrate(ctx, id, input) if err != nil { err = autorest.NewErrorWithError(err, "clusters.ClustersClient", "Migrate", nil, "Failure preparing request") @@ -36,7 +37,7 @@ func (c ClustersClient) Migrate(ctx context.Context, id ClusterId, input Cluster } // MigrateThenPoll performs Migrate then polls until it's completed -func (c ClustersClient) MigrateThenPoll(ctx context.Context, id ClusterId, input ClusterMigrateRequest) error { +func (c ClustersClient) MigrateThenPoll(ctx context.Context, id commonids.KustoClusterId, input ClusterMigrateRequest) error { result, err := c.Migrate(ctx, id, input) if err != nil { return fmt.Errorf("performing Migrate: %+v", err) @@ -50,7 +51,7 @@ func (c ClustersClient) MigrateThenPoll(ctx context.Context, id ClusterId, input } // preparerForMigrate prepares the Migrate request. -func (c ClustersClient) preparerForMigrate(ctx context.Context, id ClusterId, input ClusterMigrateRequest) (*http.Request, error) { +func (c ClustersClient) preparerForMigrate(ctx context.Context, id commonids.KustoClusterId, input ClusterMigrateRequest) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_removelanguageextensions_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_removelanguageextensions_autorest.go index f775026ed20c..d82eb7c82501 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_removelanguageextensions_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_removelanguageextensions_autorest.go @@ -8,6 +8,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/hashicorp/go-azure-helpers/polling" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -19,7 +20,7 @@ type RemoveLanguageExtensionsOperationResponse struct { } // RemoveLanguageExtensions ... -func (c ClustersClient) RemoveLanguageExtensions(ctx context.Context, id ClusterId, input LanguageExtensionsList) (result RemoveLanguageExtensionsOperationResponse, err error) { +func (c ClustersClient) RemoveLanguageExtensions(ctx context.Context, id commonids.KustoClusterId, input LanguageExtensionsList) (result RemoveLanguageExtensionsOperationResponse, err error) { req, err := c.preparerForRemoveLanguageExtensions(ctx, id, input) if err != nil { err = autorest.NewErrorWithError(err, "clusters.ClustersClient", "RemoveLanguageExtensions", nil, "Failure preparing request") @@ -36,7 +37,7 @@ func (c ClustersClient) RemoveLanguageExtensions(ctx context.Context, id Cluster } // RemoveLanguageExtensionsThenPoll performs RemoveLanguageExtensions then polls until it's completed -func (c ClustersClient) RemoveLanguageExtensionsThenPoll(ctx context.Context, id ClusterId, input LanguageExtensionsList) error { +func (c ClustersClient) RemoveLanguageExtensionsThenPoll(ctx context.Context, id commonids.KustoClusterId, input LanguageExtensionsList) error { result, err := c.RemoveLanguageExtensions(ctx, id, input) if err != nil { return fmt.Errorf("performing RemoveLanguageExtensions: %+v", err) @@ -50,7 +51,7 @@ func (c ClustersClient) RemoveLanguageExtensionsThenPoll(ctx context.Context, id } // preparerForRemoveLanguageExtensions prepares the RemoveLanguageExtensions request. -func (c ClustersClient) preparerForRemoveLanguageExtensions(ctx context.Context, id ClusterId, input LanguageExtensionsList) (*http.Request, error) { +func (c ClustersClient) preparerForRemoveLanguageExtensions(ctx context.Context, id commonids.KustoClusterId, input LanguageExtensionsList) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_start_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_start_autorest.go index 251d420e16be..7798ed02ddb8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_start_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_start_autorest.go @@ -8,6 +8,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/hashicorp/go-azure-helpers/polling" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -19,7 +20,7 @@ type StartOperationResponse struct { } // Start ... -func (c ClustersClient) Start(ctx context.Context, id ClusterId) (result StartOperationResponse, err error) { +func (c ClustersClient) Start(ctx context.Context, id commonids.KustoClusterId) (result StartOperationResponse, err error) { req, err := c.preparerForStart(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "clusters.ClustersClient", "Start", nil, "Failure preparing request") @@ -36,7 +37,7 @@ func (c ClustersClient) Start(ctx context.Context, id ClusterId) (result StartOp } // StartThenPoll performs Start then polls until it's completed -func (c ClustersClient) StartThenPoll(ctx context.Context, id ClusterId) error { +func (c ClustersClient) StartThenPoll(ctx context.Context, id commonids.KustoClusterId) error { result, err := c.Start(ctx, id) if err != nil { return fmt.Errorf("performing Start: %+v", err) @@ -50,7 +51,7 @@ func (c ClustersClient) StartThenPoll(ctx context.Context, id ClusterId) error { } // preparerForStart prepares the Start request. -func (c ClustersClient) preparerForStart(ctx context.Context, id ClusterId) (*http.Request, error) { +func (c ClustersClient) preparerForStart(ctx context.Context, id commonids.KustoClusterId) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_stop_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_stop_autorest.go index 5eb506e67913..e6046d64519f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_stop_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_stop_autorest.go @@ -8,6 +8,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/hashicorp/go-azure-helpers/polling" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -19,7 +20,7 @@ type StopOperationResponse struct { } // Stop ... -func (c ClustersClient) Stop(ctx context.Context, id ClusterId) (result StopOperationResponse, err error) { +func (c ClustersClient) Stop(ctx context.Context, id commonids.KustoClusterId) (result StopOperationResponse, err error) { req, err := c.preparerForStop(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "clusters.ClustersClient", "Stop", nil, "Failure preparing request") @@ -36,7 +37,7 @@ func (c ClustersClient) Stop(ctx context.Context, id ClusterId) (result StopOper } // StopThenPoll performs Stop then polls until it's completed -func (c ClustersClient) StopThenPoll(ctx context.Context, id ClusterId) error { +func (c ClustersClient) StopThenPoll(ctx context.Context, id commonids.KustoClusterId) error { result, err := c.Stop(ctx, id) if err != nil { return fmt.Errorf("performing Stop: %+v", err) @@ -50,7 +51,7 @@ func (c ClustersClient) StopThenPoll(ctx context.Context, id ClusterId) error { } // preparerForStop prepares the Stop request. -func (c ClustersClient) preparerForStop(ctx context.Context, id ClusterId) (*http.Request, error) { +func (c ClustersClient) preparerForStop(ctx context.Context, id commonids.KustoClusterId) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_update_autorest.go index 2709f525adae..c8ad95c97f37 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/method_update_autorest.go @@ -8,6 +8,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/hashicorp/go-azure-helpers/polling" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -43,7 +44,7 @@ func (o UpdateOperationOptions) toQueryString() map[string]interface{} { } // Update ... -func (c ClustersClient) Update(ctx context.Context, id ClusterId, input ClusterUpdate, options UpdateOperationOptions) (result UpdateOperationResponse, err error) { +func (c ClustersClient) Update(ctx context.Context, id commonids.KustoClusterId, input ClusterUpdate, options UpdateOperationOptions) (result UpdateOperationResponse, err error) { req, err := c.preparerForUpdate(ctx, id, input, options) if err != nil { err = autorest.NewErrorWithError(err, "clusters.ClustersClient", "Update", nil, "Failure preparing request") @@ -60,7 +61,7 @@ func (c ClustersClient) Update(ctx context.Context, id ClusterId, input ClusterU } // UpdateThenPoll performs Update then polls until it's completed -func (c ClustersClient) UpdateThenPoll(ctx context.Context, id ClusterId, input ClusterUpdate, options UpdateOperationOptions) error { +func (c ClustersClient) UpdateThenPoll(ctx context.Context, id commonids.KustoClusterId, input ClusterUpdate, options UpdateOperationOptions) error { result, err := c.Update(ctx, id, input, options) if err != nil { return fmt.Errorf("performing Update: %+v", err) @@ -74,7 +75,7 @@ func (c ClustersClient) UpdateThenPoll(ctx context.Context, id ClusterId, input } // preparerForUpdate prepares the Update request. -func (c ClustersClient) preparerForUpdate(ctx context.Context, id ClusterId, input ClusterUpdate, options UpdateOperationOptions) (*http.Request, error) { +func (c ClustersClient) preparerForUpdate(ctx context.Context, id commonids.KustoClusterId, input ClusterUpdate, options UpdateOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/README.md index dc4bc0b4e933..9a19ce9305ce 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/README.md @@ -24,7 +24,7 @@ client.Client.Authorizer = authorizer ```go ctx := context.TODO() -id := databaseprincipalassignments.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") +id := databaseprincipalassignments.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") payload := databaseprincipalassignments.DatabasePrincipalAssignmentCheckNameRequest{ // ... @@ -90,7 +90,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := databaseprincipalassignments.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") +id := databaseprincipalassignments.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") read, err := client.List(ctx, id) if err != nil { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/id_database.go deleted file mode 100644 index 285829a20a30..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/id_database.go +++ /dev/null @@ -1,134 +0,0 @@ -package databaseprincipalassignments - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DatabaseId{} - -// DatabaseId is a struct representing the Resource ID for a Database -type DatabaseId struct { - SubscriptionId string - ResourceGroupName string - ClusterName string - DatabaseName string -} - -// NewDatabaseID returns a new DatabaseId struct -func NewDatabaseID(subscriptionId string, resourceGroupName string, clusterName string, databaseName string) DatabaseId { - return DatabaseId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ClusterName: clusterName, - DatabaseName: databaseName, - } -} - -// ParseDatabaseID parses 'input' into a DatabaseId -func ParseDatabaseID(input string) (*DatabaseId, error) { - parser := resourceids.NewParserFromResourceIdType(DatabaseId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseDatabaseIDInsensitively parses 'input' case-insensitively into a DatabaseId -// note: this method should only be used for API response data and not user input -func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { - parser := resourceids.NewParserFromResourceIdType(DatabaseId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *DatabaseId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) - } - - if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) - } - - return nil -} - -// ValidateDatabaseID checks that 'input' can be parsed as a Database ID -func ValidateDatabaseID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseDatabaseID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Database ID -func (id DatabaseId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Kusto/clusters/%s/databases/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ClusterName, id.DatabaseName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Database ID -func (id DatabaseId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftKusto", "Microsoft.Kusto", "Microsoft.Kusto"), - resourceids.StaticSegment("staticClusters", "clusters", "clusters"), - resourceids.UserSpecifiedSegment("clusterName", "clusterValue"), - resourceids.StaticSegment("staticDatabases", "databases", "databases"), - resourceids.UserSpecifiedSegment("databaseName", "databaseValue"), - } -} - -// String returns a human-readable description of this Database ID -func (id DatabaseId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cluster Name: %q", id.ClusterName), - fmt.Sprintf("Database Name: %q", id.DatabaseName), - } - return fmt.Sprintf("Database (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_checknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_checknameavailability_autorest.go index 2d64fb4b3cd9..76377a6af8d7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_checknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_checknameavailability_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type CheckNameAvailabilityOperationResponse struct { } // CheckNameAvailability ... -func (c DatabasePrincipalAssignmentsClient) CheckNameAvailability(ctx context.Context, id DatabaseId, input DatabasePrincipalAssignmentCheckNameRequest) (result CheckNameAvailabilityOperationResponse, err error) { +func (c DatabasePrincipalAssignmentsClient) CheckNameAvailability(ctx context.Context, id commonids.KustoDatabaseId, input DatabasePrincipalAssignmentCheckNameRequest) (result CheckNameAvailabilityOperationResponse, err error) { req, err := c.preparerForCheckNameAvailability(ctx, id, input) if err != nil { err = autorest.NewErrorWithError(err, "databaseprincipalassignments.DatabasePrincipalAssignmentsClient", "CheckNameAvailability", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c DatabasePrincipalAssignmentsClient) CheckNameAvailability(ctx context.Co } // preparerForCheckNameAvailability prepares the CheckNameAvailability request. -func (c DatabasePrincipalAssignmentsClient) preparerForCheckNameAvailability(ctx context.Context, id DatabaseId, input DatabasePrincipalAssignmentCheckNameRequest) (*http.Request, error) { +func (c DatabasePrincipalAssignmentsClient) preparerForCheckNameAvailability(ctx context.Context, id commonids.KustoDatabaseId, input DatabasePrincipalAssignmentCheckNameRequest) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_list_autorest.go index 3ae698abf17b..f10ff33f7a4a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_list_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type ListOperationResponse struct { } // List ... -func (c DatabasePrincipalAssignmentsClient) List(ctx context.Context, id DatabaseId) (result ListOperationResponse, err error) { +func (c DatabasePrincipalAssignmentsClient) List(ctx context.Context, id commonids.KustoDatabaseId) (result ListOperationResponse, err error) { req, err := c.preparerForList(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "databaseprincipalassignments.DatabasePrincipalAssignmentsClient", "List", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c DatabasePrincipalAssignmentsClient) List(ctx context.Context, id Databas } // preparerForList prepares the List request. -func (c DatabasePrincipalAssignmentsClient) preparerForList(ctx context.Context, id DatabaseId) (*http.Request, error) { +func (c DatabasePrincipalAssignmentsClient) preparerForList(ctx context.Context, id commonids.KustoDatabaseId) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/README.md index a1b1ac9b9c1f..17950608db09 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/README.md @@ -24,7 +24,7 @@ client.Client.Authorizer = authorizer ```go ctx := context.TODO() -id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") +id := databases.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") payload := databases.DatabasePrincipalListRequest{ // ... @@ -45,7 +45,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := databases.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := databases.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") payload := databases.CheckNameRequest{ // ... @@ -66,7 +66,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") +id := databases.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") payload := databases.Database{ // ... @@ -83,7 +83,7 @@ if err := client.CreateOrUpdateThenPoll(ctx, id, payload, databases.DefaultCreat ```go ctx := context.TODO() -id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") +id := databases.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") payload := databases.DatabaseInviteFollowerRequest{ // ... @@ -104,7 +104,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") +id := databases.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") if err := client.DeleteThenPoll(ctx, id); err != nil { // handle the error @@ -116,7 +116,7 @@ if err := client.DeleteThenPoll(ctx, id); err != nil { ```go ctx := context.TODO() -id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") +id := databases.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") read, err := client.Get(ctx, id) if err != nil { @@ -132,7 +132,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := databases.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := databases.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") // alternatively `client.ListByCluster(ctx, id, databases.DefaultListByClusterOperationOptions())` can be used to do batched pagination items, err := client.ListByClusterComplete(ctx, id, databases.DefaultListByClusterOperationOptions()) @@ -149,7 +149,7 @@ for _, item := range items { ```go ctx := context.TODO() -id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") +id := databases.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") read, err := client.ListPrincipals(ctx, id) if err != nil { @@ -165,7 +165,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") +id := databases.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") payload := databases.DatabasePrincipalListRequest{ // ... @@ -186,7 +186,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") +id := databases.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") payload := databases.Database{ // ... diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/id_cluster.go deleted file mode 100644 index 06e37de14e91..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/id_cluster.go +++ /dev/null @@ -1,125 +0,0 @@ -package databases - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ClusterId{} - -// ClusterId is a struct representing the Resource ID for a Cluster -type ClusterId struct { - SubscriptionId string - ResourceGroupName string - ClusterName string -} - -// NewClusterID returns a new ClusterId struct -func NewClusterID(subscriptionId string, resourceGroupName string, clusterName string) ClusterId { - return ClusterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ClusterName: clusterName, - } -} - -// ParseClusterID parses 'input' into a ClusterId -func ParseClusterID(input string) (*ClusterId, error) { - parser := resourceids.NewParserFromResourceIdType(ClusterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseClusterIDInsensitively parses 'input' case-insensitively into a ClusterId -// note: this method should only be used for API response data and not user input -func ParseClusterIDInsensitively(input string) (*ClusterId, error) { - parser := resourceids.NewParserFromResourceIdType(ClusterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ClusterId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) - } - - return nil -} - -// ValidateClusterID checks that 'input' can be parsed as a Cluster ID -func ValidateClusterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseClusterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Cluster ID -func (id ClusterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Kusto/clusters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ClusterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Cluster ID -func (id ClusterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftKusto", "Microsoft.Kusto", "Microsoft.Kusto"), - resourceids.StaticSegment("staticClusters", "clusters", "clusters"), - resourceids.UserSpecifiedSegment("clusterName", "clusterValue"), - } -} - -// String returns a human-readable description of this Cluster ID -func (id ClusterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cluster Name: %q", id.ClusterName), - } - return fmt.Sprintf("Cluster (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/id_database.go deleted file mode 100644 index 6bfdd684edc0..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/id_database.go +++ /dev/null @@ -1,134 +0,0 @@ -package databases - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DatabaseId{} - -// DatabaseId is a struct representing the Resource ID for a Database -type DatabaseId struct { - SubscriptionId string - ResourceGroupName string - ClusterName string - DatabaseName string -} - -// NewDatabaseID returns a new DatabaseId struct -func NewDatabaseID(subscriptionId string, resourceGroupName string, clusterName string, databaseName string) DatabaseId { - return DatabaseId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ClusterName: clusterName, - DatabaseName: databaseName, - } -} - -// ParseDatabaseID parses 'input' into a DatabaseId -func ParseDatabaseID(input string) (*DatabaseId, error) { - parser := resourceids.NewParserFromResourceIdType(DatabaseId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseDatabaseIDInsensitively parses 'input' case-insensitively into a DatabaseId -// note: this method should only be used for API response data and not user input -func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { - parser := resourceids.NewParserFromResourceIdType(DatabaseId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *DatabaseId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) - } - - if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) - } - - return nil -} - -// ValidateDatabaseID checks that 'input' can be parsed as a Database ID -func ValidateDatabaseID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseDatabaseID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Database ID -func (id DatabaseId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Kusto/clusters/%s/databases/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ClusterName, id.DatabaseName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Database ID -func (id DatabaseId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftKusto", "Microsoft.Kusto", "Microsoft.Kusto"), - resourceids.StaticSegment("staticClusters", "clusters", "clusters"), - resourceids.UserSpecifiedSegment("clusterName", "clusterValue"), - resourceids.StaticSegment("staticDatabases", "databases", "databases"), - resourceids.UserSpecifiedSegment("databaseName", "databaseValue"), - } -} - -// String returns a human-readable description of this Database ID -func (id DatabaseId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cluster Name: %q", id.ClusterName), - fmt.Sprintf("Database Name: %q", id.DatabaseName), - } - return fmt.Sprintf("Database (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_addprincipals_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_addprincipals_autorest.go index 6d3b04ac3353..e4793cc48419 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_addprincipals_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_addprincipals_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type AddPrincipalsOperationResponse struct { } // AddPrincipals ... -func (c DatabasesClient) AddPrincipals(ctx context.Context, id DatabaseId, input DatabasePrincipalListRequest) (result AddPrincipalsOperationResponse, err error) { +func (c DatabasesClient) AddPrincipals(ctx context.Context, id commonids.KustoDatabaseId, input DatabasePrincipalListRequest) (result AddPrincipalsOperationResponse, err error) { req, err := c.preparerForAddPrincipals(ctx, id, input) if err != nil { err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "AddPrincipals", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c DatabasesClient) AddPrincipals(ctx context.Context, id DatabaseId, input } // preparerForAddPrincipals prepares the AddPrincipals request. -func (c DatabasesClient) preparerForAddPrincipals(ctx context.Context, id DatabaseId, input DatabasePrincipalListRequest) (*http.Request, error) { +func (c DatabasesClient) preparerForAddPrincipals(ctx context.Context, id commonids.KustoDatabaseId, input DatabasePrincipalListRequest) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_checknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_checknameavailability_autorest.go index 80e7dffd7273..f12e692ffa68 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_checknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_checknameavailability_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type CheckNameAvailabilityOperationResponse struct { } // CheckNameAvailability ... -func (c DatabasesClient) CheckNameAvailability(ctx context.Context, id ClusterId, input CheckNameRequest) (result CheckNameAvailabilityOperationResponse, err error) { +func (c DatabasesClient) CheckNameAvailability(ctx context.Context, id commonids.KustoClusterId, input CheckNameRequest) (result CheckNameAvailabilityOperationResponse, err error) { req, err := c.preparerForCheckNameAvailability(ctx, id, input) if err != nil { err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "CheckNameAvailability", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c DatabasesClient) CheckNameAvailability(ctx context.Context, id ClusterId } // preparerForCheckNameAvailability prepares the CheckNameAvailability request. -func (c DatabasesClient) preparerForCheckNameAvailability(ctx context.Context, id ClusterId, input CheckNameRequest) (*http.Request, error) { +func (c DatabasesClient) preparerForCheckNameAvailability(ctx context.Context, id commonids.KustoClusterId, input CheckNameRequest) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_createorupdate_autorest.go index 5cd10473f0e3..f892858518ec 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_createorupdate_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_createorupdate_autorest.go @@ -8,6 +8,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/hashicorp/go-azure-helpers/polling" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -43,7 +44,7 @@ func (o CreateOrUpdateOperationOptions) toQueryString() map[string]interface{} { } // CreateOrUpdate ... -func (c DatabasesClient) CreateOrUpdate(ctx context.Context, id DatabaseId, input Database, options CreateOrUpdateOperationOptions) (result CreateOrUpdateOperationResponse, err error) { +func (c DatabasesClient) CreateOrUpdate(ctx context.Context, id commonids.KustoDatabaseId, input Database, options CreateOrUpdateOperationOptions) (result CreateOrUpdateOperationResponse, err error) { req, err := c.preparerForCreateOrUpdate(ctx, id, input, options) if err != nil { err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -60,7 +61,7 @@ func (c DatabasesClient) CreateOrUpdate(ctx context.Context, id DatabaseId, inpu } // CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c DatabasesClient) CreateOrUpdateThenPoll(ctx context.Context, id DatabaseId, input Database, options CreateOrUpdateOperationOptions) error { +func (c DatabasesClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.KustoDatabaseId, input Database, options CreateOrUpdateOperationOptions) error { result, err := c.CreateOrUpdate(ctx, id, input, options) if err != nil { return fmt.Errorf("performing CreateOrUpdate: %+v", err) @@ -74,7 +75,7 @@ func (c DatabasesClient) CreateOrUpdateThenPoll(ctx context.Context, id Database } // preparerForCreateOrUpdate prepares the CreateOrUpdate request. -func (c DatabasesClient) preparerForCreateOrUpdate(ctx context.Context, id DatabaseId, input Database, options CreateOrUpdateOperationOptions) (*http.Request, error) { +func (c DatabasesClient) preparerForCreateOrUpdate(ctx context.Context, id commonids.KustoDatabaseId, input Database, options CreateOrUpdateOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_databaseinvitefollower_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_databaseinvitefollower_autorest.go index 138c9eb53795..963ad548d072 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_databaseinvitefollower_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_databaseinvitefollower_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type DatabaseInviteFollowerOperationResponse struct { } // DatabaseInviteFollower ... -func (c DatabasesClient) DatabaseInviteFollower(ctx context.Context, id DatabaseId, input DatabaseInviteFollowerRequest) (result DatabaseInviteFollowerOperationResponse, err error) { +func (c DatabasesClient) DatabaseInviteFollower(ctx context.Context, id commonids.KustoDatabaseId, input DatabaseInviteFollowerRequest) (result DatabaseInviteFollowerOperationResponse, err error) { req, err := c.preparerForDatabaseInviteFollower(ctx, id, input) if err != nil { err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "DatabaseInviteFollower", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c DatabasesClient) DatabaseInviteFollower(ctx context.Context, id Database } // preparerForDatabaseInviteFollower prepares the DatabaseInviteFollower request. -func (c DatabasesClient) preparerForDatabaseInviteFollower(ctx context.Context, id DatabaseId, input DatabaseInviteFollowerRequest) (*http.Request, error) { +func (c DatabasesClient) preparerForDatabaseInviteFollower(ctx context.Context, id commonids.KustoDatabaseId, input DatabaseInviteFollowerRequest) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_delete_autorest.go index 13221da85a68..3be60944e575 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_delete_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_delete_autorest.go @@ -8,6 +8,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/hashicorp/go-azure-helpers/polling" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -19,7 +20,7 @@ type DeleteOperationResponse struct { } // Delete ... -func (c DatabasesClient) Delete(ctx context.Context, id DatabaseId) (result DeleteOperationResponse, err error) { +func (c DatabasesClient) Delete(ctx context.Context, id commonids.KustoDatabaseId) (result DeleteOperationResponse, err error) { req, err := c.preparerForDelete(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "Delete", nil, "Failure preparing request") @@ -36,7 +37,7 @@ func (c DatabasesClient) Delete(ctx context.Context, id DatabaseId) (result Dele } // DeleteThenPoll performs Delete then polls until it's completed -func (c DatabasesClient) DeleteThenPoll(ctx context.Context, id DatabaseId) error { +func (c DatabasesClient) DeleteThenPoll(ctx context.Context, id commonids.KustoDatabaseId) error { result, err := c.Delete(ctx, id) if err != nil { return fmt.Errorf("performing Delete: %+v", err) @@ -50,7 +51,7 @@ func (c DatabasesClient) DeleteThenPoll(ctx context.Context, id DatabaseId) erro } // preparerForDelete prepares the Delete request. -func (c DatabasesClient) preparerForDelete(ctx context.Context, id DatabaseId) (*http.Request, error) { +func (c DatabasesClient) preparerForDelete(ctx context.Context, id commonids.KustoDatabaseId) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_get_autorest.go index 57d21e8e3181..56e8553b6dae 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_get_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_get_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type GetOperationResponse struct { } // Get ... -func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOperationResponse, err error) { +func (c DatabasesClient) Get(ctx context.Context, id commonids.KustoDatabaseId) (result GetOperationResponse, err error) { req, err := c.preparerForGet(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "Get", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOper } // preparerForGet prepares the Get request. -func (c DatabasesClient) preparerForGet(ctx context.Context, id DatabaseId) (*http.Request, error) { +func (c DatabasesClient) preparerForGet(ctx context.Context, id commonids.KustoDatabaseId) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_listbycluster_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_listbycluster_autorest.go index 7aa991fd17b7..940a35e25cdf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_listbycluster_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_listbycluster_autorest.go @@ -9,6 +9,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -63,7 +64,7 @@ func (o ListByClusterOperationOptions) toQueryString() map[string]interface{} { } // ListByCluster ... -func (c DatabasesClient) ListByCluster(ctx context.Context, id ClusterId, options ListByClusterOperationOptions) (resp ListByClusterOperationResponse, err error) { +func (c DatabasesClient) ListByCluster(ctx context.Context, id commonids.KustoClusterId, options ListByClusterOperationOptions) (resp ListByClusterOperationResponse, err error) { req, err := c.preparerForListByCluster(ctx, id, options) if err != nil { err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "ListByCluster", nil, "Failure preparing request") @@ -85,7 +86,7 @@ func (c DatabasesClient) ListByCluster(ctx context.Context, id ClusterId, option } // preparerForListByCluster prepares the ListByCluster request. -func (c DatabasesClient) preparerForListByCluster(ctx context.Context, id ClusterId, options ListByClusterOperationOptions) (*http.Request, error) { +func (c DatabasesClient) preparerForListByCluster(ctx context.Context, id commonids.KustoClusterId, options ListByClusterOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } @@ -181,12 +182,12 @@ func (c DatabasesClient) responderForListByCluster(resp *http.Response) (result } // ListByClusterComplete retrieves all of the results into a single object -func (c DatabasesClient) ListByClusterComplete(ctx context.Context, id ClusterId, options ListByClusterOperationOptions) (ListByClusterCompleteResult, error) { +func (c DatabasesClient) ListByClusterComplete(ctx context.Context, id commonids.KustoClusterId, options ListByClusterOperationOptions) (ListByClusterCompleteResult, error) { return c.ListByClusterCompleteMatchingPredicate(ctx, id, options, DatabaseOperationPredicate{}) } // ListByClusterCompleteMatchingPredicate retrieves all of the results and then applied the predicate -func (c DatabasesClient) ListByClusterCompleteMatchingPredicate(ctx context.Context, id ClusterId, options ListByClusterOperationOptions, predicate DatabaseOperationPredicate) (resp ListByClusterCompleteResult, err error) { +func (c DatabasesClient) ListByClusterCompleteMatchingPredicate(ctx context.Context, id commonids.KustoClusterId, options ListByClusterOperationOptions, predicate DatabaseOperationPredicate) (resp ListByClusterCompleteResult, err error) { items := make([]Database, 0) page, err := c.ListByCluster(ctx, id, options) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_listprincipals_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_listprincipals_autorest.go index 9e383796e736..6d12a42cc986 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_listprincipals_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_listprincipals_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type ListPrincipalsOperationResponse struct { } // ListPrincipals ... -func (c DatabasesClient) ListPrincipals(ctx context.Context, id DatabaseId) (result ListPrincipalsOperationResponse, err error) { +func (c DatabasesClient) ListPrincipals(ctx context.Context, id commonids.KustoDatabaseId) (result ListPrincipalsOperationResponse, err error) { req, err := c.preparerForListPrincipals(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "ListPrincipals", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c DatabasesClient) ListPrincipals(ctx context.Context, id DatabaseId) (res } // preparerForListPrincipals prepares the ListPrincipals request. -func (c DatabasesClient) preparerForListPrincipals(ctx context.Context, id DatabaseId) (*http.Request, error) { +func (c DatabasesClient) preparerForListPrincipals(ctx context.Context, id commonids.KustoDatabaseId) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_removeprincipals_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_removeprincipals_autorest.go index 85ff4300f051..1685b46c4adb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_removeprincipals_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_removeprincipals_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type RemovePrincipalsOperationResponse struct { } // RemovePrincipals ... -func (c DatabasesClient) RemovePrincipals(ctx context.Context, id DatabaseId, input DatabasePrincipalListRequest) (result RemovePrincipalsOperationResponse, err error) { +func (c DatabasesClient) RemovePrincipals(ctx context.Context, id commonids.KustoDatabaseId, input DatabasePrincipalListRequest) (result RemovePrincipalsOperationResponse, err error) { req, err := c.preparerForRemovePrincipals(ctx, id, input) if err != nil { err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "RemovePrincipals", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c DatabasesClient) RemovePrincipals(ctx context.Context, id DatabaseId, in } // preparerForRemovePrincipals prepares the RemovePrincipals request. -func (c DatabasesClient) preparerForRemovePrincipals(ctx context.Context, id DatabaseId, input DatabasePrincipalListRequest) (*http.Request, error) { +func (c DatabasesClient) preparerForRemovePrincipals(ctx context.Context, id commonids.KustoDatabaseId, input DatabasePrincipalListRequest) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_update_autorest.go index 2fc55fed49e4..932a82e5f3f4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_update_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases/method_update_autorest.go @@ -8,6 +8,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/hashicorp/go-azure-helpers/polling" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -43,7 +44,7 @@ func (o UpdateOperationOptions) toQueryString() map[string]interface{} { } // Update ... -func (c DatabasesClient) Update(ctx context.Context, id DatabaseId, input Database, options UpdateOperationOptions) (result UpdateOperationResponse, err error) { +func (c DatabasesClient) Update(ctx context.Context, id commonids.KustoDatabaseId, input Database, options UpdateOperationOptions) (result UpdateOperationResponse, err error) { req, err := c.preparerForUpdate(ctx, id, input, options) if err != nil { err = autorest.NewErrorWithError(err, "databases.DatabasesClient", "Update", nil, "Failure preparing request") @@ -60,7 +61,7 @@ func (c DatabasesClient) Update(ctx context.Context, id DatabaseId, input Databa } // UpdateThenPoll performs Update then polls until it's completed -func (c DatabasesClient) UpdateThenPoll(ctx context.Context, id DatabaseId, input Database, options UpdateOperationOptions) error { +func (c DatabasesClient) UpdateThenPoll(ctx context.Context, id commonids.KustoDatabaseId, input Database, options UpdateOperationOptions) error { result, err := c.Update(ctx, id, input, options) if err != nil { return fmt.Errorf("performing Update: %+v", err) @@ -74,7 +75,7 @@ func (c DatabasesClient) UpdateThenPoll(ctx context.Context, id DatabaseId, inpu } // preparerForUpdate prepares the Update request. -func (c DatabasesClient) preparerForUpdate(ctx context.Context, id DatabaseId, input Database, options UpdateOperationOptions) (*http.Request, error) { +func (c DatabasesClient) preparerForUpdate(ctx context.Context, id commonids.KustoDatabaseId, input Database, options UpdateOperationOptions) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/README.md index fedd11ad5542..5a46fdbc34e5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/README.md @@ -24,7 +24,7 @@ client.Client.Authorizer = authorizer ```go ctx := context.TODO() -id := dataconnections.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") +id := dataconnections.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") payload := dataconnections.DataConnectionCheckNameRequest{ // ... @@ -62,7 +62,7 @@ if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { ```go ctx := context.TODO() -id := dataconnections.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") +id := dataconnections.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") payload := dataconnections.DataConnectionValidation{ // ... @@ -107,7 +107,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := dataconnections.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") +id := dataconnections.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") read, err := client.ListByDatabase(ctx, id) if err != nil { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/id_database.go deleted file mode 100644 index 4f95c1b1e44e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/id_database.go +++ /dev/null @@ -1,134 +0,0 @@ -package dataconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DatabaseId{} - -// DatabaseId is a struct representing the Resource ID for a Database -type DatabaseId struct { - SubscriptionId string - ResourceGroupName string - ClusterName string - DatabaseName string -} - -// NewDatabaseID returns a new DatabaseId struct -func NewDatabaseID(subscriptionId string, resourceGroupName string, clusterName string, databaseName string) DatabaseId { - return DatabaseId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ClusterName: clusterName, - DatabaseName: databaseName, - } -} - -// ParseDatabaseID parses 'input' into a DatabaseId -func ParseDatabaseID(input string) (*DatabaseId, error) { - parser := resourceids.NewParserFromResourceIdType(DatabaseId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseDatabaseIDInsensitively parses 'input' case-insensitively into a DatabaseId -// note: this method should only be used for API response data and not user input -func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { - parser := resourceids.NewParserFromResourceIdType(DatabaseId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *DatabaseId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) - } - - if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) - } - - return nil -} - -// ValidateDatabaseID checks that 'input' can be parsed as a Database ID -func ValidateDatabaseID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseDatabaseID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Database ID -func (id DatabaseId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Kusto/clusters/%s/databases/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ClusterName, id.DatabaseName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Database ID -func (id DatabaseId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftKusto", "Microsoft.Kusto", "Microsoft.Kusto"), - resourceids.StaticSegment("staticClusters", "clusters", "clusters"), - resourceids.UserSpecifiedSegment("clusterName", "clusterValue"), - resourceids.StaticSegment("staticDatabases", "databases", "databases"), - resourceids.UserSpecifiedSegment("databaseName", "databaseValue"), - } -} - -// String returns a human-readable description of this Database ID -func (id DatabaseId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cluster Name: %q", id.ClusterName), - fmt.Sprintf("Database Name: %q", id.DatabaseName), - } - return fmt.Sprintf("Database (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/method_checknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/method_checknameavailability_autorest.go index 9546891519b3..662969c849d3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/method_checknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/method_checknameavailability_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type CheckNameAvailabilityOperationResponse struct { } // CheckNameAvailability ... -func (c DataConnectionsClient) CheckNameAvailability(ctx context.Context, id DatabaseId, input DataConnectionCheckNameRequest) (result CheckNameAvailabilityOperationResponse, err error) { +func (c DataConnectionsClient) CheckNameAvailability(ctx context.Context, id commonids.KustoDatabaseId, input DataConnectionCheckNameRequest) (result CheckNameAvailabilityOperationResponse, err error) { req, err := c.preparerForCheckNameAvailability(ctx, id, input) if err != nil { err = autorest.NewErrorWithError(err, "dataconnections.DataConnectionsClient", "CheckNameAvailability", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c DataConnectionsClient) CheckNameAvailability(ctx context.Context, id Dat } // preparerForCheckNameAvailability prepares the CheckNameAvailability request. -func (c DataConnectionsClient) preparerForCheckNameAvailability(ctx context.Context, id DatabaseId, input DataConnectionCheckNameRequest) (*http.Request, error) { +func (c DataConnectionsClient) preparerForCheckNameAvailability(ctx context.Context, id commonids.KustoDatabaseId, input DataConnectionCheckNameRequest) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/method_dataconnectionvalidation_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/method_dataconnectionvalidation_autorest.go index 0cc76ed7492e..386c887a5339 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/method_dataconnectionvalidation_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/method_dataconnectionvalidation_autorest.go @@ -8,6 +8,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/hashicorp/go-azure-helpers/polling" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -19,7 +20,7 @@ type DataConnectionValidationOperationResponse struct { } // DataConnectionValidation ... -func (c DataConnectionsClient) DataConnectionValidation(ctx context.Context, id DatabaseId, input DataConnectionValidation) (result DataConnectionValidationOperationResponse, err error) { +func (c DataConnectionsClient) DataConnectionValidation(ctx context.Context, id commonids.KustoDatabaseId, input DataConnectionValidation) (result DataConnectionValidationOperationResponse, err error) { req, err := c.preparerForDataConnectionValidation(ctx, id, input) if err != nil { err = autorest.NewErrorWithError(err, "dataconnections.DataConnectionsClient", "DataConnectionValidation", nil, "Failure preparing request") @@ -36,7 +37,7 @@ func (c DataConnectionsClient) DataConnectionValidation(ctx context.Context, id } // DataConnectionValidationThenPoll performs DataConnectionValidation then polls until it's completed -func (c DataConnectionsClient) DataConnectionValidationThenPoll(ctx context.Context, id DatabaseId, input DataConnectionValidation) error { +func (c DataConnectionsClient) DataConnectionValidationThenPoll(ctx context.Context, id commonids.KustoDatabaseId, input DataConnectionValidation) error { result, err := c.DataConnectionValidation(ctx, id, input) if err != nil { return fmt.Errorf("performing DataConnectionValidation: %+v", err) @@ -50,7 +51,7 @@ func (c DataConnectionsClient) DataConnectionValidationThenPoll(ctx context.Cont } // preparerForDataConnectionValidation prepares the DataConnectionValidation request. -func (c DataConnectionsClient) preparerForDataConnectionValidation(ctx context.Context, id DatabaseId, input DataConnectionValidation) (*http.Request, error) { +func (c DataConnectionsClient) preparerForDataConnectionValidation(ctx context.Context, id commonids.KustoDatabaseId, input DataConnectionValidation) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/method_listbydatabase_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/method_listbydatabase_autorest.go index 7bbb4800b1e2..8534a517cc6f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/method_listbydatabase_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/method_listbydatabase_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type ListByDatabaseOperationResponse struct { } // ListByDatabase ... -func (c DataConnectionsClient) ListByDatabase(ctx context.Context, id DatabaseId) (result ListByDatabaseOperationResponse, err error) { +func (c DataConnectionsClient) ListByDatabase(ctx context.Context, id commonids.KustoDatabaseId) (result ListByDatabaseOperationResponse, err error) { req, err := c.preparerForListByDatabase(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "dataconnections.DataConnectionsClient", "ListByDatabase", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c DataConnectionsClient) ListByDatabase(ctx context.Context, id DatabaseId } // preparerForListByDatabase prepares the ListByDatabase request. -func (c DataConnectionsClient) preparerForListByDatabase(ctx context.Context, id DatabaseId) (*http.Request, error) { +func (c DataConnectionsClient) preparerForListByDatabase(ctx context.Context, id commonids.KustoDatabaseId) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/README.md index 6c1f45c21502..32926dd55d85 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/README.md @@ -24,7 +24,7 @@ client.Client.Authorizer = authorizer ```go ctx := context.TODO() -id := managedprivateendpoints.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := managedprivateendpoints.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") payload := managedprivateendpoints.ManagedPrivateEndpointsCheckNameRequest{ // ... @@ -90,7 +90,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := managedprivateendpoints.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") +id := managedprivateendpoints.NewKustoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") read, err := client.List(ctx, id) if err != nil { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/id_cluster.go deleted file mode 100644 index 520080b78111..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/id_cluster.go +++ /dev/null @@ -1,125 +0,0 @@ -package managedprivateendpoints - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ClusterId{} - -// ClusterId is a struct representing the Resource ID for a Cluster -type ClusterId struct { - SubscriptionId string - ResourceGroupName string - ClusterName string -} - -// NewClusterID returns a new ClusterId struct -func NewClusterID(subscriptionId string, resourceGroupName string, clusterName string) ClusterId { - return ClusterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ClusterName: clusterName, - } -} - -// ParseClusterID parses 'input' into a ClusterId -func ParseClusterID(input string) (*ClusterId, error) { - parser := resourceids.NewParserFromResourceIdType(ClusterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseClusterIDInsensitively parses 'input' case-insensitively into a ClusterId -// note: this method should only be used for API response data and not user input -func ParseClusterIDInsensitively(input string) (*ClusterId, error) { - parser := resourceids.NewParserFromResourceIdType(ClusterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ClusterId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) - } - - return nil -} - -// ValidateClusterID checks that 'input' can be parsed as a Cluster ID -func ValidateClusterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseClusterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Cluster ID -func (id ClusterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Kusto/clusters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ClusterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Cluster ID -func (id ClusterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftKusto", "Microsoft.Kusto", "Microsoft.Kusto"), - resourceids.StaticSegment("staticClusters", "clusters", "clusters"), - resourceids.UserSpecifiedSegment("clusterName", "clusterValue"), - } -} - -// String returns a human-readable description of this Cluster ID -func (id ClusterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cluster Name: %q", id.ClusterName), - } - return fmt.Sprintf("Cluster (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_checknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_checknameavailability_autorest.go index abee5161dd5e..0b56ff39a2f5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_checknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_checknameavailability_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type CheckNameAvailabilityOperationResponse struct { } // CheckNameAvailability ... -func (c ManagedPrivateEndpointsClient) CheckNameAvailability(ctx context.Context, id ClusterId, input ManagedPrivateEndpointsCheckNameRequest) (result CheckNameAvailabilityOperationResponse, err error) { +func (c ManagedPrivateEndpointsClient) CheckNameAvailability(ctx context.Context, id commonids.KustoClusterId, input ManagedPrivateEndpointsCheckNameRequest) (result CheckNameAvailabilityOperationResponse, err error) { req, err := c.preparerForCheckNameAvailability(ctx, id, input) if err != nil { err = autorest.NewErrorWithError(err, "managedprivateendpoints.ManagedPrivateEndpointsClient", "CheckNameAvailability", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c ManagedPrivateEndpointsClient) CheckNameAvailability(ctx context.Context } // preparerForCheckNameAvailability prepares the CheckNameAvailability request. -func (c ManagedPrivateEndpointsClient) preparerForCheckNameAvailability(ctx context.Context, id ClusterId, input ManagedPrivateEndpointsCheckNameRequest) (*http.Request, error) { +func (c ManagedPrivateEndpointsClient) preparerForCheckNameAvailability(ctx context.Context, id commonids.KustoClusterId, input ManagedPrivateEndpointsCheckNameRequest) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_list_autorest.go index b1559bb330a3..ee07fd39beef 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_list_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_list_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type ListOperationResponse struct { } // List ... -func (c ManagedPrivateEndpointsClient) List(ctx context.Context, id ClusterId) (result ListOperationResponse, err error) { +func (c ManagedPrivateEndpointsClient) List(ctx context.Context, id commonids.KustoClusterId) (result ListOperationResponse, err error) { req, err := c.preparerForList(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "managedprivateendpoints.ManagedPrivateEndpointsClient", "List", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c ManagedPrivateEndpointsClient) List(ctx context.Context, id ClusterId) ( } // preparerForList prepares the List request. -func (c ManagedPrivateEndpointsClient) preparerForList(ctx context.Context, id ClusterId) (*http.Request, error) { +func (c ManagedPrivateEndpointsClient) preparerForList(ctx context.Context, id commonids.KustoClusterId) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/README.md index 347a8d6c618e..c71812fd4b6b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/README.md @@ -24,7 +24,7 @@ client.Client.Authorizer = authorizer ```go ctx := context.TODO() -id := scripts.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") +id := scripts.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") payload := scripts.ScriptCheckNameRequest{ // ... @@ -90,7 +90,7 @@ if model := read.Model; model != nil { ```go ctx := context.TODO() -id := scripts.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") +id := scripts.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue") read, err := client.ListByDatabase(ctx, id) if err != nil { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/id_database.go deleted file mode 100644 index 8c3b1a579655..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/id_database.go +++ /dev/null @@ -1,134 +0,0 @@ -package scripts - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DatabaseId{} - -// DatabaseId is a struct representing the Resource ID for a Database -type DatabaseId struct { - SubscriptionId string - ResourceGroupName string - ClusterName string - DatabaseName string -} - -// NewDatabaseID returns a new DatabaseId struct -func NewDatabaseID(subscriptionId string, resourceGroupName string, clusterName string, databaseName string) DatabaseId { - return DatabaseId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ClusterName: clusterName, - DatabaseName: databaseName, - } -} - -// ParseDatabaseID parses 'input' into a DatabaseId -func ParseDatabaseID(input string) (*DatabaseId, error) { - parser := resourceids.NewParserFromResourceIdType(DatabaseId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseDatabaseIDInsensitively parses 'input' case-insensitively into a DatabaseId -// note: this method should only be used for API response data and not user input -func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { - parser := resourceids.NewParserFromResourceIdType(DatabaseId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *DatabaseId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) - } - - if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) - } - - return nil -} - -// ValidateDatabaseID checks that 'input' can be parsed as a Database ID -func ValidateDatabaseID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseDatabaseID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Database ID -func (id DatabaseId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Kusto/clusters/%s/databases/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ClusterName, id.DatabaseName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Database ID -func (id DatabaseId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftKusto", "Microsoft.Kusto", "Microsoft.Kusto"), - resourceids.StaticSegment("staticClusters", "clusters", "clusters"), - resourceids.UserSpecifiedSegment("clusterName", "clusterValue"), - resourceids.StaticSegment("staticDatabases", "databases", "databases"), - resourceids.UserSpecifiedSegment("databaseName", "databaseValue"), - } -} - -// String returns a human-readable description of this Database ID -func (id DatabaseId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cluster Name: %q", id.ClusterName), - fmt.Sprintf("Database Name: %q", id.DatabaseName), - } - return fmt.Sprintf("Database (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/method_checknameavailability_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/method_checknameavailability_autorest.go index 5c53c0dcb287..3332418e948d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/method_checknameavailability_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/method_checknameavailability_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type CheckNameAvailabilityOperationResponse struct { } // CheckNameAvailability ... -func (c ScriptsClient) CheckNameAvailability(ctx context.Context, id DatabaseId, input ScriptCheckNameRequest) (result CheckNameAvailabilityOperationResponse, err error) { +func (c ScriptsClient) CheckNameAvailability(ctx context.Context, id commonids.KustoDatabaseId, input ScriptCheckNameRequest) (result CheckNameAvailabilityOperationResponse, err error) { req, err := c.preparerForCheckNameAvailability(ctx, id, input) if err != nil { err = autorest.NewErrorWithError(err, "scripts.ScriptsClient", "CheckNameAvailability", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c ScriptsClient) CheckNameAvailability(ctx context.Context, id DatabaseId, } // preparerForCheckNameAvailability prepares the CheckNameAvailability request. -func (c ScriptsClient) preparerForCheckNameAvailability(ctx context.Context, id DatabaseId, input ScriptCheckNameRequest) (*http.Request, error) { +func (c ScriptsClient) preparerForCheckNameAvailability(ctx context.Context, id commonids.KustoDatabaseId, input ScriptCheckNameRequest) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/method_listbydatabase_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/method_listbydatabase_autorest.go index f6194702a46a..59fec2e2a0f1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/method_listbydatabase_autorest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/method_listbydatabase_autorest.go @@ -7,6 +7,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -18,7 +19,7 @@ type ListByDatabaseOperationResponse struct { } // ListByDatabase ... -func (c ScriptsClient) ListByDatabase(ctx context.Context, id DatabaseId) (result ListByDatabaseOperationResponse, err error) { +func (c ScriptsClient) ListByDatabase(ctx context.Context, id commonids.KustoDatabaseId) (result ListByDatabaseOperationResponse, err error) { req, err := c.preparerForListByDatabase(ctx, id) if err != nil { err = autorest.NewErrorWithError(err, "scripts.ScriptsClient", "ListByDatabase", nil, "Failure preparing request") @@ -41,7 +42,7 @@ func (c ScriptsClient) ListByDatabase(ctx context.Context, id DatabaseId) (resul } // preparerForListByDatabase prepares the ListByDatabase request. -func (c ScriptsClient) preparerForListByDatabase(ctx context.Context, id DatabaseId) (*http.Request, error) { +func (c ScriptsClient) preparerForListByDatabase(ctx context.Context, id commonids.KustoDatabaseId) (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": defaultApiVersion, } diff --git a/vendor/modules.txt b/vendor/modules.txt index 0ce207a4148e..ff1f89f605d6 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -157,7 +157,7 @@ github.com/hashicorp/go-azure-helpers/resourcemanager/tags github.com/hashicorp/go-azure-helpers/resourcemanager/zones github.com/hashicorp/go-azure-helpers/sender github.com/hashicorp/go-azure-helpers/storage -# github.com/hashicorp/go-azure-sdk v0.20240110.1102249 +# github.com/hashicorp/go-azure-sdk v0.20240111.1094251 ## explicit; go 1.21 github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview