diff --git a/go.mod b/go.mod index 1f8ecaaeb558..f02c3c013952 100644 --- a/go.mod +++ b/go.mod @@ -16,8 +16,8 @@ require ( github.com/golang-jwt/jwt/v4 v4.5.0 github.com/google/go-cmp v0.5.9 github.com/google/uuid v1.3.1 - github.com/hashicorp/go-azure-helpers v0.63.0 - github.com/hashicorp/go-azure-sdk v0.20231124.1163225 + github.com/hashicorp/go-azure-helpers v0.64.0 + github.com/hashicorp/go-azure-sdk v0.20231129.1103252 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 066de7607e18..cc28bb6a85fe 100644 --- a/go.sum +++ b/go.sum @@ -111,10 +111,10 @@ github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-azure-helpers v0.12.0/go.mod h1:Zc3v4DNeX6PDdy7NljlYpnrdac1++qNW0I4U+ofGwpg= -github.com/hashicorp/go-azure-helpers v0.63.0 h1:7bYnYZsqzPjxVevi0z8Irwp5DwS8okLcaA183DQAcmY= -github.com/hashicorp/go-azure-helpers v0.63.0/go.mod h1:ELmZ65vzHJNTk6ml4jsPD+xq2gZb7t78D35s+XN02Kk= -github.com/hashicorp/go-azure-sdk v0.20231124.1163225 h1:ko/p/fRdcjxqnGiwcLKVysoYXr8T66EgfrB/3Hqntcw= -github.com/hashicorp/go-azure-sdk v0.20231124.1163225/go.mod h1:mdU6Hrw1jPiwBFmENOcjRlkMWi6yRI0Tt+p4vmPvc0g= +github.com/hashicorp/go-azure-helpers v0.64.0 h1:JNTt0F7tbApmpmF9hzNq2TN1lduOiXJFkMFoAPVctK8= +github.com/hashicorp/go-azure-helpers v0.64.0/go.mod h1:ELmZ65vzHJNTk6ml4jsPD+xq2gZb7t78D35s+XN02Kk= +github.com/hashicorp/go-azure-sdk v0.20231129.1103252 h1:H5SzxFYj++yIwN4o3WeEz0qMDFDOGeQt+H/j0yyhhz8= +github.com/hashicorp/go-azure-sdk v0.20231129.1103252/go.mod h1:MfF4SCtGLaSP7OeJk+Y3xd4MQL5tFbz31c+ERP1S9D0= 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/internal/services/mssql/helper/database.go b/internal/services/mssql/helper/database.go index 7687ec390d65..325395a50d9b 100644 --- a/internal/services/mssql/helper/database.go +++ b/internal/services/mssql/helper/database.go @@ -10,6 +10,7 @@ import ( "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-06-01/resources" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/utils" @@ -18,7 +19,7 @@ import ( // FindDatabaseReplicationPartners looks for partner databases having one of the specified replication roles, by // reading any replication links then attempting to discover and match the corresponding server/database resources for // the other end of the link. -func FindDatabaseReplicationPartners(ctx context.Context, databasesClient *sql.DatabasesClient, replicationLinksClient *sql.ReplicationLinksClient, resourcesClient *resources.Client, id parse.DatabaseId, rolesToFind []sql.ReplicationRole) ([]sql.Database, error) { +func FindDatabaseReplicationPartners(ctx context.Context, databasesClient *sql.DatabasesClient, replicationLinksClient *sql.ReplicationLinksClient, resourcesClient *resources.Client, id commonids.SqlDatabaseId, rolesToFind []sql.ReplicationRole) ([]sql.Database, error) { var partnerDatabases []sql.Database matchesRole := func(role sql.ReplicationRole) bool { @@ -30,7 +31,7 @@ func FindDatabaseReplicationPartners(ctx context.Context, databasesClient *sql.D return false } - for linksIterator, err := replicationLinksClient.ListByDatabaseComplete(ctx, id.ResourceGroup, id.ServerName, id.Name); linksIterator.NotDone(); err = linksIterator.NextWithContext(ctx) { + for linksIterator, err := replicationLinksClient.ListByDatabaseComplete(ctx, id.ResourceGroupName, id.ServerName, id.DatabaseName); linksIterator.NotDone(); err = linksIterator.NextWithContext(ctx) { if err != nil { return nil, fmt.Errorf("reading Replication Links for %s: %+v", id, err) } @@ -91,8 +92,8 @@ func FindDatabaseReplicationPartners(ctx context.Context, databasesClient *sql.D // If the database has a replication link for the specified role, we'll consider it a partner of this database if the location is the same as expected partner if matchesRole(linkPropsPossiblePartner.Role) { - partnerDatabaseId := parse.NewDatabaseID(partnerServerId.SubscriptionId, partnerServerId.ResourceGroup, partnerServerId.Name, *linkProps.PartnerDatabase) - partnerDatabase, err := databasesClient.Get(ctx, partnerDatabaseId.ResourceGroup, partnerDatabaseId.ServerName, partnerDatabaseId.Name) + partnerDatabaseId := commonids.NewSqlDatabaseID(partnerServerId.SubscriptionId, partnerServerId.ResourceGroup, partnerServerId.Name, *linkProps.PartnerDatabase) + partnerDatabase, err := databasesClient.Get(ctx, partnerDatabaseId.ResourceGroupName, partnerDatabaseId.ServerName, partnerDatabaseId.DatabaseName) if err != nil { return nil, fmt.Errorf("retrieving Partner %s: %+v", partnerDatabaseId, err) } diff --git a/internal/services/mssql/mssql_database_extended_auditing_policy_resource.go b/internal/services/mssql/mssql_database_extended_auditing_policy_resource.go index 814beab390c0..9c3126a6ce27 100644 --- a/internal/services/mssql/mssql_database_extended_auditing_policy_resource.go +++ b/internal/services/mssql/mssql_database_extended_auditing_policy_resource.go @@ -14,7 +14,6 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" @@ -45,7 +44,7 @@ func resourceMsSqlDatabaseExtendedAuditingPolicy() *pluginsdk.Resource { Type: pluginsdk.TypeString, Required: true, ForceNew: true, - ValidateFunc: validate.DatabaseID, + ValidateFunc: commonids.ValidateSqlDatabaseID, }, "enabled": { @@ -96,13 +95,13 @@ func resourceMsSqlDatabaseExtendedAuditingPolicyCreateUpdate(d *pluginsdk.Resour log.Printf("[INFO] preparing arguments for MsSql Database Extended Auditing Policy creation.") - dbId, err := parse.DatabaseID(d.Get("database_id").(string)) + dbId, err := commonids.ParseSqlDatabaseID(d.Get("database_id").(string)) if err != nil { return err } if d.IsNewResource() { - existing, err := client.Get(ctx, dbId.ResourceGroup, dbId.ServerName, dbId.Name) + existing, err := client.Get(ctx, dbId.ResourceGroupName, dbId.ServerName, dbId.DatabaseName) if err != nil { if !utils.ResponseWasNotFound(existing.Response) { return fmt.Errorf("checking for the presence of existing %s: %+v", dbId, err) @@ -134,11 +133,11 @@ func resourceMsSqlDatabaseExtendedAuditingPolicyCreateUpdate(d *pluginsdk.Resour params.ExtendedDatabaseBlobAuditingPolicyProperties.StorageAccountAccessKey = utils.String(v.(string)) } - if _, err = client.CreateOrUpdate(ctx, dbId.ResourceGroup, dbId.ServerName, dbId.Name, params); err != nil { + if _, err = client.CreateOrUpdate(ctx, dbId.ResourceGroupName, dbId.ServerName, dbId.DatabaseName, params); err != nil { return fmt.Errorf("creating extended auditing policy for %s: %+v", dbId, err) } - read, err := client.Get(ctx, dbId.ResourceGroup, dbId.ServerName, dbId.Name) + read, err := client.Get(ctx, dbId.ResourceGroupName, dbId.ServerName, dbId.DatabaseName) if err != nil { return fmt.Errorf("retrieving the extended auditing policy for %s: %+v", dbId, err) } diff --git a/internal/services/mssql/mssql_database_resource.go b/internal/services/mssql/mssql_database_resource.go index 0a4bac92eabf..c5ccff259ede 100644 --- a/internal/services/mssql/mssql_database_resource.go +++ b/internal/services/mssql/mssql_database_resource.go @@ -31,7 +31,6 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/helper" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/migration" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress" @@ -48,7 +47,7 @@ func resourceMsSqlDatabase() *pluginsdk.Resource { Delete: resourceMsSqlDatabaseDelete, Importer: pluginsdk.ImporterValidatingResourceIdThen(func(id string) error { - _, err := parse.DatabaseID(id) + _, err := commonids.ParseSqlDatabaseID(id) return err }, resourceMsSqlDatabaseImporter), @@ -88,7 +87,7 @@ func resourceMsSqlDatabaseImporter(ctx context.Context, d *pluginsdk.ResourceDat legacyreplicationLinksClient := meta.(*clients.Client).MSSQL.LegacyReplicationLinksClient resourcesClient := meta.(*clients.Client).Resource.ResourcesClient - id, err := parse.DatabaseID(d.Id()) + id, err := commonids.ParseSqlDatabaseID(d.Id()) if err != nil { return nil, err } @@ -101,7 +100,7 @@ func resourceMsSqlDatabaseImporter(ctx context.Context, d *pluginsdk.ResourceDat if len(partnerDatabases) > 0 { partnerDatabase := partnerDatabases[0] - partnerDatabaseId, err := parse.DatabaseID(*partnerDatabase.ID) + partnerDatabaseId, err := commonids.ParseSqlDatabaseIDInsensitively(*partnerDatabase.ID) if err != nil { return nil, fmt.Errorf("parsing ID for Replication Partner Database %q: %+v", *partnerDatabase.ID, err) } @@ -186,20 +185,15 @@ func resourceMsSqlDatabaseCreate(d *pluginsdk.ResourceData, meta interface{}) er locks.ByID(id.ID()) defer locks.UnlockByID(id.ID()) - legacyId, err := parse.DatabaseID(id.ID()) - if err != nil { - return fmt.Errorf("parsing ID for Replication Partner Database %s: %+v", id, err) - } - if skuName := d.Get("sku_name"); skuName != "" { - partnerDatabases, err := helper.FindDatabaseReplicationPartners(ctx, legacyClient, legacyReplicationLinksClient, resourcesClient, *legacyId, []sql.ReplicationRole{sql.ReplicationRoleSecondary, sql.ReplicationRoleNonReadableSecondary}) + partnerDatabases, err := helper.FindDatabaseReplicationPartners(ctx, legacyClient, legacyReplicationLinksClient, resourcesClient, id, []sql.ReplicationRole{sql.ReplicationRoleSecondary, sql.ReplicationRoleNonReadableSecondary}) if err != nil { return err } // Place a lock for the partner databases, so they can't update themselves whilst we're poking their SKUs for _, partnerDatabase := range partnerDatabases { - partnerDatabaseId, err := parse.DatabaseID(*partnerDatabase.ID) + partnerDatabaseId, err := commonids.ParseSqlDatabaseIDInsensitively(*partnerDatabase.ID) if err != nil { return fmt.Errorf("parsing ID for Replication Partner Database %q: %+v", *partnerDatabase.ID, err) } @@ -210,14 +204,14 @@ func resourceMsSqlDatabaseCreate(d *pluginsdk.ResourceData, meta interface{}) er // Update the SKUs of any partner databases where deemed necessary for _, partnerDatabase := range partnerDatabases { - partnerDatabaseId, err := parse.DatabaseID(*partnerDatabase.ID) + partnerDatabaseId, err := commonids.ParseSqlDatabaseIDInsensitively(*partnerDatabase.ID) if err != nil { return fmt.Errorf("parsing ID for Replication Partner Database %q: %+v", *partnerDatabase.ID, err) } // See: https://docs.microsoft.com/en-us/azure/azure-sql/database/active-geo-replication-overview#configuring-secondary-database if partnerDatabase.Sku != nil && partnerDatabase.Sku.Name != nil && helper.CompareDatabaseSkuServiceTiers(skuName.(string), *partnerDatabase.Sku.Name) { - future, err := legacyClient.Update(ctx, partnerDatabaseId.ResourceGroup, partnerDatabaseId.ServerName, partnerDatabaseId.Name, sql.DatabaseUpdate{ + future, err := legacyClient.Update(ctx, partnerDatabaseId.ResourceGroupName, partnerDatabaseId.ServerName, partnerDatabaseId.DatabaseName, sql.DatabaseUpdate{ Sku: &sql.Sku{ Name: utils.String(skuName.(string)), }, @@ -495,7 +489,7 @@ func resourceMsSqlDatabaseRead(d *pluginsdk.ResourceData, meta interface{}) erro ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := commonids.ParseDatabaseID(d.Id()) + id, err := commonids.ParseSqlDatabaseID(d.Id()) if err != nil { return err } @@ -720,20 +714,15 @@ func resourceMsSqlDatabaseUpdate(d *pluginsdk.ResourceData, meta interface{}) er locks.ByID(id.ID()) defer locks.UnlockByID(id.ID()) - legacyId, err := parse.DatabaseID(id.ID()) - if err != nil { - return fmt.Errorf("parsing ID for Replication Partner Database %s: %+v", id, err) - } - if d.HasChange("sku_name") && skuName != "" { - partnerDatabases, err := helper.FindDatabaseReplicationPartners(ctx, legacyClient, legacyReplicationLinksClient, resourcesClient, *legacyId, []sql.ReplicationRole{sql.ReplicationRoleSecondary, sql.ReplicationRoleNonReadableSecondary}) + partnerDatabases, err := helper.FindDatabaseReplicationPartners(ctx, legacyClient, legacyReplicationLinksClient, resourcesClient, id, []sql.ReplicationRole{sql.ReplicationRoleSecondary, sql.ReplicationRoleNonReadableSecondary}) if err != nil { return err } // Place a lock for the partner databases, so they can't update themselves whilst we're poking their SKUs for _, v := range partnerDatabases { - id, err := parse.DatabaseID(pointer.From(v.ID)) + id, err := commonids.ParseSqlDatabaseIDInsensitively(pointer.From(v.ID)) if err != nil { return fmt.Errorf("parsing ID for Replication Partner Database %q: %+v", id.ID(), err) } @@ -744,14 +733,14 @@ func resourceMsSqlDatabaseUpdate(d *pluginsdk.ResourceData, meta interface{}) er // Update the SKUs of any partner databases where deemed necessary for _, partnerDatabase := range partnerDatabases { - partnerDatabaseId, err := parse.DatabaseID(*partnerDatabase.ID) + partnerDatabaseId, err := commonids.ParseSqlDatabaseIDInsensitively(*partnerDatabase.ID) if err != nil { return fmt.Errorf("parsing ID for Replication Partner Database %q: %+v", *partnerDatabase.ID, err) } // See: https://docs.microsoft.com/en-us/azure/azure-sql/database/active-geo-replication-overview#configuring-secondary-database if partnerDatabase.Sku != nil && partnerDatabase.Sku.Name != nil && helper.CompareDatabaseSkuServiceTiers(skuName, *partnerDatabase.Sku.Name) { - future, err := legacyClient.Update(ctx, partnerDatabaseId.ResourceGroup, partnerDatabaseId.ServerName, partnerDatabaseId.Name, sql.DatabaseUpdate{ + future, err := legacyClient.Update(ctx, partnerDatabaseId.ResourceGroupName, partnerDatabaseId.ServerName, partnerDatabaseId.DatabaseName, sql.DatabaseUpdate{ Sku: &sql.Sku{ Name: pointer.To(skuName), }, @@ -1047,12 +1036,12 @@ func resourceMsSqlDatabaseDelete(d *pluginsdk.ResourceData, meta interface{}) er ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := commonids.ParseDatabaseID(d.Id()) + id, err := commonids.ParseSqlDatabaseID(d.Id()) if err != nil { return err } - err = client.DeleteThenPoll(ctx, pointer.From(id)) + err = client.DeleteThenPoll(ctx, *id) if err != nil { return fmt.Errorf("deleting %s: %+v", id, err) } @@ -1382,7 +1371,7 @@ func resourceMsSqlDatabaseSchema() map[string]*pluginsdk.Schema { Optional: true, ForceNew: true, Computed: true, - ValidateFunc: validate.DatabaseID, + ValidateFunc: commonids.ValidateSqlDatabaseID, }, "storage_account_type": { diff --git a/internal/services/mssql/mssql_database_resource_test.go b/internal/services/mssql/mssql_database_resource_test.go index 71cc2aabbf0c..f0bb9a203997 100644 --- a/internal/services/mssql/mssql_database_resource_test.go +++ b/internal/services/mssql/mssql_database_resource_test.go @@ -794,7 +794,7 @@ func TestAccMsSqlDatabase_bacpac(t *testing.T) { } func (MsSqlDatabaseResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := commonids.ParseDatabaseID(state.ID) + id, err := commonids.ParseSqlDatabaseID(state.ID) if err != nil { return nil, err } diff --git a/internal/services/mssql/mssql_job_agent_resource.go b/internal/services/mssql/mssql_job_agent_resource.go index 0ca4b7167c80..faec0efed217 100644 --- a/internal/services/mssql/mssql_job_agent_resource.go +++ b/internal/services/mssql/mssql_job_agent_resource.go @@ -9,6 +9,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v5.0/sql" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" @@ -52,7 +53,7 @@ func resourceMsSqlJobAgent() *pluginsdk.Resource { Type: pluginsdk.TypeString, Required: true, ForceNew: true, - ValidateFunc: validate.DatabaseID, + ValidateFunc: commonids.ValidateSqlDatabaseID, }, "location": commonschema.Location(), @@ -71,8 +72,11 @@ func resourceMsSqlJobAgentCreateUpdate(d *pluginsdk.ResourceData, meta interface location := azure.NormalizeLocation(d.Get("location").(string)) databaseId := d.Get("database_id").(string) - dbId, _ := parse.DatabaseID(databaseId) - id := parse.NewJobAgentID(dbId.SubscriptionId, dbId.ResourceGroup, dbId.ServerName, d.Get("name").(string)) + dbId, err := commonids.ParseSqlDatabaseID(databaseId) + if err != nil { + return err + } + id := parse.NewJobAgentID(dbId.SubscriptionId, dbId.ResourceGroupName, dbId.ServerName, d.Get("name").(string)) if d.IsNewResource() { existing, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.Name) diff --git a/internal/services/mssql/parse/database.go b/internal/services/mssql/parse/database.go deleted file mode 100644 index 18e9304e35b5..000000000000 --- a/internal/services/mssql/parse/database.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type DatabaseId struct { - SubscriptionId string - ResourceGroup string - ServerName string - Name string -} - -func NewDatabaseID(subscriptionId, resourceGroup, serverName, name string) DatabaseId { - return DatabaseId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - ServerName: serverName, - Name: name, - } -} - -func (id DatabaseId) String() string { - segments := []string{ - fmt.Sprintf("Name %q", id.Name), - fmt.Sprintf("Server Name %q", id.ServerName), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Database", segmentsStr) -} - -func (id DatabaseId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Sql/servers/%s/databases/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.ServerName, id.Name) -} - -// DatabaseID parses a Database ID into an DatabaseId struct -func DatabaseID(input string) (*DatabaseId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, fmt.Errorf("parsing %q as an Database ID: %+v", input, err) - } - - resourceId := DatabaseId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.ServerName, err = id.PopSegment("servers"); err != nil { - return nil, err - } - if resourceId.Name, err = id.PopSegment("databases"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/mssql/parse/database_test.go b/internal/services/mssql/parse/database_test.go deleted file mode 100644 index 561fce7c9cb2..000000000000 --- a/internal/services/mssql/parse/database_test.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = DatabaseId{} - -func TestDatabaseIDFormatter(t *testing.T) { - actual := NewDatabaseID("12345678-1234-9876-4563-123456789012", "group1", "server1", "database1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/database1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestDatabaseID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DatabaseId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/", - Error: true, - }, - - { - // missing value for ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/servers/", - Error: true, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/", - Error: true, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/database1", - Expected: &DatabaseId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "group1", - ServerName: "server1", - Name: "database1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.SQL/SERVERS/SERVER1/DATABASES/DATABASE1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := DatabaseID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - if actual.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.ServerName != v.Expected.ServerName { - t.Fatalf("Expected %q but got %q for ServerName", v.Expected.ServerName, actual.ServerName) - } - if actual.Name != v.Expected.Name { - t.Fatalf("Expected %q but got %q for Name", v.Expected.Name, actual.Name) - } - } -} diff --git a/internal/services/mssql/resourceids.go b/internal/services/mssql/resourceids.go index 6c5153389218..fd972edfcc57 100644 --- a/internal/services/mssql/resourceids.go +++ b/internal/services/mssql/resourceids.go @@ -3,7 +3,6 @@ package mssql -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=Database -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/database1 //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=DatabaseExtendedAuditingPolicy -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/database1/extendedAuditingSettings/default //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=DatabaseVulnerabilityAssessmentRuleBaseline -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/database1/vulnerabilityAssessments/default/rules/rule1/baselines/baseline1 //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=ElasticPool -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/elasticPools/pool1 diff --git a/internal/services/mssql/validate/database_id.go b/internal/services/mssql/validate/database_id.go deleted file mode 100644 index 0c78774804c1..000000000000 --- a/internal/services/mssql/validate/database_id.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" -) - -func DatabaseID(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 := parse.DatabaseID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/mssql/validate/database_id_test.go b/internal/services/mssql/validate/database_id_test.go deleted file mode 100644 index 192c0166df2a..000000000000 --- a/internal/services/mssql/validate/database_id_test.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestDatabaseID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/", - Valid: false, - }, - - { - // missing value for ServerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/servers/", - Valid: false, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/", - Valid: false, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/database1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.SQL/SERVERS/SERVER1/DATABASES/DATABASE1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := DatabaseID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/synapse/synapse_sql_pool_resource.go b/internal/services/synapse/synapse_sql_pool_resource.go index 7a0949545475..070094f64473 100644 --- a/internal/services/synapse/synapse_sql_pool_resource.go +++ b/internal/services/synapse/synapse_sql_pool_resource.go @@ -11,10 +11,10 @@ import ( "github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/v2.0/synapse" // nolint: staticcheck "github.com/Azure/go-autorest/autorest/date" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/features" - mssqlParse "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/parse" mssqlValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/services/synapse/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/synapse/validate" @@ -123,7 +123,7 @@ func resourceSynapseSqlPool() *pluginsdk.Resource { ValidateFunc: validation.Any( validate.SqlPoolID, validate.SqlPoolRecoverableDatabaseID, - mssqlValidate.DatabaseID, + commonids.ValidateSqlDatabaseID, mssqlValidate.RecoverableDatabaseID, ), }, @@ -149,7 +149,7 @@ func resourceSynapseSqlPool() *pluginsdk.Resource { ForceNew: true, ValidateFunc: validation.Any( validate.SqlPoolID, - mssqlValidate.DatabaseID, + commonids.ValidateSqlDatabaseID, ), }, }, @@ -524,5 +524,5 @@ func constructSourceDatabaseId(id string) string { return id } - return mssqlParse.NewDatabaseID(sqlPoolId.SubscriptionId, sqlPoolId.ResourceGroup, sqlPoolId.WorkspaceName, sqlPoolId.Name).ID() + return commonids.NewSqlDatabaseID(sqlPoolId.SubscriptionId, sqlPoolId.ResourceGroup, sqlPoolId.WorkspaceName, sqlPoolId.Name).ID() } diff --git a/vendor/github.com/hashicorp/go-azure-helpers/resourcemanager/commonids/fleet.go b/vendor/github.com/hashicorp/go-azure-helpers/resourcemanager/commonids/fleet.go new file mode 100644 index 000000000000..f507c5b94c4d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-helpers/resourcemanager/commonids/fleet.go @@ -0,0 +1,127 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package commonids + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = FleetId{} + +// FleetId is a struct representing the Resource ID for a Fleet +type FleetId struct { + SubscriptionId string + ResourceGroupName string + FleetName string +} + +// NewFleetID returns a new FleetId struct +func NewFleetID(subscriptionId string, resourceGroupName string, fleetName string) FleetId { + return FleetId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + FleetName: fleetName, + } +} + +// ParseFleetID parses 'input' into a FleetId +func ParseFleetID(input string) (*FleetId, error) { + parser := resourceids.NewParserFromResourceIdType(FleetId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := FleetId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + } + + if id.FleetName, ok = parsed.Parsed["fleetName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "fleetName", *parsed) + } + + return &id, nil +} + +// ParseFleetIDInsensitively parses 'input' case-insensitively into a FleetId +// note: this method should only be used for API response data and not user input +func ParseFleetIDInsensitively(input string) (*FleetId, error) { + parser := resourceids.NewParserFromResourceIdType(FleetId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := FleetId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + } + + if id.FleetName, ok = parsed.Parsed["fleetName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "fleetName", *parsed) + } + + return &id, nil +} + +// ValidateFleetID checks that 'input' can be parsed as a Fleet ID +func ValidateFleetID(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 := ParseFleetID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Fleet ID +func (id FleetId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.ContainerService/fleets/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FleetName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Fleet ID +func (id FleetId) 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("staticMicrosoftContainerService", "Microsoft.ContainerService", "Microsoft.ContainerService"), + resourceids.StaticSegment("staticFleets", "fleets", "fleets"), + resourceids.UserSpecifiedSegment("fleetName", "fleetValue"), + } +} + +// String returns a human-readable description of this Fleet ID +func (id FleetId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Fleet Name: %q", id.FleetName), + } + return fmt.Sprintf("Fleet (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-helpers/resourcemanager/commonids/hdinsight_cluster.go b/vendor/github.com/hashicorp/go-azure-helpers/resourcemanager/commonids/hdinsight_cluster.go new file mode 100644 index 000000000000..753302a47934 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-helpers/resourcemanager/commonids/hdinsight_cluster.go @@ -0,0 +1,127 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package commonids + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = HDInsightClusterId{} + +// HDInsightClusterId is a struct representing the Resource ID for a HDInsight Cluster +type HDInsightClusterId struct { + SubscriptionId string + ResourceGroupName string + ClusterName string +} + +// NewHDInsightClusterID returns a new HDInsightClusterId struct +func NewHDInsightClusterID(subscriptionId string, resourceGroupName string, clusterName string) HDInsightClusterId { + return HDInsightClusterId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ClusterName: clusterName, + } +} + +// ParseHDInsightClusterID parses 'input' into a HDInsightClusterId +func ParseHDInsightClusterID(input string) (*HDInsightClusterId, error) { + parser := resourceids.NewParserFromResourceIdType(HDInsightClusterId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := HDInsightClusterId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + } + + if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + } + + return &id, nil +} + +// ParseHDInsightClusterIDInsensitively parses 'input' case-insensitively into a HDInsightClusterId +// note: this method should only be used for API response data and not user input +func ParseHDInsightClusterIDInsensitively(input string) (*HDInsightClusterId, error) { + parser := resourceids.NewParserFromResourceIdType(HDInsightClusterId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := HDInsightClusterId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + } + + if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + } + + return &id, nil +} + +// ValidateHDInsightClusterID checks that 'input' can be parsed as a HDInsight Cluster ID +func ValidateHDInsightClusterID(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 := ParseHDInsightClusterID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted HDInsight Cluster ID +func (id HDInsightClusterId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HDInsight/clusters/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ClusterName) +} + +// Segments returns a slice of Resource ID Segments which comprise this HDInsight Cluster ID +func (id HDInsightClusterId) 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("staticMicrosoftHDInsight", "Microsoft.HDInsight", "Microsoft.HDInsight"), + resourceids.StaticSegment("staticClusters", "clusters", "clusters"), + resourceids.UserSpecifiedSegment("clusterName", "clusterValue"), + } +} + +// String returns a human-readable description of this HDInsight Cluster ID +func (id HDInsightClusterId) 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("HDInsight Cluster (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-helpers/resourcemanager/commonids/sql_database.go b/vendor/github.com/hashicorp/go-azure-helpers/resourcemanager/commonids/sql_database.go index 8be362d36695..f8ea32c4512c 100644 --- a/vendor/github.com/hashicorp/go-azure-helpers/resourcemanager/commonids/sql_database.go +++ b/vendor/github.com/hashicorp/go-azure-helpers/resourcemanager/commonids/sql_database.go @@ -30,8 +30,8 @@ func NewSqlDatabaseID(subscriptionId string, resourceGroupName string, serverNam } } -// ParseDatabaseID parses 'input' into a SqlDatabaseId -func ParseDatabaseID(input string) (*SqlDatabaseId, error) { +// ParseSqlDatabaseID parses 'input' into a SqlDatabaseId +func ParseSqlDatabaseID(input string) (*SqlDatabaseId, error) { parser := resourceids.NewParserFromResourceIdType(SqlDatabaseId{}) parsed, err := parser.Parse(input, false) if err != nil { @@ -99,7 +99,7 @@ func ValidateSqlDatabaseID(input interface{}, key string) (warnings []string, er return } - if _, err := ParseDatabaseID(v); err != nil { + if _, err := ParseSqlDatabaseID(v); err != nil { errors = append(errors, err) } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/id_domainservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/id_domainservice.go index f84e9fbeb221..ee4bf900d3be 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/id_domainservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices/id_domainservice.go @@ -36,19 +36,9 @@ func ParseDomainServiceID(input string) (*DomainServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DomainServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DomainServiceName, ok = parsed.Parsed["domainServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDomainServiceIDInsensitively(input string) (*DomainServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DomainServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DomainServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DomainServiceName, ok = parsed.Parsed["domainServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainServiceName", *parsed) + if id.DomainServiceName, ok = input.Parsed["domainServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "domainServiceName", input) } - return &id, nil + return nil } // ValidateDomainServiceID checks that 'input' can be parsed as a Domain Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/id_b2cdirectory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/id_b2cdirectory.go index 034bf68ba424..07b6b5c65c07 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/id_b2cdirectory.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants/id_b2cdirectory.go @@ -36,19 +36,9 @@ func ParseB2CDirectoryID(input string) (*B2CDirectoryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := B2CDirectoryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroup, ok = parsed.Parsed["resourceGroup"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroup", *parsed) - } - - if id.DirectoryName, ok = parsed.Parsed["directoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "directoryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseB2CDirectoryIDInsensitively(input string) (*B2CDirectoryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := B2CDirectoryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *B2CDirectoryId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroup, ok = parsed.Parsed["resourceGroup"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroup", *parsed) + if id.ResourceGroup, ok = input.Parsed["resourceGroup"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroup", input) } - if id.DirectoryName, ok = parsed.Parsed["directoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "directoryName", *parsed) + if id.DirectoryName, ok = input.Parsed["directoryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "directoryName", input) } - return &id, nil + return nil } // ValidateB2CDirectoryID checks that 'input' can be parsed as a B 2 C Directory ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2020-01-01/getrecommendations/id_scopedrecommendation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2020-01-01/getrecommendations/id_scopedrecommendation.go index fc0c5f370142..5c26532aa4a1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2020-01-01/getrecommendations/id_scopedrecommendation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2020-01-01/getrecommendations/id_scopedrecommendation.go @@ -34,15 +34,9 @@ func ParseScopedRecommendationID(input string) (*ScopedRecommendationId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRecommendationId{} - - if id.ResourceUri, ok = parsed.Parsed["resourceUri"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", *parsed) - } - - if id.RecommendationId, ok = parsed.Parsed["recommendationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "recommendationId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedRecommendationIDInsensitively(input string) (*ScopedRecommendati return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRecommendationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.ResourceUri, ok = parsed.Parsed["resourceUri"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", *parsed) + return &id, nil +} + +func (id *ScopedRecommendationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ResourceUri, ok = input.Parsed["resourceUri"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", input) } - if id.RecommendationId, ok = parsed.Parsed["recommendationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "recommendationId", *parsed) + if id.RecommendationId, ok = input.Parsed["recommendationId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "recommendationId", input) } - return &id, nil + return nil } // ValidateScopedRecommendationID checks that 'input' can be parsed as a Scoped Recommendation ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/id_actionrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/id_actionrule.go index a8adc5404d36..298ec2bc6f45 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/id_actionrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/id_actionrule.go @@ -36,19 +36,9 @@ func ParseActionRuleID(input string) (*ActionRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ActionRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ActionRuleName, ok = parsed.Parsed["actionRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "actionRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseActionRuleIDInsensitively(input string) (*ActionRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ActionRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ActionRuleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ActionRuleName, ok = parsed.Parsed["actionRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "actionRuleName", *parsed) + if id.ActionRuleName, ok = input.Parsed["actionRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "actionRuleName", input) } - return &id, nil + return nil } // ValidateActionRuleID checks that 'input' can be parsed as a Action Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/id_prometheusrulegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/id_prometheusrulegroup.go index 182aa1a5c087..f208c8b26957 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/id_prometheusrulegroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/id_prometheusrulegroup.go @@ -36,19 +36,9 @@ func ParsePrometheusRuleGroupID(input string) (*PrometheusRuleGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrometheusRuleGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrometheusRuleGroupName, ok = parsed.Parsed["prometheusRuleGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "prometheusRuleGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePrometheusRuleGroupIDInsensitively(input string) (*PrometheusRuleGroup return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrometheusRuleGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PrometheusRuleGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrometheusRuleGroupName, ok = parsed.Parsed["prometheusRuleGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "prometheusRuleGroupName", *parsed) + if id.PrometheusRuleGroupName, ok = input.Parsed["prometheusRuleGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "prometheusRuleGroupName", input) } - return &id, nil + return nil } // ValidatePrometheusRuleGroupID checks that 'input' can be parsed as a Prometheus Rule Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/id_location.go index fcb439a960f7..78c6c7402119 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/id_server.go index fa7bc4cec62c..8305f4a52161 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/api/id_api.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/api/id_api.go index b76a03a3ca43..7a0a77e48eee 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/api/id_api.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/api/id_api.go @@ -38,23 +38,9 @@ func ParseApiID(input string) (*ApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApiId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - return &id, nil + return nil } // ValidateApiID checks that 'input' can be parsed as a Api ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/api/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/api/id_service.go index c8e90bbf8044..6a1e3ffbf4c4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/api/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/api/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apidiagnostic/id_api.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apidiagnostic/id_api.go index 458b69d35bb0..966579523933 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apidiagnostic/id_api.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apidiagnostic/id_api.go @@ -38,23 +38,9 @@ func ParseApiID(input string) (*ApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApiId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - return &id, nil + return nil } // ValidateApiID checks that 'input' can be parsed as a Api ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apidiagnostic/id_apidiagnostic.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apidiagnostic/id_apidiagnostic.go index c2dc08baea88..0e3e95f43696 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apidiagnostic/id_apidiagnostic.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apidiagnostic/id_apidiagnostic.go @@ -40,27 +40,9 @@ func ParseApiDiagnosticID(input string) (*ApiDiagnosticId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiDiagnosticId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) - } - - if id.DiagnosticId, ok = parsed.Parsed["diagnosticId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diagnosticId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseApiDiagnosticIDInsensitively(input string) (*ApiDiagnosticId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiDiagnosticId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ApiDiagnosticId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - if id.DiagnosticId, ok = parsed.Parsed["diagnosticId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diagnosticId", *parsed) + if id.DiagnosticId, ok = input.Parsed["diagnosticId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "diagnosticId", input) } - return &id, nil + return nil } // ValidateApiDiagnosticID checks that 'input' can be parsed as a Api Diagnostic ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apimanagementservice/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apimanagementservice/id_service.go index 95a62caed84e..eccb86b056bb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apimanagementservice/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apimanagementservice/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperation/id_api.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperation/id_api.go index 79a7327f6228..43445741f292 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperation/id_api.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperation/id_api.go @@ -38,23 +38,9 @@ func ParseApiID(input string) (*ApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApiId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - return &id, nil + return nil } // ValidateApiID checks that 'input' can be parsed as a Api ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperation/id_operation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperation/id_operation.go index de3ff9a53f68..438a2d60c02f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperation/id_operation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperation/id_operation.go @@ -40,27 +40,9 @@ func ParseOperationID(input string) (*OperationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OperationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) - } - - if id.OperationId, ok = parsed.Parsed["operationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OperationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *OperationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - if id.OperationId, ok = parsed.Parsed["operationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationId", *parsed) + if id.OperationId, ok = input.Parsed["operationId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "operationId", input) } - return &id, nil + return nil } // ValidateOperationID checks that 'input' can be parsed as a Operation ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperationpolicy/id_operation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperationpolicy/id_operation.go index 7cb0b5a54c72..4225aa7d7786 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperationpolicy/id_operation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperationpolicy/id_operation.go @@ -40,27 +40,9 @@ func ParseOperationID(input string) (*OperationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OperationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) - } - - if id.OperationId, ok = parsed.Parsed["operationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OperationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *OperationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - if id.OperationId, ok = parsed.Parsed["operationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationId", *parsed) + if id.OperationId, ok = input.Parsed["operationId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "operationId", input) } - return &id, nil + return nil } // ValidateOperationID checks that 'input' can be parsed as a Operation ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperationtag/id_operation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperationtag/id_operation.go index 80dc723f21e7..9ff2edc8bb0c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperationtag/id_operation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperationtag/id_operation.go @@ -40,27 +40,9 @@ func ParseOperationID(input string) (*OperationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OperationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) - } - - if id.OperationId, ok = parsed.Parsed["operationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OperationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *OperationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - if id.OperationId, ok = parsed.Parsed["operationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationId", *parsed) + if id.OperationId, ok = input.Parsed["operationId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "operationId", input) } - return &id, nil + return nil } // ValidateOperationID checks that 'input' can be parsed as a Operation ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperationtag/id_operationtag.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperationtag/id_operationtag.go index 50b4b0f0385c..86a6377d961d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperationtag/id_operationtag.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperationtag/id_operationtag.go @@ -42,31 +42,9 @@ func ParseOperationTagID(input string) (*OperationTagId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OperationTagId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) - } - - if id.OperationId, ok = parsed.Parsed["operationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationId", *parsed) - } - - if id.TagId, ok = parsed.Parsed["tagId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseOperationTagIDInsensitively(input string) (*OperationTagId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OperationTagId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *OperationTagId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - if id.OperationId, ok = parsed.Parsed["operationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationId", *parsed) + if id.OperationId, ok = input.Parsed["operationId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "operationId", input) } - if id.TagId, ok = parsed.Parsed["tagId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagId", *parsed) + if id.TagId, ok = input.Parsed["tagId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "tagId", input) } - return &id, nil + return nil } // ValidateOperationTagID checks that 'input' can be parsed as a Operation Tag ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apipolicy/id_api.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apipolicy/id_api.go index fa2aa4893ac4..e6bb0d4a498a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apipolicy/id_api.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apipolicy/id_api.go @@ -38,23 +38,9 @@ func ParseApiID(input string) (*ApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApiId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - return &id, nil + return nil } // ValidateApiID checks that 'input' can be parsed as a Api ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apirelease/id_api.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apirelease/id_api.go index 2859d3f4219c..330da942f462 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apirelease/id_api.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apirelease/id_api.go @@ -38,23 +38,9 @@ func ParseApiID(input string) (*ApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApiId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - return &id, nil + return nil } // ValidateApiID checks that 'input' can be parsed as a Api ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apirelease/id_release.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apirelease/id_release.go index a05148dd45c1..3cbe29fbd02c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apirelease/id_release.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apirelease/id_release.go @@ -40,27 +40,9 @@ func ParseReleaseID(input string) (*ReleaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReleaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) - } - - if id.ReleaseId, ok = parsed.Parsed["releaseId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "releaseId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseReleaseIDInsensitively(input string) (*ReleaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReleaseId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ReleaseId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - if id.ReleaseId, ok = parsed.Parsed["releaseId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "releaseId", *parsed) + if id.ReleaseId, ok = input.Parsed["releaseId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "releaseId", input) } - return &id, nil + return nil } // ValidateReleaseID checks that 'input' can be parsed as a Release ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apischema/id_api.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apischema/id_api.go index f58e6b3b0fd7..3cec3f2a1498 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apischema/id_api.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apischema/id_api.go @@ -38,23 +38,9 @@ func ParseApiID(input string) (*ApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApiId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - return &id, nil + return nil } // ValidateApiID checks that 'input' can be parsed as a Api ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apischema/id_apischema.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apischema/id_apischema.go index 13017418f0ca..2953ca314ba6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apischema/id_apischema.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apischema/id_apischema.go @@ -40,27 +40,9 @@ func ParseApiSchemaID(input string) (*ApiSchemaId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiSchemaId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) - } - - if id.SchemaId, ok = parsed.Parsed["schemaId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "schemaId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseApiSchemaIDInsensitively(input string) (*ApiSchemaId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiSchemaId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ApiSchemaId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - if id.SchemaId, ok = parsed.Parsed["schemaId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "schemaId", *parsed) + if id.SchemaId, ok = input.Parsed["schemaId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "schemaId", input) } - return &id, nil + return nil } // ValidateApiSchemaID checks that 'input' can be parsed as a Api Schema ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitag/id_api.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitag/id_api.go index 89fbccee1e65..c8afece467f3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitag/id_api.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitag/id_api.go @@ -38,23 +38,9 @@ func ParseApiID(input string) (*ApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApiId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - return &id, nil + return nil } // ValidateApiID checks that 'input' can be parsed as a Api ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitag/id_apitag.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitag/id_apitag.go index 065dee9d7dfa..0f562a900ad5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitag/id_apitag.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitag/id_apitag.go @@ -40,27 +40,9 @@ func ParseApiTagID(input string) (*ApiTagId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiTagId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) - } - - if id.TagId, ok = parsed.Parsed["tagId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseApiTagIDInsensitively(input string) (*ApiTagId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiTagId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ApiTagId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - if id.TagId, ok = parsed.Parsed["tagId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagId", *parsed) + if id.TagId, ok = input.Parsed["tagId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "tagId", input) } - return &id, nil + return nil } // ValidateApiTagID checks that 'input' can be parsed as a Api Tag ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitagdescription/id_api.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitagdescription/id_api.go index 7b00f6d8314b..da65fe282bd3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitagdescription/id_api.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitagdescription/id_api.go @@ -38,23 +38,9 @@ func ParseApiID(input string) (*ApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApiId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - return &id, nil + return nil } // ValidateApiID checks that 'input' can be parsed as a Api ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitagdescription/id_tagdescription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitagdescription/id_tagdescription.go index 4ac4fb2acef1..b223d3e858bd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitagdescription/id_tagdescription.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitagdescription/id_tagdescription.go @@ -40,27 +40,9 @@ func ParseTagDescriptionID(input string) (*TagDescriptionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TagDescriptionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) - } - - if id.TagDescriptionId, ok = parsed.Parsed["tagDescriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagDescriptionId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseTagDescriptionIDInsensitively(input string) (*TagDescriptionId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TagDescriptionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *TagDescriptionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - if id.TagDescriptionId, ok = parsed.Parsed["tagDescriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagDescriptionId", *parsed) + if id.TagDescriptionId, ok = input.Parsed["tagDescriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "tagDescriptionId", input) } - return &id, nil + return nil } // ValidateTagDescriptionID checks that 'input' can be parsed as a Tag Description ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiversionset/id_apiversionset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiversionset/id_apiversionset.go index f541aa66a7d9..ee3a221fa7d4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiversionset/id_apiversionset.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiversionset/id_apiversionset.go @@ -38,23 +38,9 @@ func ParseApiVersionSetID(input string) (*ApiVersionSetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiVersionSetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.VersionSetId, ok = parsed.Parsed["versionSetId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "versionSetId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApiVersionSetIDInsensitively(input string) (*ApiVersionSetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiVersionSetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApiVersionSetId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.VersionSetId, ok = parsed.Parsed["versionSetId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "versionSetId", *parsed) + if id.VersionSetId, ok = input.Parsed["versionSetId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "versionSetId", input) } - return &id, nil + return nil } // ValidateApiVersionSetID checks that 'input' can be parsed as a Api Version Set ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiversionset/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiversionset/id_service.go index b4503adde39c..39d5f6a2dd1e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiversionset/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiversionset/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiversionsets/id_apiversionset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiversionsets/id_apiversionset.go index aa4b1218098b..631a8829d3f1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiversionsets/id_apiversionset.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiversionsets/id_apiversionset.go @@ -38,23 +38,9 @@ func ParseApiVersionSetID(input string) (*ApiVersionSetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiVersionSetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.VersionSetId, ok = parsed.Parsed["versionSetId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "versionSetId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApiVersionSetIDInsensitively(input string) (*ApiVersionSetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiVersionSetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApiVersionSetId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.VersionSetId, ok = parsed.Parsed["versionSetId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "versionSetId", *parsed) + if id.VersionSetId, ok = input.Parsed["versionSetId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "versionSetId", input) } - return &id, nil + return nil } // ValidateApiVersionSetID checks that 'input' can be parsed as a Api Version Set ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/authorizationserver/id_authorizationserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/authorizationserver/id_authorizationserver.go index e5f6624ab654..f3fc41ad8ce5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/authorizationserver/id_authorizationserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/authorizationserver/id_authorizationserver.go @@ -38,23 +38,9 @@ func ParseAuthorizationServerID(input string) (*AuthorizationServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AuthorizationServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.AuthorizationServerName, ok = parsed.Parsed["authorizationServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAuthorizationServerIDInsensitively(input string) (*AuthorizationServer return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AuthorizationServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AuthorizationServerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.AuthorizationServerName, ok = parsed.Parsed["authorizationServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationServerName", *parsed) + if id.AuthorizationServerName, ok = input.Parsed["authorizationServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "authorizationServerName", input) } - return &id, nil + return nil } // ValidateAuthorizationServerID checks that 'input' can be parsed as a Authorization Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/authorizationserver/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/authorizationserver/id_service.go index 48f4a9da5ef4..3f964ef83c64 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/authorizationserver/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/authorizationserver/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/backend/id_backend.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/backend/id_backend.go index c7b8374637c5..7111cfb2ae24 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/backend/id_backend.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/backend/id_backend.go @@ -38,23 +38,9 @@ func ParseBackendID(input string) (*BackendId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackendId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.BackendId, ok = parsed.Parsed["backendId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backendId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseBackendIDInsensitively(input string) (*BackendId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackendId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BackendId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.BackendId, ok = parsed.Parsed["backendId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backendId", *parsed) + if id.BackendId, ok = input.Parsed["backendId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backendId", input) } - return &id, nil + return nil } // ValidateBackendID checks that 'input' can be parsed as a Backend ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/backend/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/backend/id_service.go index a11de0ac7ea6..894e41b5ffc9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/backend/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/backend/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/cache/id_cache.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/cache/id_cache.go index f481a454c49f..910f2dec4361 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/cache/id_cache.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/cache/id_cache.go @@ -38,23 +38,9 @@ func ParseCacheID(input string) (*CacheId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CacheId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.CacheId, ok = parsed.Parsed["cacheId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cacheId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCacheIDInsensitively(input string) (*CacheId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CacheId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CacheId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.CacheId, ok = parsed.Parsed["cacheId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cacheId", *parsed) + if id.CacheId, ok = input.Parsed["cacheId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cacheId", input) } - return &id, nil + return nil } // ValidateCacheID checks that 'input' can be parsed as a Cache ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/cache/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/cache/id_service.go index bbca8da8f3a7..3b930b104ea0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/cache/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/cache/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/certificate/id_certificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/certificate/id_certificate.go index 623d4954eced..d11ca5a81dce 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/certificate/id_certificate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/certificate/id_certificate.go @@ -38,23 +38,9 @@ func ParseCertificateID(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.CertificateId, ok = parsed.Parsed["certificateId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CertificateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.CertificateId, ok = parsed.Parsed["certificateId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateId", *parsed) + if id.CertificateId, ok = input.Parsed["certificateId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "certificateId", input) } - return &id, nil + return nil } // ValidateCertificateID checks that 'input' can be parsed as a Certificate ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/certificate/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/certificate/id_service.go index 66a90053cb1b..4f35a34a7d3c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/certificate/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/certificate/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/delegationsettings/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/delegationsettings/id_service.go index c58ec8e039b0..5c8d2f374621 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/delegationsettings/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/delegationsettings/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/deletedservice/id_deletedservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/deletedservice/id_deletedservice.go index 16ae59293af1..316c4f88aaed 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/deletedservice/id_deletedservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/deletedservice/id_deletedservice.go @@ -36,19 +36,9 @@ func ParseDeletedServiceID(input string) (*DeletedServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeletedServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - if id.DeletedServiceName, ok = parsed.Parsed["deletedServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deletedServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDeletedServiceIDInsensitively(input string) (*DeletedServiceId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeletedServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DeletedServiceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - if id.DeletedServiceName, ok = parsed.Parsed["deletedServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deletedServiceName", *parsed) + if id.DeletedServiceName, ok = input.Parsed["deletedServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "deletedServiceName", input) } - return &id, nil + return nil } // ValidateDeletedServiceID checks that 'input' can be parsed as a Deleted Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/diagnostic/id_diagnostic.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/diagnostic/id_diagnostic.go index e283d041523d..dc6148293519 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/diagnostic/id_diagnostic.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/diagnostic/id_diagnostic.go @@ -38,23 +38,9 @@ func ParseDiagnosticID(input string) (*DiagnosticId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DiagnosticId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.DiagnosticId, ok = parsed.Parsed["diagnosticId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diagnosticId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDiagnosticIDInsensitively(input string) (*DiagnosticId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DiagnosticId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DiagnosticId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.DiagnosticId, ok = parsed.Parsed["diagnosticId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diagnosticId", *parsed) + if id.DiagnosticId, ok = input.Parsed["diagnosticId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "diagnosticId", input) } - return &id, nil + return nil } // ValidateDiagnosticID checks that 'input' can be parsed as a Diagnostic ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/diagnostic/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/diagnostic/id_service.go index 521b0f80d0a0..912c67cfa646 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/diagnostic/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/diagnostic/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/emailtemplates/id_template.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/emailtemplates/id_template.go index c088c6f73c5f..7dc72ab7ffc0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/emailtemplates/id_template.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/emailtemplates/id_template.go @@ -38,31 +38,9 @@ func ParseTemplateID(input string) (*TemplateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TemplateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if v, ok := parsed.Parsed["templateName"]; true { - if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "templateName", *parsed) - } - - templateName, err := parseTemplateName(v) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) - } - id.TemplateName = *templateName + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -77,34 +55,42 @@ func ParseTemplateIDInsensitively(input string) (*TemplateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TemplateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *TemplateId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if v, ok := parsed.Parsed["templateName"]; true { + if v, ok := input.Parsed["templateName"]; true { if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "templateName", *parsed) + return resourceids.NewSegmentNotSpecifiedError(id, "templateName", input) } templateName, err := parseTemplateName(v) if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) + return fmt.Errorf("parsing %q: %+v", v, err) } id.TemplateName = *templateName } - return &id, nil + return nil } // ValidateTemplateID checks that 'input' can be parsed as a Template ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gateway/id_gateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gateway/id_gateway.go index 34550bb3edcf..ccbe85e114da 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gateway/id_gateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gateway/id_gateway.go @@ -38,23 +38,9 @@ func ParseGatewayID(input string) (*GatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.GatewayId, ok = parsed.Parsed["gatewayId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *GatewayId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.GatewayId, ok = parsed.Parsed["gatewayId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", *parsed) + if id.GatewayId, ok = input.Parsed["gatewayId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", input) } - return &id, nil + return nil } // ValidateGatewayID checks that 'input' can be parsed as a Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gateway/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gateway/id_service.go index a45df593cf65..da4dbe6703ab 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gateway/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gateway/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayapi/id_gateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayapi/id_gateway.go index 4165de54710a..0261bc252ac3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayapi/id_gateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayapi/id_gateway.go @@ -38,23 +38,9 @@ func ParseGatewayID(input string) (*GatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.GatewayId, ok = parsed.Parsed["gatewayId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *GatewayId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.GatewayId, ok = parsed.Parsed["gatewayId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", *parsed) + if id.GatewayId, ok = input.Parsed["gatewayId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", input) } - return &id, nil + return nil } // ValidateGatewayID checks that 'input' can be parsed as a Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayapi/id_gatewayapi.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayapi/id_gatewayapi.go index 7dc333eb0d36..7c845917a0f3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayapi/id_gatewayapi.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayapi/id_gatewayapi.go @@ -40,27 +40,9 @@ func ParseGatewayApiID(input string) (*GatewayApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GatewayApiId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.GatewayId, ok = parsed.Parsed["gatewayId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseGatewayApiIDInsensitively(input string) (*GatewayApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GatewayApiId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *GatewayApiId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.GatewayId, ok = parsed.Parsed["gatewayId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", *parsed) + if id.GatewayId, ok = input.Parsed["gatewayId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - return &id, nil + return nil } // ValidateGatewayApiID checks that 'input' can be parsed as a Gateway Api ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/id_certificateauthority.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/id_certificateauthority.go index 237095225f1d..fa08514181b2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/id_certificateauthority.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/id_certificateauthority.go @@ -40,27 +40,9 @@ func ParseCertificateAuthorityID(input string) (*CertificateAuthorityId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateAuthorityId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.GatewayId, ok = parsed.Parsed["gatewayId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", *parsed) - } - - if id.CertificateId, ok = parsed.Parsed["certificateId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseCertificateAuthorityIDInsensitively(input string) (*CertificateAuthori return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateAuthorityId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *CertificateAuthorityId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.GatewayId, ok = parsed.Parsed["gatewayId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", *parsed) + if id.GatewayId, ok = input.Parsed["gatewayId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", input) } - if id.CertificateId, ok = parsed.Parsed["certificateId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateId", *parsed) + if id.CertificateId, ok = input.Parsed["certificateId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "certificateId", input) } - return &id, nil + return nil } // ValidateCertificateAuthorityID checks that 'input' can be parsed as a Certificate Authority ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/id_gateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/id_gateway.go index 787e1bc3e37f..9f62338c3e73 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/id_gateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/id_gateway.go @@ -38,23 +38,9 @@ func ParseGatewayID(input string) (*GatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.GatewayId, ok = parsed.Parsed["gatewayId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *GatewayId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.GatewayId, ok = parsed.Parsed["gatewayId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", *parsed) + if id.GatewayId, ok = input.Parsed["gatewayId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", input) } - return &id, nil + return nil } // ValidateGatewayID checks that 'input' can be parsed as a Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/id_gateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/id_gateway.go index db58fe2a01da..ee66d381b600 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/id_gateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/id_gateway.go @@ -38,23 +38,9 @@ func ParseGatewayID(input string) (*GatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.GatewayId, ok = parsed.Parsed["gatewayId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *GatewayId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.GatewayId, ok = parsed.Parsed["gatewayId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", *parsed) + if id.GatewayId, ok = input.Parsed["gatewayId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", input) } - return &id, nil + return nil } // ValidateGatewayID checks that 'input' can be parsed as a Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/id_hostnameconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/id_hostnameconfiguration.go index 6161f4486569..345c2161ae69 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/id_hostnameconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/id_hostnameconfiguration.go @@ -40,27 +40,9 @@ func ParseHostnameConfigurationID(input string) (*HostnameConfigurationId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HostnameConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.GatewayId, ok = parsed.Parsed["gatewayId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", *parsed) - } - - if id.HcId, ok = parsed.Parsed["hcId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hcId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseHostnameConfigurationIDInsensitively(input string) (*HostnameConfigura return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HostnameConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *HostnameConfigurationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.GatewayId, ok = parsed.Parsed["gatewayId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", *parsed) + if id.GatewayId, ok = input.Parsed["gatewayId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", input) } - if id.HcId, ok = parsed.Parsed["hcId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hcId", *parsed) + if id.HcId, ok = input.Parsed["hcId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hcId", input) } - return &id, nil + return nil } // ValidateHostnameConfigurationID checks that 'input' can be parsed as a Hostname Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/group/id_group.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/group/id_group.go index 1cb69ca64b1c..b6224b4b2d54 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/group/id_group.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/group/id_group.go @@ -38,23 +38,9 @@ func ParseGroupID(input string) (*GroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.GroupId, ok = parsed.Parsed["groupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "groupId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseGroupIDInsensitively(input string) (*GroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *GroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.GroupId, ok = parsed.Parsed["groupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "groupId", *parsed) + if id.GroupId, ok = input.Parsed["groupId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "groupId", input) } - return &id, nil + return nil } // ValidateGroupID checks that 'input' can be parsed as a Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/group/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/group/id_service.go index 916e4cfce48b..f9caa2ad5092 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/group/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/group/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/groupuser/id_group.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/groupuser/id_group.go index 9d328f9f0263..8700a88c74c8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/groupuser/id_group.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/groupuser/id_group.go @@ -38,23 +38,9 @@ func ParseGroupID(input string) (*GroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.GroupId, ok = parsed.Parsed["groupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "groupId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseGroupIDInsensitively(input string) (*GroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *GroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.GroupId, ok = parsed.Parsed["groupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "groupId", *parsed) + if id.GroupId, ok = input.Parsed["groupId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "groupId", input) } - return &id, nil + return nil } // ValidateGroupID checks that 'input' can be parsed as a Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/groupuser/id_groupuser.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/groupuser/id_groupuser.go index 70947c02de3e..107bb00c1fbb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/groupuser/id_groupuser.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/groupuser/id_groupuser.go @@ -40,27 +40,9 @@ func ParseGroupUserID(input string) (*GroupUserId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GroupUserId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.GroupId, ok = parsed.Parsed["groupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "groupId", *parsed) - } - - if id.UserId, ok = parsed.Parsed["userId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "userId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseGroupUserIDInsensitively(input string) (*GroupUserId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GroupUserId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *GroupUserId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.GroupId, ok = parsed.Parsed["groupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "groupId", *parsed) + if id.GroupId, ok = input.Parsed["groupId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "groupId", input) } - if id.UserId, ok = parsed.Parsed["userId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "userId", *parsed) + if id.UserId, ok = input.Parsed["userId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "userId", input) } - return &id, nil + return nil } // ValidateGroupUserID checks that 'input' can be parsed as a Group User ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/identityprovider/id_identityprovider.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/identityprovider/id_identityprovider.go index b31fc9697f39..cb485fbbca28 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/identityprovider/id_identityprovider.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/identityprovider/id_identityprovider.go @@ -38,31 +38,9 @@ func ParseIdentityProviderID(input string) (*IdentityProviderId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IdentityProviderId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if v, ok := parsed.Parsed["identityProviderName"]; true { - if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "identityProviderName", *parsed) - } - - identityProviderName, err := parseIdentityProviderType(v) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) - } - id.IdentityProviderName = *identityProviderName + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -77,34 +55,42 @@ func ParseIdentityProviderIDInsensitively(input string) (*IdentityProviderId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IdentityProviderId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *IdentityProviderId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if v, ok := parsed.Parsed["identityProviderName"]; true { + if v, ok := input.Parsed["identityProviderName"]; true { if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "identityProviderName", *parsed) + return resourceids.NewSegmentNotSpecifiedError(id, "identityProviderName", input) } identityProviderName, err := parseIdentityProviderType(v) if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) + return fmt.Errorf("parsing %q: %+v", v, err) } id.IdentityProviderName = *identityProviderName } - return &id, nil + return nil } // ValidateIdentityProviderID checks that 'input' can be parsed as a Identity Provider ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/identityprovider/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/identityprovider/id_service.go index 89ca80d7df09..b2789ac6a8f0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/identityprovider/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/identityprovider/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/logger/id_logger.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/logger/id_logger.go index ee7f985a1917..48e0f627f2a7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/logger/id_logger.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/logger/id_logger.go @@ -38,23 +38,9 @@ func ParseLoggerID(input string) (*LoggerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LoggerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.LoggerId, ok = parsed.Parsed["loggerId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loggerId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLoggerIDInsensitively(input string) (*LoggerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LoggerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LoggerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.LoggerId, ok = parsed.Parsed["loggerId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loggerId", *parsed) + if id.LoggerId, ok = input.Parsed["loggerId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "loggerId", input) } - return &id, nil + return nil } // ValidateLoggerID checks that 'input' can be parsed as a Logger ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/logger/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/logger/id_service.go index 5807ecae3aa9..af4ae84d1ca0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/logger/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/logger/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/namedvalue/id_namedvalue.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/namedvalue/id_namedvalue.go index eb84d26bb30f..7356af722dfe 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/namedvalue/id_namedvalue.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/namedvalue/id_namedvalue.go @@ -38,23 +38,9 @@ func ParseNamedValueID(input string) (*NamedValueId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamedValueId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.NamedValueId, ok = parsed.Parsed["namedValueId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namedValueId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseNamedValueIDInsensitively(input string) (*NamedValueId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamedValueId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *NamedValueId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.NamedValueId, ok = parsed.Parsed["namedValueId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namedValueId", *parsed) + if id.NamedValueId, ok = input.Parsed["namedValueId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namedValueId", input) } - return &id, nil + return nil } // ValidateNamedValueID checks that 'input' can be parsed as a Named Value ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/namedvalue/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/namedvalue/id_service.go index a39da071fda5..51c851d257fe 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/namedvalue/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/namedvalue/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/id_notification.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/id_notification.go index 03494ec3aece..c6cab7f78568 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/id_notification.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/id_notification.go @@ -38,31 +38,9 @@ func ParseNotificationID(input string) (*NotificationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NotificationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if v, ok := parsed.Parsed["notificationName"]; true { - if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "notificationName", *parsed) - } - - notificationName, err := parseNotificationName(v) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) - } - id.NotificationName = *notificationName + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -77,34 +55,42 @@ func ParseNotificationIDInsensitively(input string) (*NotificationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NotificationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *NotificationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if v, ok := parsed.Parsed["notificationName"]; true { + if v, ok := input.Parsed["notificationName"]; true { if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "notificationName", *parsed) + return resourceids.NewSegmentNotSpecifiedError(id, "notificationName", input) } notificationName, err := parseNotificationName(v) if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) + return fmt.Errorf("parsing %q: %+v", v, err) } id.NotificationName = *notificationName } - return &id, nil + return nil } // ValidateNotificationID checks that 'input' can be parsed as a Notification ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/id_recipientemail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/id_recipientemail.go index 622fa5001baf..9616fe55542a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/id_recipientemail.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/id_recipientemail.go @@ -40,35 +40,9 @@ func ParseRecipientEmailID(input string) (*RecipientEmailId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RecipientEmailId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if v, ok := parsed.Parsed["notificationName"]; true { - if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "notificationName", *parsed) - } - - notificationName, err := parseNotificationName(v) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) - } - id.NotificationName = *notificationName - } - - if id.RecipientEmailName, ok = parsed.Parsed["recipientEmailName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "recipientEmailName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -83,38 +57,46 @@ func ParseRecipientEmailIDInsensitively(input string) (*RecipientEmailId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RecipientEmailId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *RecipientEmailId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if v, ok := parsed.Parsed["notificationName"]; true { + if v, ok := input.Parsed["notificationName"]; true { if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "notificationName", *parsed) + return resourceids.NewSegmentNotSpecifiedError(id, "notificationName", input) } notificationName, err := parseNotificationName(v) if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) + return fmt.Errorf("parsing %q: %+v", v, err) } id.NotificationName = *notificationName } - if id.RecipientEmailName, ok = parsed.Parsed["recipientEmailName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "recipientEmailName", *parsed) + if id.RecipientEmailName, ok = input.Parsed["recipientEmailName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "recipientEmailName", input) } - return &id, nil + return nil } // ValidateRecipientEmailID checks that 'input' can be parsed as a Recipient Email ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/id_notification.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/id_notification.go index 9e0e8aebd257..c1f566238f95 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/id_notification.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/id_notification.go @@ -38,31 +38,9 @@ func ParseNotificationID(input string) (*NotificationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NotificationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if v, ok := parsed.Parsed["notificationName"]; true { - if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "notificationName", *parsed) - } - - notificationName, err := parseNotificationName(v) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) - } - id.NotificationName = *notificationName + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -77,34 +55,42 @@ func ParseNotificationIDInsensitively(input string) (*NotificationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NotificationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *NotificationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if v, ok := parsed.Parsed["notificationName"]; true { + if v, ok := input.Parsed["notificationName"]; true { if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "notificationName", *parsed) + return resourceids.NewSegmentNotSpecifiedError(id, "notificationName", input) } notificationName, err := parseNotificationName(v) if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) + return fmt.Errorf("parsing %q: %+v", v, err) } id.NotificationName = *notificationName } - return &id, nil + return nil } // ValidateNotificationID checks that 'input' can be parsed as a Notification ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/id_recipientuser.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/id_recipientuser.go index ba60daeb64bc..d5e2ce19d24a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/id_recipientuser.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/id_recipientuser.go @@ -40,35 +40,9 @@ func ParseRecipientUserID(input string) (*RecipientUserId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RecipientUserId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if v, ok := parsed.Parsed["notificationName"]; true { - if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "notificationName", *parsed) - } - - notificationName, err := parseNotificationName(v) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) - } - id.NotificationName = *notificationName - } - - if id.UserId, ok = parsed.Parsed["userId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "userId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -83,38 +57,46 @@ func ParseRecipientUserIDInsensitively(input string) (*RecipientUserId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RecipientUserId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *RecipientUserId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if v, ok := parsed.Parsed["notificationName"]; true { + if v, ok := input.Parsed["notificationName"]; true { if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "notificationName", *parsed) + return resourceids.NewSegmentNotSpecifiedError(id, "notificationName", input) } notificationName, err := parseNotificationName(v) if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) + return fmt.Errorf("parsing %q: %+v", v, err) } id.NotificationName = *notificationName } - if id.UserId, ok = parsed.Parsed["userId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "userId", *parsed) + if id.UserId, ok = input.Parsed["userId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "userId", input) } - return &id, nil + return nil } // ValidateRecipientUserID checks that 'input' can be parsed as a Recipient User ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/openidconnectprovider/id_openidconnectprovider.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/openidconnectprovider/id_openidconnectprovider.go index 4c21b8383e0b..6281797c5eda 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/openidconnectprovider/id_openidconnectprovider.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/openidconnectprovider/id_openidconnectprovider.go @@ -38,23 +38,9 @@ func ParseOpenidConnectProviderID(input string) (*OpenidConnectProviderId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OpenidConnectProviderId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.OpenidConnectProviderName, ok = parsed.Parsed["openidConnectProviderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "openidConnectProviderName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseOpenidConnectProviderIDInsensitively(input string) (*OpenidConnectProv return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OpenidConnectProviderId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *OpenidConnectProviderId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.OpenidConnectProviderName, ok = parsed.Parsed["openidConnectProviderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "openidConnectProviderName", *parsed) + if id.OpenidConnectProviderName, ok = input.Parsed["openidConnectProviderName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "openidConnectProviderName", input) } - return &id, nil + return nil } // ValidateOpenidConnectProviderID checks that 'input' can be parsed as a Openid Connect Provider ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/openidconnectprovider/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/openidconnectprovider/id_service.go index 5c1589b41302..6011bac9dea5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/openidconnectprovider/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/openidconnectprovider/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/policy/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/policy/id_service.go index abd4ff17b684..a56cd4fcbd9e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/policy/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/policy/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/product/id_product.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/product/id_product.go index 68fc58b3c0c9..c7625d1d9ac5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/product/id_product.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/product/id_product.go @@ -38,23 +38,9 @@ func ParseProductID(input string) (*ProductId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProductId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ProductId, ok = parsed.Parsed["productId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "productId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProductId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProductId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ProductId, ok = parsed.Parsed["productId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "productId", *parsed) + if id.ProductId, ok = input.Parsed["productId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "productId", input) } - return &id, nil + return nil } // ValidateProductID checks that 'input' can be parsed as a Product ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/product/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/product/id_service.go index 453a38674d72..90ce39c0b6e9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/product/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/product/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productapi/id_product.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productapi/id_product.go index ab13414a812b..12e7e9f31733 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productapi/id_product.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productapi/id_product.go @@ -38,23 +38,9 @@ func ParseProductID(input string) (*ProductId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProductId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ProductId, ok = parsed.Parsed["productId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "productId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProductId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProductId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ProductId, ok = parsed.Parsed["productId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "productId", *parsed) + if id.ProductId, ok = input.Parsed["productId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "productId", input) } - return &id, nil + return nil } // ValidateProductID checks that 'input' can be parsed as a Product ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productapi/id_productapi.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productapi/id_productapi.go index 241d1d4221d4..1b0829c762aa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productapi/id_productapi.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productapi/id_productapi.go @@ -40,27 +40,9 @@ func ParseProductApiID(input string) (*ProductApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProductApiId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ProductId, ok = parsed.Parsed["productId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "productId", *parsed) - } - - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseProductApiIDInsensitively(input string) (*ProductApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProductApiId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ProductApiId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ProductId, ok = parsed.Parsed["productId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "productId", *parsed) + if id.ProductId, ok = input.Parsed["productId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "productId", input) } - if id.ApiId, ok = parsed.Parsed["apiId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiId", *parsed) + if id.ApiId, ok = input.Parsed["apiId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiId", input) } - return &id, nil + return nil } // ValidateProductApiID checks that 'input' can be parsed as a Product Api ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productgroup/id_product.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productgroup/id_product.go index 78d1bbc00286..9da605f113d3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productgroup/id_product.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productgroup/id_product.go @@ -38,23 +38,9 @@ func ParseProductID(input string) (*ProductId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProductId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ProductId, ok = parsed.Parsed["productId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "productId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProductId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProductId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ProductId, ok = parsed.Parsed["productId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "productId", *parsed) + if id.ProductId, ok = input.Parsed["productId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "productId", input) } - return &id, nil + return nil } // ValidateProductID checks that 'input' can be parsed as a Product ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productgroup/id_productgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productgroup/id_productgroup.go index 3da15ed373b5..a38f7d26fa38 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productgroup/id_productgroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productgroup/id_productgroup.go @@ -40,27 +40,9 @@ func ParseProductGroupID(input string) (*ProductGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProductGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ProductId, ok = parsed.Parsed["productId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "productId", *parsed) - } - - if id.GroupId, ok = parsed.Parsed["groupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "groupId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseProductGroupIDInsensitively(input string) (*ProductGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProductGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ProductGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ProductId, ok = parsed.Parsed["productId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "productId", *parsed) + if id.ProductId, ok = input.Parsed["productId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "productId", input) } - if id.GroupId, ok = parsed.Parsed["groupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "groupId", *parsed) + if id.GroupId, ok = input.Parsed["groupId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "groupId", input) } - return &id, nil + return nil } // ValidateProductGroupID checks that 'input' can be parsed as a Product Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productpolicy/id_product.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productpolicy/id_product.go index 9698867e813c..4baef506e98d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productpolicy/id_product.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productpolicy/id_product.go @@ -38,23 +38,9 @@ func ParseProductID(input string) (*ProductId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProductId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ProductId, ok = parsed.Parsed["productId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "productId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProductId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProductId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ProductId, ok = parsed.Parsed["productId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "productId", *parsed) + if id.ProductId, ok = input.Parsed["productId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "productId", input) } - return &id, nil + return nil } // ValidateProductID checks that 'input' can be parsed as a Product ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/producttag/id_product.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/producttag/id_product.go index 0e8b83b03ef6..01560e368e2f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/producttag/id_product.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/producttag/id_product.go @@ -38,23 +38,9 @@ func ParseProductID(input string) (*ProductId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProductId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ProductId, ok = parsed.Parsed["productId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "productId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProductId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProductId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ProductId, ok = parsed.Parsed["productId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "productId", *parsed) + if id.ProductId, ok = input.Parsed["productId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "productId", input) } - return &id, nil + return nil } // ValidateProductID checks that 'input' can be parsed as a Product ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/producttag/id_producttag.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/producttag/id_producttag.go index ee2cbe499a32..95ba18010594 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/producttag/id_producttag.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/producttag/id_producttag.go @@ -40,27 +40,9 @@ func ParseProductTagID(input string) (*ProductTagId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProductTagId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ProductId, ok = parsed.Parsed["productId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "productId", *parsed) - } - - if id.TagId, ok = parsed.Parsed["tagId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseProductTagIDInsensitively(input string) (*ProductTagId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProductTagId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ProductTagId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ProductId, ok = parsed.Parsed["productId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "productId", *parsed) + if id.ProductId, ok = input.Parsed["productId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "productId", input) } - if id.TagId, ok = parsed.Parsed["tagId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagId", *parsed) + if id.TagId, ok = input.Parsed["tagId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "tagId", input) } - return &id, nil + return nil } // ValidateProductTagID checks that 'input' can be parsed as a Product Tag ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/schema/id_schema.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/schema/id_schema.go index 7454f30fe605..57f9ebb23c52 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/schema/id_schema.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/schema/id_schema.go @@ -38,23 +38,9 @@ func ParseSchemaID(input string) (*SchemaId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SchemaId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.SchemaId, ok = parsed.Parsed["schemaId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "schemaId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSchemaIDInsensitively(input string) (*SchemaId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SchemaId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SchemaId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.SchemaId, ok = parsed.Parsed["schemaId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "schemaId", *parsed) + if id.SchemaId, ok = input.Parsed["schemaId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "schemaId", input) } - return &id, nil + return nil } // ValidateSchemaID checks that 'input' can be parsed as a Schema ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/schema/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/schema/id_service.go index 2425e5c9127e..d35dcd2431cf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/schema/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/schema/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/signinsettings/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/signinsettings/id_service.go index 91fdf5b67b13..d449f2a8d389 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/signinsettings/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/signinsettings/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/signupsettings/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/signupsettings/id_service.go index 5d9bd0a0c2f1..f3787b73b81b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/signupsettings/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/signupsettings/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/subscription/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/subscription/id_service.go index ec7f310e3df7..93b509f052e4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/subscription/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/subscription/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/subscription/id_subscriptions2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/subscription/id_subscriptions2.go index baa1f57e1f6e..f8b33d545ce5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/subscription/id_subscriptions2.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/subscription/id_subscriptions2.go @@ -38,23 +38,9 @@ func ParseSubscriptions2ID(input string) (*Subscriptions2Id, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Subscriptions2Id{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.SubscriptionName, ok = parsed.Parsed["subscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSubscriptions2IDInsensitively(input string) (*Subscriptions2Id, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Subscriptions2Id{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *Subscriptions2Id) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.SubscriptionName, ok = parsed.Parsed["subscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", *parsed) + if id.SubscriptionName, ok = input.Parsed["subscriptionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", input) } - return &id, nil + return nil } // ValidateSubscriptions2ID checks that 'input' can be parsed as a Subscriptions 2 ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/subscription/id_usersubscriptions2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/subscription/id_usersubscriptions2.go index ccc3bc6c72a2..9c5f6ce11d05 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/subscription/id_usersubscriptions2.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/subscription/id_usersubscriptions2.go @@ -40,27 +40,9 @@ func ParseUserSubscriptions2ID(input string) (*UserSubscriptions2Id, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UserSubscriptions2Id{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.UserId, ok = parsed.Parsed["userId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "userId", *parsed) - } - - if id.SubscriptionName, ok = parsed.Parsed["subscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseUserSubscriptions2IDInsensitively(input string) (*UserSubscriptions2Id return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UserSubscriptions2Id{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *UserSubscriptions2Id) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.UserId, ok = parsed.Parsed["userId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "userId", *parsed) + if id.UserId, ok = input.Parsed["userId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "userId", input) } - if id.SubscriptionName, ok = parsed.Parsed["subscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", *parsed) + if id.SubscriptionName, ok = input.Parsed["subscriptionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", input) } - return &id, nil + return nil } // ValidateUserSubscriptions2ID checks that 'input' can be parsed as a User Subscriptions 2 ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tag/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tag/id_service.go index 05b834b495eb..4571408724de 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tag/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tag/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tag/id_tag.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tag/id_tag.go index 2f3b0e3027e1..e5da01efc690 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tag/id_tag.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tag/id_tag.go @@ -38,23 +38,9 @@ func ParseTagID(input string) (*TagId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TagId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.TagId, ok = parsed.Parsed["tagId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTagIDInsensitively(input string) (*TagId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TagId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TagId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.TagId, ok = parsed.Parsed["tagId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagId", *parsed) + if id.TagId, ok = input.Parsed["tagId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "tagId", input) } - return &id, nil + return nil } // ValidateTagID checks that 'input' can be parsed as a Tag ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tenantaccess/id_access.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tenantaccess/id_access.go index f65bd39036bb..c1088880ff59 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tenantaccess/id_access.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tenantaccess/id_access.go @@ -38,31 +38,9 @@ func ParseAccessID(input string) (*AccessId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if v, ok := parsed.Parsed["accessName"]; true { - if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessName", *parsed) - } - - accessName, err := parseAccessIdName(v) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) - } - id.AccessName = *accessName + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -77,34 +55,42 @@ func ParseAccessIDInsensitively(input string) (*AccessId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *AccessId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if v, ok := parsed.Parsed["accessName"]; true { + if v, ok := input.Parsed["accessName"]; true { if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessName", *parsed) + return resourceids.NewSegmentNotSpecifiedError(id, "accessName", input) } accessName, err := parseAccessIdName(v) if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) + return fmt.Errorf("parsing %q: %+v", v, err) } id.AccessName = *accessName } - return &id, nil + return nil } // ValidateAccessID checks that 'input' can be parsed as a Access ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tenantaccess/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tenantaccess/id_service.go index 3a5122d04c9e..eb27c6a8e000 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tenantaccess/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tenantaccess/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/user/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/user/id_service.go index 1747126f5199..3ea79e41822b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/user/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/user/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/user/id_user.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/user/id_user.go index 0b7943b4faeb..08a07fa9e6ff 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/user/id_user.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/user/id_user.go @@ -38,23 +38,9 @@ func ParseUserID(input string) (*UserId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UserId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.UserId, ok = parsed.Parsed["userId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "userId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UserId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *UserId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.UserId, ok = parsed.Parsed["userId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "userId", *parsed) + if id.UserId, ok = input.Parsed["userId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "userId", input) } - return &id, nil + return nil } // ValidateUserID checks that 'input' can be parsed as a User ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/configurationstores/id_configurationstore.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/configurationstores/id_configurationstore.go index cae39b3cfc05..a7e4d9b09c2a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/configurationstores/id_configurationstore.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/configurationstores/id_configurationstore.go @@ -36,19 +36,9 @@ func ParseConfigurationStoreID(input string) (*ConfigurationStoreId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationStoreId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConfigurationStoreName, ok = parsed.Parsed["configurationStoreName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationStoreName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseConfigurationStoreIDInsensitively(input string) (*ConfigurationStoreId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationStoreId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ConfigurationStoreId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ConfigurationStoreName, ok = parsed.Parsed["configurationStoreName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationStoreName", *parsed) + if id.ConfigurationStoreName, ok = input.Parsed["configurationStoreName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "configurationStoreName", input) } - return &id, nil + return nil } // ValidateConfigurationStoreID checks that 'input' can be parsed as a Configuration Store ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/id_deletedconfigurationstore.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/id_deletedconfigurationstore.go index 7c03358920a2..aabf0933405a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/id_deletedconfigurationstore.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/id_deletedconfigurationstore.go @@ -36,19 +36,9 @@ func ParseDeletedConfigurationStoreID(input string) (*DeletedConfigurationStoreI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeletedConfigurationStoreId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - if id.DeletedConfigurationStoreName, ok = parsed.Parsed["deletedConfigurationStoreName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deletedConfigurationStoreName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDeletedConfigurationStoreIDInsensitively(input string) (*DeletedConfig return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeletedConfigurationStoreId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DeletedConfigurationStoreId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - if id.DeletedConfigurationStoreName, ok = parsed.Parsed["deletedConfigurationStoreName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deletedConfigurationStoreName", *parsed) + if id.DeletedConfigurationStoreName, ok = input.Parsed["deletedConfigurationStoreName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "deletedConfigurationStoreName", input) } - return &id, nil + return nil } // ValidateDeletedConfigurationStoreID checks that 'input' can be parsed as a Deleted Configuration Store ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/operations/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/operations/id_location.go index a8367fe1dc7d..7e4626f1c14b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/operations/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/operations/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/replicas/id_configurationstore.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/replicas/id_configurationstore.go index 64c7ad6a2440..567c11c03bb2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/replicas/id_configurationstore.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/replicas/id_configurationstore.go @@ -36,19 +36,9 @@ func ParseConfigurationStoreID(input string) (*ConfigurationStoreId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationStoreId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConfigurationStoreName, ok = parsed.Parsed["configurationStoreName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationStoreName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseConfigurationStoreIDInsensitively(input string) (*ConfigurationStoreId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationStoreId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ConfigurationStoreId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ConfigurationStoreName, ok = parsed.Parsed["configurationStoreName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationStoreName", *parsed) + if id.ConfigurationStoreName, ok = input.Parsed["configurationStoreName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "configurationStoreName", input) } - return &id, nil + return nil } // ValidateConfigurationStoreID checks that 'input' can be parsed as a Configuration Store ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/replicas/id_replica.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/replicas/id_replica.go index 464e8bae7e91..0bce2615b43b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/replicas/id_replica.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/replicas/id_replica.go @@ -38,23 +38,9 @@ func ParseReplicaID(input string) (*ReplicaId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicaId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConfigurationStoreName, ok = parsed.Parsed["configurationStoreName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationStoreName", *parsed) - } - - if id.ReplicaName, ok = parsed.Parsed["replicaName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicaName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseReplicaIDInsensitively(input string) (*ReplicaId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicaId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ReplicaId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ConfigurationStoreName, ok = parsed.Parsed["configurationStoreName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationStoreName", *parsed) + if id.ConfigurationStoreName, ok = input.Parsed["configurationStoreName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "configurationStoreName", input) } - if id.ReplicaName, ok = parsed.Parsed["replicaName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicaName", *parsed) + if id.ReplicaName, ok = input.Parsed["replicaName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicaName", input) } - return &id, nil + return nil } // ValidateReplicaID checks that 'input' can be parsed as a Replica ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/id_workbooktemplate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/id_workbooktemplate.go index 487a2ed99ce3..6184c3353f56 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/id_workbooktemplate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/id_workbooktemplate.go @@ -36,19 +36,9 @@ func ParseWorkbookTemplateID(input string) (*WorkbookTemplateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkbookTemplateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkbookTemplateName, ok = parsed.Parsed["workbookTemplateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workbookTemplateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkbookTemplateIDInsensitively(input string) (*WorkbookTemplateId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkbookTemplateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkbookTemplateId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkbookTemplateName, ok = parsed.Parsed["workbookTemplateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workbookTemplateName", *parsed) + if id.WorkbookTemplateName, ok = input.Parsed["workbookTemplateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workbookTemplateName", input) } - return &id, nil + return nil } // ValidateWorkbookTemplateID checks that 'input' can be parsed as a Workbook Template ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/workbooksapis/id_revision.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/workbooksapis/id_revision.go index 9cf01d504ce1..ca59bd54a903 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/workbooksapis/id_revision.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/workbooksapis/id_revision.go @@ -38,23 +38,9 @@ func ParseRevisionID(input string) (*RevisionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RevisionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkbookName, ok = parsed.Parsed["workbookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workbookName", *parsed) - } - - if id.RevisionId, ok = parsed.Parsed["revisionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "revisionId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRevisionIDInsensitively(input string) (*RevisionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RevisionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RevisionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkbookName, ok = parsed.Parsed["workbookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workbookName", *parsed) + if id.WorkbookName, ok = input.Parsed["workbookName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workbookName", input) } - if id.RevisionId, ok = parsed.Parsed["revisionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "revisionId", *parsed) + if id.RevisionId, ok = input.Parsed["revisionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "revisionId", input) } - return &id, nil + return nil } // ValidateRevisionID checks that 'input' can be parsed as a Revision ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/workbooksapis/id_workbook.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/workbooksapis/id_workbook.go index d683fcea08f8..0e7582c9170c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/workbooksapis/id_workbook.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/workbooksapis/id_workbook.go @@ -36,19 +36,9 @@ func ParseWorkbookID(input string) (*WorkbookId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkbookId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkbookName, ok = parsed.Parsed["workbookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workbookName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkbookIDInsensitively(input string) (*WorkbookId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkbookId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkbookId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkbookName, ok = parsed.Parsed["workbookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workbookName", *parsed) + if id.WorkbookName, ok = input.Parsed["workbookName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workbookName", input) } - return &id, nil + return nil } // ValidateWorkbookID checks that 'input' can be parsed as a Workbook ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-06-15/webtestsapis/id_component.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-06-15/webtestsapis/id_component.go index ab841f823b22..18302cbed9d5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-06-15/webtestsapis/id_component.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-06-15/webtestsapis/id_component.go @@ -36,19 +36,9 @@ func ParseComponentID(input string) (*ComponentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ComponentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ComponentName, ok = parsed.Parsed["componentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "componentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseComponentIDInsensitively(input string) (*ComponentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ComponentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ComponentId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ComponentName, ok = parsed.Parsed["componentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "componentName", *parsed) + if id.ComponentName, ok = input.Parsed["componentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "componentName", input) } - return &id, nil + return nil } // ValidateComponentID checks that 'input' can be parsed as a Component ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-06-15/webtestsapis/id_webtest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-06-15/webtestsapis/id_webtest.go index 0c36b5abe0f8..c60693195ba7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-06-15/webtestsapis/id_webtest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-06-15/webtestsapis/id_webtest.go @@ -36,19 +36,9 @@ func ParseWebTestID(input string) (*WebTestId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WebTestId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WebTestName, ok = parsed.Parsed["webTestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webTestName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWebTestIDInsensitively(input string) (*WebTestId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WebTestId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WebTestId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WebTestName, ok = parsed.Parsed["webTestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webTestName", *parsed) + if id.WebTestName, ok = input.Parsed["webTestName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "webTestName", input) } - return &id, nil + return nil } // ValidateWebTestID checks that 'input' can be parsed as a Web Test ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_agentpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_agentpool.go index 2c3d6545f54d..4e88e61ff4bb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_agentpool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_agentpool.go @@ -40,27 +40,9 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AgentPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.BuildServiceName, ok = parsed.Parsed["buildServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", *parsed) - } - - if id.AgentPoolName, ok = parsed.Parsed["agentPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "agentPoolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AgentPoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *AgentPoolId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.BuildServiceName, ok = parsed.Parsed["buildServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", *parsed) + if id.BuildServiceName, ok = input.Parsed["buildServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", input) } - if id.AgentPoolName, ok = parsed.Parsed["agentPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "agentPoolName", *parsed) + if id.AgentPoolName, ok = input.Parsed["agentPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "agentPoolName", input) } - return &id, nil + return nil } // ValidateAgentPoolID checks that 'input' can be parsed as a Agent Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apiportal.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apiportal.go index a503b92a2872..faad46738147 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apiportal.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apiportal.go @@ -38,23 +38,9 @@ func ParseApiPortalID(input string) (*ApiPortalId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiPortalId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.ApiPortalName, ok = parsed.Parsed["apiPortalName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiPortalName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApiPortalIDInsensitively(input string) (*ApiPortalId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiPortalId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApiPortalId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.ApiPortalName, ok = parsed.Parsed["apiPortalName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiPortalName", *parsed) + if id.ApiPortalName, ok = input.Parsed["apiPortalName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiPortalName", input) } - return &id, nil + return nil } // ValidateApiPortalID checks that 'input' can be parsed as a Api Portal ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apiportaldomain.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apiportaldomain.go index 7772d26d4f65..a3434b26654b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apiportaldomain.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apiportaldomain.go @@ -40,27 +40,9 @@ func ParseApiPortalDomainID(input string) (*ApiPortalDomainId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiPortalDomainId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.ApiPortalName, ok = parsed.Parsed["apiPortalName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiPortalName", *parsed) - } - - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseApiPortalDomainIDInsensitively(input string) (*ApiPortalDomainId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApiPortalDomainId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ApiPortalDomainId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.ApiPortalName, ok = parsed.Parsed["apiPortalName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apiPortalName", *parsed) + if id.ApiPortalName, ok = input.Parsed["apiPortalName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apiPortalName", input) } - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) + if id.DomainName, ok = input.Parsed["domainName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "domainName", input) } - return &id, nil + return nil } // ValidateApiPortalDomainID checks that 'input' can be parsed as a Api Portal Domain ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apm.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apm.go index df03f3b0ad8e..1f0db0dbe951 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apm.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apm.go @@ -38,23 +38,9 @@ func ParseApmID(input string) (*ApmId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApmId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.ApmName, ok = parsed.Parsed["apmName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apmName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApmIDInsensitively(input string) (*ApmId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApmId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApmId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.ApmName, ok = parsed.Parsed["apmName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "apmName", *parsed) + if id.ApmName, ok = input.Parsed["apmName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "apmName", input) } - return &id, nil + return nil } // ValidateApmID checks that 'input' can be parsed as a Apm ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_app.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_app.go index 0c9cf467702f..5df0ab5cba32 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_app.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_app.go @@ -38,23 +38,9 @@ func ParseAppID(input string) (*AppId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AppId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.AppName, ok = parsed.Parsed["appName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "appName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAppIDInsensitively(input string) (*AppId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AppId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AppId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.AppName, ok = parsed.Parsed["appName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "appName", *parsed) + if id.AppName, ok = input.Parsed["appName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "appName", input) } - return &id, nil + return nil } // ValidateAppID checks that 'input' can be parsed as a App ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_applicationaccelerator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_applicationaccelerator.go index a154cd0e3160..65c43b92c434 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_applicationaccelerator.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_applicationaccelerator.go @@ -38,23 +38,9 @@ func ParseApplicationAcceleratorID(input string) (*ApplicationAcceleratorId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationAcceleratorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.ApplicationAcceleratorName, ok = parsed.Parsed["applicationAcceleratorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationAcceleratorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApplicationAcceleratorIDInsensitively(input string) (*ApplicationAccel return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationAcceleratorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApplicationAcceleratorId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.ApplicationAcceleratorName, ok = parsed.Parsed["applicationAcceleratorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationAcceleratorName", *parsed) + if id.ApplicationAcceleratorName, ok = input.Parsed["applicationAcceleratorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationAcceleratorName", input) } - return &id, nil + return nil } // ValidateApplicationAcceleratorID checks that 'input' can be parsed as a Application Accelerator ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_applicationliveview.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_applicationliveview.go index fe403dece927..db3c4d7af5a5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_applicationliveview.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_applicationliveview.go @@ -38,23 +38,9 @@ func ParseApplicationLiveViewID(input string) (*ApplicationLiveViewId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationLiveViewId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.ApplicationLiveViewName, ok = parsed.Parsed["applicationLiveViewName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationLiveViewName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApplicationLiveViewIDInsensitively(input string) (*ApplicationLiveView return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationLiveViewId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApplicationLiveViewId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.ApplicationLiveViewName, ok = parsed.Parsed["applicationLiveViewName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationLiveViewName", *parsed) + if id.ApplicationLiveViewName, ok = input.Parsed["applicationLiveViewName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationLiveViewName", input) } - return &id, nil + return nil } // ValidateApplicationLiveViewID checks that 'input' can be parsed as a Application Live View ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_binding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_binding.go index 7978075b54ba..96f785290fd3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_binding.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_binding.go @@ -40,27 +40,9 @@ func ParseBindingID(input string) (*BindingId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BindingId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.AppName, ok = parsed.Parsed["appName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "appName", *parsed) - } - - if id.BindingName, ok = parsed.Parsed["bindingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "bindingName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseBindingIDInsensitively(input string) (*BindingId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BindingId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *BindingId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.AppName, ok = parsed.Parsed["appName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "appName", *parsed) + if id.AppName, ok = input.Parsed["appName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "appName", input) } - if id.BindingName, ok = parsed.Parsed["bindingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "bindingName", *parsed) + if id.BindingName, ok = input.Parsed["bindingName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "bindingName", input) } - return &id, nil + return nil } // ValidateBindingID checks that 'input' can be parsed as a Binding ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_build.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_build.go index 2fed396fb881..646992922914 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_build.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_build.go @@ -40,27 +40,9 @@ func ParseBuildID(input string) (*BuildId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BuildId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.BuildServiceName, ok = parsed.Parsed["buildServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", *parsed) - } - - if id.BuildName, ok = parsed.Parsed["buildName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseBuildIDInsensitively(input string) (*BuildId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BuildId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *BuildId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.BuildServiceName, ok = parsed.Parsed["buildServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", *parsed) + if id.BuildServiceName, ok = input.Parsed["buildServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", input) } - if id.BuildName, ok = parsed.Parsed["buildName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildName", *parsed) + if id.BuildName, ok = input.Parsed["buildName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "buildName", input) } - return &id, nil + return nil } // ValidateBuildID checks that 'input' can be parsed as a Build ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_builder.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_builder.go index 1a3a013ed4b9..3db6d55a43e0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_builder.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_builder.go @@ -40,27 +40,9 @@ func ParseBuilderID(input string) (*BuilderId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BuilderId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.BuildServiceName, ok = parsed.Parsed["buildServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", *parsed) - } - - if id.BuilderName, ok = parsed.Parsed["builderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "builderName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseBuilderIDInsensitively(input string) (*BuilderId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BuilderId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *BuilderId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.BuildServiceName, ok = parsed.Parsed["buildServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", *parsed) + if id.BuildServiceName, ok = input.Parsed["buildServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", input) } - if id.BuilderName, ok = parsed.Parsed["builderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "builderName", *parsed) + if id.BuilderName, ok = input.Parsed["builderName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "builderName", input) } - return &id, nil + return nil } // ValidateBuilderID checks that 'input' can be parsed as a Builder ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_buildpackbinding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_buildpackbinding.go index 0c0969bf728e..634738440e34 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_buildpackbinding.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_buildpackbinding.go @@ -42,31 +42,9 @@ func ParseBuildPackBindingID(input string) (*BuildPackBindingId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BuildPackBindingId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.BuildServiceName, ok = parsed.Parsed["buildServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", *parsed) - } - - if id.BuilderName, ok = parsed.Parsed["builderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "builderName", *parsed) - } - - if id.BuildPackBindingName, ok = parsed.Parsed["buildPackBindingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildPackBindingName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseBuildPackBindingIDInsensitively(input string) (*BuildPackBindingId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BuildPackBindingId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *BuildPackBindingId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.BuildServiceName, ok = parsed.Parsed["buildServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", *parsed) + if id.BuildServiceName, ok = input.Parsed["buildServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", input) } - if id.BuilderName, ok = parsed.Parsed["builderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "builderName", *parsed) + if id.BuilderName, ok = input.Parsed["builderName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "builderName", input) } - if id.BuildPackBindingName, ok = parsed.Parsed["buildPackBindingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildPackBindingName", *parsed) + if id.BuildPackBindingName, ok = input.Parsed["buildPackBindingName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "buildPackBindingName", input) } - return &id, nil + return nil } // ValidateBuildPackBindingID checks that 'input' can be parsed as a Build Pack Binding ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_buildservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_buildservice.go index b6331a77da46..aa1fdece06e4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_buildservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_buildservice.go @@ -38,23 +38,9 @@ func ParseBuildServiceID(input string) (*BuildServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BuildServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.BuildServiceName, ok = parsed.Parsed["buildServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseBuildServiceIDInsensitively(input string) (*BuildServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BuildServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BuildServiceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.BuildServiceName, ok = parsed.Parsed["buildServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", *parsed) + if id.BuildServiceName, ok = input.Parsed["buildServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", input) } - return &id, nil + return nil } // ValidateBuildServiceID checks that 'input' can be parsed as a Build Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_certificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_certificate.go index 7b21881fbcf7..c0451f184e0b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_certificate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_certificate.go @@ -38,23 +38,9 @@ func ParseCertificateID(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CertificateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if id.CertificateName, ok = input.Parsed["certificateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "certificateName", input) } - return &id, nil + return nil } // ValidateCertificateID checks that 'input' can be parsed as a Certificate ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_configurationservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_configurationservice.go index 33ee1ed5932b..cf886a64e738 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_configurationservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_configurationservice.go @@ -38,23 +38,9 @@ func ParseConfigurationServiceID(input string) (*ConfigurationServiceId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.ConfigurationServiceName, ok = parsed.Parsed["configurationServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseConfigurationServiceIDInsensitively(input string) (*ConfigurationServi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConfigurationServiceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.ConfigurationServiceName, ok = parsed.Parsed["configurationServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationServiceName", *parsed) + if id.ConfigurationServiceName, ok = input.Parsed["configurationServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "configurationServiceName", input) } - return &id, nil + return nil } // ValidateConfigurationServiceID checks that 'input' can be parsed as a Configuration Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_containerregistry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_containerregistry.go index 1066b5961767..b69a8f3b412b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_containerregistry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_containerregistry.go @@ -38,23 +38,9 @@ func ParseContainerRegistryID(input string) (*ContainerRegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContainerRegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.ContainerRegistryName, ok = parsed.Parsed["containerRegistryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerRegistryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseContainerRegistryIDInsensitively(input string) (*ContainerRegistryId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContainerRegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ContainerRegistryId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.ContainerRegistryName, ok = parsed.Parsed["containerRegistryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerRegistryName", *parsed) + if id.ContainerRegistryName, ok = input.Parsed["containerRegistryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "containerRegistryName", input) } - return &id, nil + return nil } // ValidateContainerRegistryID checks that 'input' can be parsed as a Container Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_customizedaccelerator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_customizedaccelerator.go index 82fa4c4fbfe2..db5a1b4f6972 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_customizedaccelerator.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_customizedaccelerator.go @@ -40,27 +40,9 @@ func ParseCustomizedAcceleratorID(input string) (*CustomizedAcceleratorId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CustomizedAcceleratorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.ApplicationAcceleratorName, ok = parsed.Parsed["applicationAcceleratorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationAcceleratorName", *parsed) - } - - if id.CustomizedAcceleratorName, ok = parsed.Parsed["customizedAcceleratorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "customizedAcceleratorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseCustomizedAcceleratorIDInsensitively(input string) (*CustomizedAcceler return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CustomizedAcceleratorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *CustomizedAcceleratorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.ApplicationAcceleratorName, ok = parsed.Parsed["applicationAcceleratorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationAcceleratorName", *parsed) + if id.ApplicationAcceleratorName, ok = input.Parsed["applicationAcceleratorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationAcceleratorName", input) } - if id.CustomizedAcceleratorName, ok = parsed.Parsed["customizedAcceleratorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "customizedAcceleratorName", *parsed) + if id.CustomizedAcceleratorName, ok = input.Parsed["customizedAcceleratorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "customizedAcceleratorName", input) } - return &id, nil + return nil } // ValidateCustomizedAcceleratorID checks that 'input' can be parsed as a Customized Accelerator ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_deployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_deployment.go index 761bbbcb7e90..948d2bc2791a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_deployment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_deployment.go @@ -40,27 +40,9 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeploymentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.AppName, ok = parsed.Parsed["appName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "appName", *parsed) - } - - if id.DeploymentName, ok = parsed.Parsed["deploymentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deploymentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeploymentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *DeploymentId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.AppName, ok = parsed.Parsed["appName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "appName", *parsed) + if id.AppName, ok = input.Parsed["appName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "appName", input) } - if id.DeploymentName, ok = parsed.Parsed["deploymentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deploymentName", *parsed) + if id.DeploymentName, ok = input.Parsed["deploymentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "deploymentName", input) } - return &id, nil + return nil } // ValidateDeploymentID checks that 'input' can be parsed as a Deployment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_devtoolportal.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_devtoolportal.go index 9bbc984db7c3..3c1f4e236a82 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_devtoolportal.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_devtoolportal.go @@ -38,23 +38,9 @@ func ParseDevToolPortalID(input string) (*DevToolPortalId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevToolPortalId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.DevToolPortalName, ok = parsed.Parsed["devToolPortalName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devToolPortalName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDevToolPortalIDInsensitively(input string) (*DevToolPortalId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevToolPortalId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DevToolPortalId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.DevToolPortalName, ok = parsed.Parsed["devToolPortalName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devToolPortalName", *parsed) + if id.DevToolPortalName, ok = input.Parsed["devToolPortalName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devToolPortalName", input) } - return &id, nil + return nil } // ValidateDevToolPortalID checks that 'input' can be parsed as a Dev Tool Portal ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_domain.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_domain.go index cc296a7d0a81..d937c652e6fd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_domain.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_domain.go @@ -40,27 +40,9 @@ func ParseDomainID(input string) (*DomainId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DomainId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.AppName, ok = parsed.Parsed["appName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "appName", *parsed) - } - - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DomainId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *DomainId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.AppName, ok = parsed.Parsed["appName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "appName", *parsed) + if id.AppName, ok = input.Parsed["appName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "appName", input) } - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) + if id.DomainName, ok = input.Parsed["domainName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "domainName", input) } - return &id, nil + return nil } // ValidateDomainID checks that 'input' can be parsed as a Domain ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_gateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_gateway.go index dadc41b3cd78..230c23dfb2bc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_gateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_gateway.go @@ -38,23 +38,9 @@ func ParseGatewayID(input string) (*GatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.GatewayName, ok = parsed.Parsed["gatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *GatewayId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.GatewayName, ok = parsed.Parsed["gatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayName", *parsed) + if id.GatewayName, ok = input.Parsed["gatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "gatewayName", input) } - return &id, nil + return nil } // ValidateGatewayID checks that 'input' can be parsed as a Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_gatewaydomain.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_gatewaydomain.go index 9092fa947925..7b6c60bea899 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_gatewaydomain.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_gatewaydomain.go @@ -40,27 +40,9 @@ func ParseGatewayDomainID(input string) (*GatewayDomainId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GatewayDomainId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.GatewayName, ok = parsed.Parsed["gatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayName", *parsed) - } - - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseGatewayDomainIDInsensitively(input string) (*GatewayDomainId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GatewayDomainId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *GatewayDomainId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.GatewayName, ok = parsed.Parsed["gatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayName", *parsed) + if id.GatewayName, ok = input.Parsed["gatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "gatewayName", input) } - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) + if id.DomainName, ok = input.Parsed["domainName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "domainName", input) } - return &id, nil + return nil } // ValidateGatewayDomainID checks that 'input' can be parsed as a Gateway Domain ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_location.go index 921d61c37e1f..73de68cd2fc6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_predefinedaccelerator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_predefinedaccelerator.go index 48e7aa984b6b..ae628f1db068 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_predefinedaccelerator.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_predefinedaccelerator.go @@ -40,27 +40,9 @@ func ParsePredefinedAcceleratorID(input string) (*PredefinedAcceleratorId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PredefinedAcceleratorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.ApplicationAcceleratorName, ok = parsed.Parsed["applicationAcceleratorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationAcceleratorName", *parsed) - } - - if id.PredefinedAcceleratorName, ok = parsed.Parsed["predefinedAcceleratorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "predefinedAcceleratorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParsePredefinedAcceleratorIDInsensitively(input string) (*PredefinedAcceler return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PredefinedAcceleratorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *PredefinedAcceleratorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.ApplicationAcceleratorName, ok = parsed.Parsed["applicationAcceleratorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationAcceleratorName", *parsed) + if id.ApplicationAcceleratorName, ok = input.Parsed["applicationAcceleratorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationAcceleratorName", input) } - if id.PredefinedAcceleratorName, ok = parsed.Parsed["predefinedAcceleratorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "predefinedAcceleratorName", *parsed) + if id.PredefinedAcceleratorName, ok = input.Parsed["predefinedAcceleratorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "predefinedAcceleratorName", input) } - return &id, nil + return nil } // ValidatePredefinedAcceleratorID checks that 'input' can be parsed as a Predefined Accelerator ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_result.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_result.go index 1e910fa56811..24b94f7a22f6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_result.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_result.go @@ -42,31 +42,9 @@ func ParseResultID(input string) (*ResultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ResultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.BuildServiceName, ok = parsed.Parsed["buildServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", *parsed) - } - - if id.BuildName, ok = parsed.Parsed["buildName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildName", *parsed) - } - - if id.ResultName, ok = parsed.Parsed["resultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseResultIDInsensitively(input string) (*ResultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ResultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ResultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.BuildServiceName, ok = parsed.Parsed["buildServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", *parsed) + if id.BuildServiceName, ok = input.Parsed["buildServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", input) } - if id.BuildName, ok = parsed.Parsed["buildName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildName", *parsed) + if id.BuildName, ok = input.Parsed["buildName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "buildName", input) } - if id.ResultName, ok = parsed.Parsed["resultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resultName", *parsed) + if id.ResultName, ok = input.Parsed["resultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resultName", input) } - return &id, nil + return nil } // ValidateResultID checks that 'input' can be parsed as a Result ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_routeconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_routeconfig.go index c4321531ea61..01fcb56f521b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_routeconfig.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_routeconfig.go @@ -40,27 +40,9 @@ func ParseRouteConfigID(input string) (*RouteConfigId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteConfigId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.GatewayName, ok = parsed.Parsed["gatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayName", *parsed) - } - - if id.RouteConfigName, ok = parsed.Parsed["routeConfigName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeConfigName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseRouteConfigIDInsensitively(input string) (*RouteConfigId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteConfigId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *RouteConfigId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.GatewayName, ok = parsed.Parsed["gatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayName", *parsed) + if id.GatewayName, ok = input.Parsed["gatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "gatewayName", input) } - if id.RouteConfigName, ok = parsed.Parsed["routeConfigName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeConfigName", *parsed) + if id.RouteConfigName, ok = input.Parsed["routeConfigName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "routeConfigName", input) } - return &id, nil + return nil } // ValidateRouteConfigID checks that 'input' can be parsed as a Route Config ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_serviceregistry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_serviceregistry.go index 32eab236c943..f0f0a7582141 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_serviceregistry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_serviceregistry.go @@ -38,23 +38,9 @@ func ParseServiceRegistryID(input string) (*ServiceRegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceRegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.ServiceRegistryName, ok = parsed.Parsed["serviceRegistryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceRegistryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseServiceRegistryIDInsensitively(input string) (*ServiceRegistryId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceRegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ServiceRegistryId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.ServiceRegistryName, ok = parsed.Parsed["serviceRegistryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceRegistryName", *parsed) + if id.ServiceRegistryName, ok = input.Parsed["serviceRegistryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceRegistryName", input) } - return &id, nil + return nil } // ValidateServiceRegistryID checks that 'input' can be parsed as a Service Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_spring.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_spring.go index 9241aa92627c..bc4a27d472e3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_spring.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_spring.go @@ -36,19 +36,9 @@ func ParseSpringID(input string) (*SpringId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SpringId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSpringIDInsensitively(input string) (*SpringId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SpringId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SpringId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - return &id, nil + return nil } // ValidateSpringID checks that 'input' can be parsed as a Spring ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_storage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_storage.go index 423ed3464973..900787ffafda 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_storage.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_storage.go @@ -38,23 +38,9 @@ func ParseStorageID(input string) (*StorageId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.StorageName, ok = parsed.Parsed["storageName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseStorageIDInsensitively(input string) (*StorageId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *StorageId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.StorageName, ok = parsed.Parsed["storageName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageName", *parsed) + if id.StorageName, ok = input.Parsed["storageName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageName", input) } - return &id, nil + return nil } // ValidateStorageID checks that 'input' can be parsed as a Storage ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_supportedbuildpack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_supportedbuildpack.go index 5ba143a83892..df3b85230f88 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_supportedbuildpack.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_supportedbuildpack.go @@ -40,27 +40,9 @@ func ParseSupportedBuildPackID(input string) (*SupportedBuildPackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SupportedBuildPackId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.BuildServiceName, ok = parsed.Parsed["buildServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", *parsed) - } - - if id.SupportedBuildPackName, ok = parsed.Parsed["supportedBuildPackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "supportedBuildPackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseSupportedBuildPackIDInsensitively(input string) (*SupportedBuildPackId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SupportedBuildPackId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *SupportedBuildPackId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.BuildServiceName, ok = parsed.Parsed["buildServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", *parsed) + if id.BuildServiceName, ok = input.Parsed["buildServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", input) } - if id.SupportedBuildPackName, ok = parsed.Parsed["supportedBuildPackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "supportedBuildPackName", *parsed) + if id.SupportedBuildPackName, ok = input.Parsed["supportedBuildPackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "supportedBuildPackName", input) } - return &id, nil + return nil } // ValidateSupportedBuildPackID checks that 'input' can be parsed as a Supported Build Pack ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_supportedstack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_supportedstack.go index b840619a7c5e..f01b495a3775 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_supportedstack.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform/id_supportedstack.go @@ -40,27 +40,9 @@ func ParseSupportedStackID(input string) (*SupportedStackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SupportedStackId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) - } - - if id.BuildServiceName, ok = parsed.Parsed["buildServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", *parsed) - } - - if id.SupportedStackName, ok = parsed.Parsed["supportedStackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "supportedStackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseSupportedStackIDInsensitively(input string) (*SupportedStackId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SupportedStackId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *SupportedStackId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpringName, ok = parsed.Parsed["springName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "springName", *parsed) + if id.SpringName, ok = input.Parsed["springName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "springName", input) } - if id.BuildServiceName, ok = parsed.Parsed["buildServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", *parsed) + if id.BuildServiceName, ok = input.Parsed["buildServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "buildServiceName", input) } - if id.SupportedStackName, ok = parsed.Parsed["supportedStackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "supportedStackName", *parsed) + if id.SupportedStackName, ok = input.Parsed["supportedStackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "supportedStackName", input) } - return &id, nil + return nil } // ValidateSupportedStackID checks that 'input' can be parsed as a Supported Stack ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/id_attestationproviders.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/id_attestationproviders.go index 6caef6da48a6..2b9db62e5c20 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/id_attestationproviders.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/id_attestationproviders.go @@ -36,19 +36,9 @@ func ParseAttestationProvidersID(input string) (*AttestationProvidersId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AttestationProvidersId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AttestationProviderName, ok = parsed.Parsed["attestationProviderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "attestationProviderName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAttestationProvidersIDInsensitively(input string) (*AttestationProvide return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AttestationProvidersId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AttestationProvidersId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AttestationProviderName, ok = parsed.Parsed["attestationProviderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "attestationProviderName", *parsed) + if id.AttestationProviderName, ok = input.Parsed["attestationProviderName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "attestationProviderName", input) } - return &id, nil + return nil } // ValidateAttestationProvidersID checks that 'input' can be parsed as a Attestation Providers ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/id_location.go index 9bd8033e3470..0a371ed4c909 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/id_scopedroleassignmentscheduleinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/id_scopedroleassignmentscheduleinstance.go index b5ee5c6d8c13..651c1c23295a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/id_scopedroleassignmentscheduleinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/id_scopedroleassignmentscheduleinstance.go @@ -34,15 +34,9 @@ func ParseScopedRoleAssignmentScheduleInstanceID(input string) (*ScopedRoleAssig return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRoleAssignmentScheduleInstanceId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.RoleAssignmentScheduleInstanceName, ok = parsed.Parsed["roleAssignmentScheduleInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleAssignmentScheduleInstanceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedRoleAssignmentScheduleInstanceIDInsensitively(input string) (*Sc return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRoleAssignmentScheduleInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedRoleAssignmentScheduleInstanceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.RoleAssignmentScheduleInstanceName, ok = parsed.Parsed["roleAssignmentScheduleInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleAssignmentScheduleInstanceName", *parsed) + if id.RoleAssignmentScheduleInstanceName, ok = input.Parsed["roleAssignmentScheduleInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "roleAssignmentScheduleInstanceName", input) } - return &id, nil + return nil } // ValidateScopedRoleAssignmentScheduleInstanceID checks that 'input' can be parsed as a Scoped Role Assignment Schedule Instance ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/id_scopedroleassignmentschedulerequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/id_scopedroleassignmentschedulerequest.go index 58dc248ef51c..6c1e6ea9463a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/id_scopedroleassignmentschedulerequest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/id_scopedroleassignmentschedulerequest.go @@ -34,15 +34,9 @@ func ParseScopedRoleAssignmentScheduleRequestID(input string) (*ScopedRoleAssign return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRoleAssignmentScheduleRequestId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.RoleAssignmentScheduleRequestName, ok = parsed.Parsed["roleAssignmentScheduleRequestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleAssignmentScheduleRequestName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedRoleAssignmentScheduleRequestIDInsensitively(input string) (*Sco return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRoleAssignmentScheduleRequestId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedRoleAssignmentScheduleRequestId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.RoleAssignmentScheduleRequestName, ok = parsed.Parsed["roleAssignmentScheduleRequestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleAssignmentScheduleRequestName", *parsed) + if id.RoleAssignmentScheduleRequestName, ok = input.Parsed["roleAssignmentScheduleRequestName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "roleAssignmentScheduleRequestName", input) } - return &id, nil + return nil } // ValidateScopedRoleAssignmentScheduleRequestID checks that 'input' can be parsed as a Scoped Role Assignment Schedule Request ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/id_scopedroleeligibilityscheduleinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/id_scopedroleeligibilityscheduleinstance.go index 70a226758193..9ce74e160c1d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/id_scopedroleeligibilityscheduleinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/id_scopedroleeligibilityscheduleinstance.go @@ -34,15 +34,9 @@ func ParseScopedRoleEligibilityScheduleInstanceID(input string) (*ScopedRoleElig return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRoleEligibilityScheduleInstanceId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.RoleEligibilityScheduleInstanceName, ok = parsed.Parsed["roleEligibilityScheduleInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleEligibilityScheduleInstanceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedRoleEligibilityScheduleInstanceIDInsensitively(input string) (*S return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRoleEligibilityScheduleInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedRoleEligibilityScheduleInstanceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.RoleEligibilityScheduleInstanceName, ok = parsed.Parsed["roleEligibilityScheduleInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleEligibilityScheduleInstanceName", *parsed) + if id.RoleEligibilityScheduleInstanceName, ok = input.Parsed["roleEligibilityScheduleInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "roleEligibilityScheduleInstanceName", input) } - return &id, nil + return nil } // ValidateScopedRoleEligibilityScheduleInstanceID checks that 'input' can be parsed as a Scoped Role Eligibility Schedule Instance ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/id_scopedroleeligibilityschedulerequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/id_scopedroleeligibilityschedulerequest.go index cbdce69f2714..370aa097652c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/id_scopedroleeligibilityschedulerequest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/id_scopedroleeligibilityschedulerequest.go @@ -34,15 +34,9 @@ func ParseScopedRoleEligibilityScheduleRequestID(input string) (*ScopedRoleEligi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRoleEligibilityScheduleRequestId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.RoleEligibilityScheduleRequestName, ok = parsed.Parsed["roleEligibilityScheduleRequestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleEligibilityScheduleRequestName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedRoleEligibilityScheduleRequestIDInsensitively(input string) (*Sc return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRoleEligibilityScheduleRequestId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedRoleEligibilityScheduleRequestId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.RoleEligibilityScheduleRequestName, ok = parsed.Parsed["roleEligibilityScheduleRequestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleEligibilityScheduleRequestName", *parsed) + if id.RoleEligibilityScheduleRequestName, ok = input.Parsed["roleEligibilityScheduleRequestName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "roleEligibilityScheduleRequestName", input) } - return &id, nil + return nil } // ValidateScopedRoleEligibilityScheduleRequestID checks that 'input' can be parsed as a Scoped Role Eligibility Schedule Request ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-04-01/roleassignments/id_scopedroleassignment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-04-01/roleassignments/id_scopedroleassignment.go index 4605be879f76..4c1266cf21df 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-04-01/roleassignments/id_scopedroleassignment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-04-01/roleassignments/id_scopedroleassignment.go @@ -34,15 +34,9 @@ func ParseScopedRoleAssignmentID(input string) (*ScopedRoleAssignmentId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRoleAssignmentId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.RoleAssignmentName, ok = parsed.Parsed["roleAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleAssignmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedRoleAssignmentIDInsensitively(input string) (*ScopedRoleAssignme return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRoleAssignmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedRoleAssignmentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.RoleAssignmentName, ok = parsed.Parsed["roleAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleAssignmentName", *parsed) + if id.RoleAssignmentName, ok = input.Parsed["roleAssignmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "roleAssignmentName", input) } - return &id, nil + return nil } // ValidateScopedRoleAssignmentID checks that 'input' can be parsed as a Scoped Role Assignment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-04-01/roledefinitions/id_scopedroledefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-04-01/roledefinitions/id_scopedroledefinition.go index 50a72b320ed7..c55dc9fbab22 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-04-01/roledefinitions/id_scopedroledefinition.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-04-01/roledefinitions/id_scopedroledefinition.go @@ -34,15 +34,9 @@ func ParseScopedRoleDefinitionID(input string) (*ScopedRoleDefinitionId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRoleDefinitionId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.RoleDefinitionId, ok = parsed.Parsed["roleDefinitionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleDefinitionId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedRoleDefinitionIDInsensitively(input string) (*ScopedRoleDefiniti return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRoleDefinitionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedRoleDefinitionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.RoleDefinitionId, ok = parsed.Parsed["roleDefinitionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleDefinitionId", *parsed) + if id.RoleDefinitionId, ok = input.Parsed["roleDefinitionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "roleDefinitionId", input) } - return &id, nil + return nil } // ValidateScopedRoleDefinitionID checks that 'input' can be parsed as a Scoped Role Definition ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/webhook/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/webhook/id_automationaccount.go index 725ca6e4447f..309bf48fcf7f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/webhook/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/webhook/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/webhook/id_webhook.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/webhook/id_webhook.go index acb8b7029cea..5894053ca468 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/webhook/id_webhook.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/webhook/id_webhook.go @@ -38,23 +38,9 @@ func ParseWebHookID(input string) (*WebHookId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WebHookId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.WebHookName, ok = parsed.Parsed["webHookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webHookName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseWebHookIDInsensitively(input string) (*WebHookId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WebHookId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *WebHookId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.WebHookName, ok = parsed.Parsed["webHookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webHookName", *parsed) + if id.WebHookName, ok = input.Parsed["webHookName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "webHookName", input) } - return &id, nil + return nil } // ValidateWebHookID checks that 'input' can be parsed as a Web Hook ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/agentregistrationinformation/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/agentregistrationinformation/id_automationaccount.go index 08b840fe82dd..ed488fda092f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/agentregistrationinformation/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/agentregistrationinformation/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/softwareupdateconfiguration/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/softwareupdateconfiguration/id_automationaccount.go index 9ffed52c2359..88cca4592a61 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/softwareupdateconfiguration/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/softwareupdateconfiguration/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/softwareupdateconfiguration/id_softwareupdateconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/softwareupdateconfiguration/id_softwareupdateconfiguration.go index 4a255353d307..defb89b228aa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/softwareupdateconfiguration/id_softwareupdateconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/softwareupdateconfiguration/id_softwareupdateconfiguration.go @@ -38,23 +38,9 @@ func ParseSoftwareUpdateConfigurationID(input string) (*SoftwareUpdateConfigurat return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SoftwareUpdateConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.SoftwareUpdateConfigurationName, ok = parsed.Parsed["softwareUpdateConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "softwareUpdateConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSoftwareUpdateConfigurationIDInsensitively(input string) (*SoftwareUpd return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SoftwareUpdateConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SoftwareUpdateConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.SoftwareUpdateConfigurationName, ok = parsed.Parsed["softwareUpdateConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "softwareUpdateConfigurationName", *parsed) + if id.SoftwareUpdateConfigurationName, ok = input.Parsed["softwareUpdateConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "softwareUpdateConfigurationName", input) } - return &id, nil + return nil } // ValidateSoftwareUpdateConfigurationID checks that 'input' can be parsed as a Software Update Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/watcher/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/watcher/id_automationaccount.go index c63a4470c5a5..45aadf4b69ca 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/watcher/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/watcher/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/watcher/id_watcher.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/watcher/id_watcher.go index a5e15b038012..40f4c7a735a2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/watcher/id_watcher.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/watcher/id_watcher.go @@ -38,23 +38,9 @@ func ParseWatcherID(input string) (*WatcherId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.WatcherName, ok = parsed.Parsed["watcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "watcherName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseWatcherIDInsensitively(input string) (*WatcherId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WatcherId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *WatcherId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.WatcherName, ok = parsed.Parsed["watcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "watcherName", *parsed) + if id.WatcherName, ok = input.Parsed["watcherName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "watcherName", input) } - return &id, nil + return nil } // ValidateWatcherID checks that 'input' can be parsed as a Watcher ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/automationaccount/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/automationaccount/id_automationaccount.go index 507f59b0248c..30125ce26042 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/automationaccount/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/automationaccount/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/activity/id_activity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/activity/id_activity.go index 3930c9054927..9a1bddcd0a9d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/activity/id_activity.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/activity/id_activity.go @@ -40,27 +40,9 @@ func ParseActivityID(input string) (*ActivityId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ActivityId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.ModuleName, ok = parsed.Parsed["moduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "moduleName", *parsed) - } - - if id.ActivityName, ok = parsed.Parsed["activityName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "activityName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseActivityIDInsensitively(input string) (*ActivityId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ActivityId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ActivityId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.ModuleName, ok = parsed.Parsed["moduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "moduleName", *parsed) + if id.ModuleName, ok = input.Parsed["moduleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "moduleName", input) } - if id.ActivityName, ok = parsed.Parsed["activityName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "activityName", *parsed) + if id.ActivityName, ok = input.Parsed["activityName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "activityName", input) } - return &id, nil + return nil } // ValidateActivityID checks that 'input' can be parsed as a Activity ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/activity/id_module.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/activity/id_module.go index 0c927d16d45c..15aac63648ea 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/activity/id_module.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/activity/id_module.go @@ -38,23 +38,9 @@ func ParseModuleID(input string) (*ModuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ModuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.ModuleName, ok = parsed.Parsed["moduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "moduleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseModuleIDInsensitively(input string) (*ModuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ModuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ModuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.ModuleName, ok = parsed.Parsed["moduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "moduleName", *parsed) + if id.ModuleName, ok = input.Parsed["moduleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "moduleName", input) } - return &id, nil + return nil } // ValidateModuleID checks that 'input' can be parsed as a Module ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/automationaccount/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/automationaccount/id_automationaccount.go index 507f59b0248c..30125ce26042 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/automationaccount/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/automationaccount/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/certificate/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/certificate/id_automationaccount.go index b72970d4392b..5f31a6b8efdd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/certificate/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/certificate/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/certificate/id_certificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/certificate/id_certificate.go index a4dd6601140f..492524d5d547 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/certificate/id_certificate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/certificate/id_certificate.go @@ -38,23 +38,9 @@ func ParseCertificateID(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CertificateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if id.CertificateName, ok = input.Parsed["certificateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "certificateName", input) } - return &id, nil + return nil } // ValidateCertificateID checks that 'input' can be parsed as a Certificate ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connection/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connection/id_automationaccount.go index 6b4cf0ead8be..0036ab33fe6c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connection/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connection/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connection/id_connection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connection/id_connection.go index e38741628fed..8199efc92b36 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connection/id_connection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connection/id_connection.go @@ -38,23 +38,9 @@ func ParseConnectionID(input string) (*ConnectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) + if id.ConnectionName, ok = input.Parsed["connectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "connectionName", input) } - return &id, nil + return nil } // ValidateConnectionID checks that 'input' can be parsed as a Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connectiontype/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connectiontype/id_automationaccount.go index 9ac59c1b5c41..2df28b9d4b32 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connectiontype/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connectiontype/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connectiontype/id_connectiontype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connectiontype/id_connectiontype.go index c27cff4d1eed..c933b61f97a4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connectiontype/id_connectiontype.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connectiontype/id_connectiontype.go @@ -38,23 +38,9 @@ func ParseConnectionTypeID(input string) (*ConnectionTypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectionTypeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.ConnectionTypeName, ok = parsed.Parsed["connectionTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionTypeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseConnectionTypeIDInsensitively(input string) (*ConnectionTypeId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectionTypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConnectionTypeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.ConnectionTypeName, ok = parsed.Parsed["connectionTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionTypeName", *parsed) + if id.ConnectionTypeName, ok = input.Parsed["connectionTypeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "connectionTypeName", input) } - return &id, nil + return nil } // ValidateConnectionTypeID checks that 'input' can be parsed as a Connection Type ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/credential/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/credential/id_automationaccount.go index 1d277938871a..a8ea4d95e754 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/credential/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/credential/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/credential/id_credential.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/credential/id_credential.go index 3bc69d799063..6f666f05d435 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/credential/id_credential.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/credential/id_credential.go @@ -38,23 +38,9 @@ func ParseCredentialID(input string) (*CredentialId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CredentialId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.CredentialName, ok = parsed.Parsed["credentialName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "credentialName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCredentialIDInsensitively(input string) (*CredentialId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CredentialId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CredentialId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.CredentialName, ok = parsed.Parsed["credentialName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "credentialName", *parsed) + if id.CredentialName, ok = input.Parsed["credentialName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "credentialName", input) } - return &id, nil + return nil } // ValidateCredentialID checks that 'input' can be parsed as a Credential ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscconfiguration/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscconfiguration/id_automationaccount.go index e55bc5823ef5..7d065e1e87f5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscconfiguration/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscconfiguration/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscconfiguration/id_configuration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscconfiguration/id_configuration.go index 9ab132d3e0a0..ad9cf42c0915 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscconfiguration/id_configuration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscconfiguration/id_configuration.go @@ -38,23 +38,9 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + if id.ConfigurationName, ok = input.Parsed["configurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "configurationName", input) } - return &id, nil + return nil } // ValidateConfigurationID checks that 'input' can be parsed as a Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscnodeconfiguration/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscnodeconfiguration/id_automationaccount.go index 86960689e711..254e43fe5d92 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscnodeconfiguration/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscnodeconfiguration/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscnodeconfiguration/id_nodeconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscnodeconfiguration/id_nodeconfiguration.go index df13fdfef49c..7d94c8c45ea3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscnodeconfiguration/id_nodeconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscnodeconfiguration/id_nodeconfiguration.go @@ -38,23 +38,9 @@ func ParseNodeConfigurationID(input string) (*NodeConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NodeConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.NodeConfigurationName, ok = parsed.Parsed["nodeConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "nodeConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseNodeConfigurationIDInsensitively(input string) (*NodeConfigurationId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NodeConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *NodeConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.NodeConfigurationName, ok = parsed.Parsed["nodeConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "nodeConfigurationName", *parsed) + if id.NodeConfigurationName, ok = input.Parsed["nodeConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "nodeConfigurationName", input) } - return &id, nil + return nil } // ValidateNodeConfigurationID checks that 'input' can be parsed as a Node Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworker/id_hybridrunbookworker.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworker/id_hybridrunbookworker.go index d65585a8ec56..41964d77d336 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworker/id_hybridrunbookworker.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworker/id_hybridrunbookworker.go @@ -40,27 +40,9 @@ func ParseHybridRunbookWorkerID(input string) (*HybridRunbookWorkerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HybridRunbookWorkerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.HybridRunbookWorkerGroupName, ok = parsed.Parsed["hybridRunbookWorkerGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hybridRunbookWorkerGroupName", *parsed) - } - - if id.HybridRunbookWorkerId, ok = parsed.Parsed["hybridRunbookWorkerId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hybridRunbookWorkerId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseHybridRunbookWorkerIDInsensitively(input string) (*HybridRunbookWorker return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HybridRunbookWorkerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *HybridRunbookWorkerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.HybridRunbookWorkerGroupName, ok = parsed.Parsed["hybridRunbookWorkerGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hybridRunbookWorkerGroupName", *parsed) + if id.HybridRunbookWorkerGroupName, ok = input.Parsed["hybridRunbookWorkerGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hybridRunbookWorkerGroupName", input) } - if id.HybridRunbookWorkerId, ok = parsed.Parsed["hybridRunbookWorkerId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hybridRunbookWorkerId", *parsed) + if id.HybridRunbookWorkerId, ok = input.Parsed["hybridRunbookWorkerId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hybridRunbookWorkerId", input) } - return &id, nil + return nil } // ValidateHybridRunbookWorkerID checks that 'input' can be parsed as a Hybrid Runbook Worker ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworker/id_hybridrunbookworkergroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworker/id_hybridrunbookworkergroup.go index 54670f1d376a..64c7328992a1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworker/id_hybridrunbookworkergroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworker/id_hybridrunbookworkergroup.go @@ -38,23 +38,9 @@ func ParseHybridRunbookWorkerGroupID(input string) (*HybridRunbookWorkerGroupId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HybridRunbookWorkerGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.HybridRunbookWorkerGroupName, ok = parsed.Parsed["hybridRunbookWorkerGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hybridRunbookWorkerGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseHybridRunbookWorkerGroupIDInsensitively(input string) (*HybridRunbookW return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HybridRunbookWorkerGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *HybridRunbookWorkerGroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.HybridRunbookWorkerGroupName, ok = parsed.Parsed["hybridRunbookWorkerGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hybridRunbookWorkerGroupName", *parsed) + if id.HybridRunbookWorkerGroupName, ok = input.Parsed["hybridRunbookWorkerGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hybridRunbookWorkerGroupName", input) } - return &id, nil + return nil } // ValidateHybridRunbookWorkerGroupID checks that 'input' can be parsed as a Hybrid Runbook Worker Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/id_automationaccount.go index 33a62270abe4..3a2202493f92 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go index 5a9d8c7a7e4d..774227e7d678 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go @@ -38,23 +38,9 @@ func ParseHybridRunbookWorkerGroupID(input string) (*HybridRunbookWorkerGroupId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HybridRunbookWorkerGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.HybridRunbookWorkerGroupName, ok = parsed.Parsed["hybridRunbookWorkerGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hybridRunbookWorkerGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseHybridRunbookWorkerGroupIDInsensitively(input string) (*HybridRunbookW return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HybridRunbookWorkerGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *HybridRunbookWorkerGroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.HybridRunbookWorkerGroupName, ok = parsed.Parsed["hybridRunbookWorkerGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hybridRunbookWorkerGroupName", *parsed) + if id.HybridRunbookWorkerGroupName, ok = input.Parsed["hybridRunbookWorkerGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hybridRunbookWorkerGroupName", input) } - return &id, nil + return nil } // ValidateHybridRunbookWorkerGroupID checks that 'input' can be parsed as a Hybrid Runbook Worker Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/job/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/job/id_automationaccount.go index 92931d6f6349..cbc63031f3b1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/job/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/job/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/job/id_job.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/job/id_job.go index fbadf9f6a121..301f0ade03f4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/job/id_job.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/job/id_job.go @@ -38,23 +38,9 @@ func ParseJobID(input string) (*JobId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := JobId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.JobName, ok = parsed.Parsed["jobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := JobId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *JobId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.JobName, ok = parsed.Parsed["jobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobName", *parsed) + if id.JobName, ok = input.Parsed["jobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobName", input) } - return &id, nil + return nil } // ValidateJobID checks that 'input' can be parsed as a Job ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobschedule/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobschedule/id_automationaccount.go index 400c8f88c64a..2b9d8abbf038 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobschedule/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobschedule/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobschedule/id_jobschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobschedule/id_jobschedule.go index 96c657b3d4b3..c2f160f1cf48 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobschedule/id_jobschedule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobschedule/id_jobschedule.go @@ -38,23 +38,9 @@ func ParseJobScheduleID(input string) (*JobScheduleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := JobScheduleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.JobScheduleId, ok = parsed.Parsed["jobScheduleId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobScheduleId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseJobScheduleIDInsensitively(input string) (*JobScheduleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := JobScheduleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *JobScheduleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.JobScheduleId, ok = parsed.Parsed["jobScheduleId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobScheduleId", *parsed) + if id.JobScheduleId, ok = input.Parsed["jobScheduleId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobScheduleId", input) } - return &id, nil + return nil } // ValidateJobScheduleID checks that 'input' can be parsed as a Job Schedule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobstream/id_job.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobstream/id_job.go index 0d8282be25cb..46e6c67a788b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobstream/id_job.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobstream/id_job.go @@ -38,23 +38,9 @@ func ParseJobID(input string) (*JobId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := JobId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.JobName, ok = parsed.Parsed["jobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := JobId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *JobId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.JobName, ok = parsed.Parsed["jobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobName", *parsed) + if id.JobName, ok = input.Parsed["jobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobName", input) } - return &id, nil + return nil } // ValidateJobID checks that 'input' can be parsed as a Job ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobstream/id_stream.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobstream/id_stream.go index 2cbff7b6794a..edb99c9e84e8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobstream/id_stream.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobstream/id_stream.go @@ -40,27 +40,9 @@ func ParseStreamID(input string) (*StreamId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.JobName, ok = parsed.Parsed["jobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobName", *parsed) - } - - if id.JobStreamId, ok = parsed.Parsed["jobStreamId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobStreamId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseStreamIDInsensitively(input string) (*StreamId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *StreamId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.JobName, ok = parsed.Parsed["jobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobName", *parsed) + if id.JobName, ok = input.Parsed["jobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobName", input) } - if id.JobStreamId, ok = parsed.Parsed["jobStreamId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobStreamId", *parsed) + if id.JobStreamId, ok = input.Parsed["jobStreamId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobStreamId", input) } - return &id, nil + return nil } // ValidateStreamID checks that 'input' can be parsed as a Stream ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/linkedworkspace/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/linkedworkspace/id_automationaccount.go index deddffb8d5a2..ea7bde1591e6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/linkedworkspace/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/linkedworkspace/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/listkeys/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/listkeys/id_automationaccount.go index 5f70ed146f51..ac3bcb95a669 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/listkeys/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/listkeys/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/module/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/module/id_automationaccount.go index eb9b0e144b5f..90f3b8db6615 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/module/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/module/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/module/id_module.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/module/id_module.go index d94c81de067e..f556cfcb0e90 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/module/id_module.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/module/id_module.go @@ -38,23 +38,9 @@ func ParseModuleID(input string) (*ModuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ModuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.ModuleName, ok = parsed.Parsed["moduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "moduleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseModuleIDInsensitively(input string) (*ModuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ModuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ModuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.ModuleName, ok = parsed.Parsed["moduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "moduleName", *parsed) + if id.ModuleName, ok = input.Parsed["moduleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "moduleName", input) } - return &id, nil + return nil } // ValidateModuleID checks that 'input' can be parsed as a Module ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/module/id_powershell72module.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/module/id_powershell72module.go index 3aca56335b50..80036be5d115 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/module/id_powershell72module.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/module/id_powershell72module.go @@ -38,23 +38,9 @@ func ParsePowerShell72ModuleID(input string) (*PowerShell72ModuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PowerShell72ModuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.PowerShell72ModuleName, ok = parsed.Parsed["powerShell72ModuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "powerShell72ModuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePowerShell72ModuleIDInsensitively(input string) (*PowerShell72ModuleId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PowerShell72ModuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PowerShell72ModuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.PowerShell72ModuleName, ok = parsed.Parsed["powerShell72ModuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "powerShell72ModuleName", *parsed) + if id.PowerShell72ModuleName, ok = input.Parsed["powerShell72ModuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "powerShell72ModuleName", input) } - return &id, nil + return nil } // ValidatePowerShell72ModuleID checks that 'input' can be parsed as a Power Shell 7 2 Module ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/objectdatatypes/id_moduleobjectdatatype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/objectdatatypes/id_moduleobjectdatatype.go index f4b6295f3382..c6781dacbffe 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/objectdatatypes/id_moduleobjectdatatype.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/objectdatatypes/id_moduleobjectdatatype.go @@ -40,27 +40,9 @@ func ParseModuleObjectDataTypeID(input string) (*ModuleObjectDataTypeId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ModuleObjectDataTypeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.ModuleName, ok = parsed.Parsed["moduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "moduleName", *parsed) - } - - if id.ObjectDataTypeName, ok = parsed.Parsed["objectDataTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "objectDataTypeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseModuleObjectDataTypeIDInsensitively(input string) (*ModuleObjectDataTy return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ModuleObjectDataTypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ModuleObjectDataTypeId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.ModuleName, ok = parsed.Parsed["moduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "moduleName", *parsed) + if id.ModuleName, ok = input.Parsed["moduleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "moduleName", input) } - if id.ObjectDataTypeName, ok = parsed.Parsed["objectDataTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "objectDataTypeName", *parsed) + if id.ObjectDataTypeName, ok = input.Parsed["objectDataTypeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "objectDataTypeName", input) } - return &id, nil + return nil } // ValidateModuleObjectDataTypeID checks that 'input' can be parsed as a Module Object Data Type ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/objectdatatypes/id_objectdatatype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/objectdatatypes/id_objectdatatype.go index 1272d15447b7..1035288be127 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/objectdatatypes/id_objectdatatype.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/objectdatatypes/id_objectdatatype.go @@ -38,23 +38,9 @@ func ParseObjectDataTypeID(input string) (*ObjectDataTypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ObjectDataTypeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.ObjectDataTypeName, ok = parsed.Parsed["objectDataTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "objectDataTypeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseObjectDataTypeIDInsensitively(input string) (*ObjectDataTypeId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ObjectDataTypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ObjectDataTypeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.ObjectDataTypeName, ok = parsed.Parsed["objectDataTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "objectDataTypeName", *parsed) + if id.ObjectDataTypeName, ok = input.Parsed["objectDataTypeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "objectDataTypeName", input) } - return &id, nil + return nil } // ValidateObjectDataTypeID checks that 'input' can be parsed as a Object Data Type ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/operations/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/operations/id_automationaccount.go index 8c56596bd3f8..72ff420049e0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/operations/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/operations/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python2package/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python2package/id_automationaccount.go index d768add2e385..1de475464a5b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python2package/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python2package/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python2package/id_python2package.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python2package/id_python2package.go index 8ed4fe6bda2f..b72866ad718f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python2package/id_python2package.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python2package/id_python2package.go @@ -38,23 +38,9 @@ func ParsePython2PackageID(input string) (*Python2PackageId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Python2PackageId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.Python2PackageName, ok = parsed.Parsed["python2PackageName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "python2PackageName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePython2PackageIDInsensitively(input string) (*Python2PackageId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Python2PackageId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *Python2PackageId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.Python2PackageName, ok = parsed.Parsed["python2PackageName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "python2PackageName", *parsed) + if id.Python2PackageName, ok = input.Parsed["python2PackageName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "python2PackageName", input) } - return &id, nil + return nil } // ValidatePython2PackageID checks that 'input' can be parsed as a Python 2 Package ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python3package/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python3package/id_automationaccount.go index f6805805bf70..6609025b8ed9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python3package/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python3package/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python3package/id_python3package.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python3package/id_python3package.go index b94e1868e970..2d076d66f83e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python3package/id_python3package.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python3package/id_python3package.go @@ -38,23 +38,9 @@ func ParsePython3PackageID(input string) (*Python3PackageId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Python3PackageId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.Python3PackageName, ok = parsed.Parsed["python3PackageName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "python3PackageName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePython3PackageIDInsensitively(input string) (*Python3PackageId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Python3PackageId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *Python3PackageId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.Python3PackageName, ok = parsed.Parsed["python3PackageName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "python3PackageName", *parsed) + if id.Python3PackageName, ok = input.Parsed["python3PackageName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "python3PackageName", input) } - return &id, nil + return nil } // ValidatePython3PackageID checks that 'input' can be parsed as a Python 3 Package ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/runbook/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/runbook/id_automationaccount.go index 8a8b18b7895f..43161edfa7e5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/runbook/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/runbook/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/runbook/id_runbook.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/runbook/id_runbook.go index 2adace8bd11b..9c8d15c9ac0d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/runbook/id_runbook.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/runbook/id_runbook.go @@ -38,23 +38,9 @@ func ParseRunbookID(input string) (*RunbookId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RunbookId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.RunbookName, ok = parsed.Parsed["runbookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runbookName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RunbookId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RunbookId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.RunbookName, ok = parsed.Parsed["runbookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runbookName", *parsed) + if id.RunbookName, ok = input.Parsed["runbookName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "runbookName", input) } - return &id, nil + return nil } // ValidateRunbookID checks that 'input' can be parsed as a Runbook ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/runbookdraft/id_runbook.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/runbookdraft/id_runbook.go index 65a6774ab352..b01c075eb735 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/runbookdraft/id_runbook.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/runbookdraft/id_runbook.go @@ -38,23 +38,9 @@ func ParseRunbookID(input string) (*RunbookId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RunbookId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.RunbookName, ok = parsed.Parsed["runbookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runbookName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RunbookId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RunbookId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.RunbookName, ok = parsed.Parsed["runbookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runbookName", *parsed) + if id.RunbookName, ok = input.Parsed["runbookName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "runbookName", input) } - return &id, nil + return nil } // ValidateRunbookID checks that 'input' can be parsed as a Runbook ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/schedule/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/schedule/id_automationaccount.go index 1bd8c3bfabe8..14c4aea96915 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/schedule/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/schedule/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/schedule/id_schedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/schedule/id_schedule.go index 6cb8d3029c21..7dd7bb5fbc52 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/schedule/id_schedule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/schedule/id_schedule.go @@ -38,23 +38,9 @@ func ParseScheduleID(input string) (*ScheduleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScheduleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.ScheduleName, ok = parsed.Parsed["scheduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseScheduleIDInsensitively(input string) (*ScheduleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScheduleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ScheduleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.ScheduleName, ok = parsed.Parsed["scheduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduleName", *parsed) + if id.ScheduleName, ok = input.Parsed["scheduleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scheduleName", input) } - return &id, nil + return nil } // ValidateScheduleID checks that 'input' can be parsed as a Schedule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/id_automationaccount.go index d1a5f3929b52..f57cc59341f3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/id_softwareupdateconfigurationmachinerun.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/id_softwareupdateconfigurationmachinerun.go index 514e494e501c..9d195124bf95 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/id_softwareupdateconfigurationmachinerun.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/id_softwareupdateconfigurationmachinerun.go @@ -38,23 +38,9 @@ func ParseSoftwareUpdateConfigurationMachineRunID(input string) (*SoftwareUpdate return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SoftwareUpdateConfigurationMachineRunId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.SoftwareUpdateConfigurationMachineRunId, ok = parsed.Parsed["softwareUpdateConfigurationMachineRunId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "softwareUpdateConfigurationMachineRunId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSoftwareUpdateConfigurationMachineRunIDInsensitively(input string) (*S return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SoftwareUpdateConfigurationMachineRunId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SoftwareUpdateConfigurationMachineRunId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.SoftwareUpdateConfigurationMachineRunId, ok = parsed.Parsed["softwareUpdateConfigurationMachineRunId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "softwareUpdateConfigurationMachineRunId", *parsed) + if id.SoftwareUpdateConfigurationMachineRunId, ok = input.Parsed["softwareUpdateConfigurationMachineRunId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "softwareUpdateConfigurationMachineRunId", input) } - return &id, nil + return nil } // ValidateSoftwareUpdateConfigurationMachineRunID checks that 'input' can be parsed as a Software Update Configuration Machine Run ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/id_automationaccount.go index b3d0b483c659..3cbeb3765678 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/id_softwareupdateconfigurationrun.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/id_softwareupdateconfigurationrun.go index 2fb7b6fd07c9..f7a4bb2be193 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/id_softwareupdateconfigurationrun.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/id_softwareupdateconfigurationrun.go @@ -38,23 +38,9 @@ func ParseSoftwareUpdateConfigurationRunID(input string) (*SoftwareUpdateConfigu return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SoftwareUpdateConfigurationRunId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.SoftwareUpdateConfigurationRunId, ok = parsed.Parsed["softwareUpdateConfigurationRunId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "softwareUpdateConfigurationRunId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSoftwareUpdateConfigurationRunIDInsensitively(input string) (*Software return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SoftwareUpdateConfigurationRunId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SoftwareUpdateConfigurationRunId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.SoftwareUpdateConfigurationRunId, ok = parsed.Parsed["softwareUpdateConfigurationRunId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "softwareUpdateConfigurationRunId", *parsed) + if id.SoftwareUpdateConfigurationRunId, ok = input.Parsed["softwareUpdateConfigurationRunId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "softwareUpdateConfigurationRunId", input) } - return &id, nil + return nil } // ValidateSoftwareUpdateConfigurationRunID checks that 'input' can be parsed as a Software Update Configuration Run ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrol/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrol/id_automationaccount.go index 8c4e02996a79..69afbfe3e72c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrol/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrol/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrol/id_sourcecontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrol/id_sourcecontrol.go index 72e5c4d821d9..39f98c52c3d8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrol/id_sourcecontrol.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrol/id_sourcecontrol.go @@ -38,23 +38,9 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SourceControlId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.SourceControlName, ok = parsed.Parsed["sourceControlName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceControlName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SourceControlId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SourceControlId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.SourceControlName, ok = parsed.Parsed["sourceControlName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceControlName", *parsed) + if id.SourceControlName, ok = input.Parsed["sourceControlName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sourceControlName", input) } - return &id, nil + return nil } // ValidateSourceControlID checks that 'input' can be parsed as a Source Control ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/id_sourcecontrol.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/id_sourcecontrol.go index 62ab03b2ac13..6ee0738d8242 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/id_sourcecontrol.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/id_sourcecontrol.go @@ -38,23 +38,9 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SourceControlId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.SourceControlName, ok = parsed.Parsed["sourceControlName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceControlName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SourceControlId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SourceControlId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.SourceControlName, ok = parsed.Parsed["sourceControlName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceControlName", *parsed) + if id.SourceControlName, ok = input.Parsed["sourceControlName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sourceControlName", input) } - return &id, nil + return nil } // ValidateSourceControlID checks that 'input' can be parsed as a Source Control ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go index 3450a4ccc34a..6c32abe23cd6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go @@ -40,27 +40,9 @@ func ParseSourceControlSyncJobID(input string) (*SourceControlSyncJobId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SourceControlSyncJobId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.SourceControlName, ok = parsed.Parsed["sourceControlName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceControlName", *parsed) - } - - if id.SourceControlSyncJobId, ok = parsed.Parsed["sourceControlSyncJobId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceControlSyncJobId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseSourceControlSyncJobIDInsensitively(input string) (*SourceControlSyncJ return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SourceControlSyncJobId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *SourceControlSyncJobId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.SourceControlName, ok = parsed.Parsed["sourceControlName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceControlName", *parsed) + if id.SourceControlName, ok = input.Parsed["sourceControlName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sourceControlName", input) } - if id.SourceControlSyncJobId, ok = parsed.Parsed["sourceControlSyncJobId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceControlSyncJobId", *parsed) + if id.SourceControlSyncJobId, ok = input.Parsed["sourceControlSyncJobId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sourceControlSyncJobId", input) } - return &id, nil + return nil } // ValidateSourceControlSyncJobID checks that 'input' can be parsed as a Source Control Sync Job ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go index d31cfb976879..6da55d6b46c7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go @@ -40,27 +40,9 @@ func ParseSourceControlSyncJobID(input string) (*SourceControlSyncJobId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SourceControlSyncJobId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.SourceControlName, ok = parsed.Parsed["sourceControlName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceControlName", *parsed) - } - - if id.SourceControlSyncJobId, ok = parsed.Parsed["sourceControlSyncJobId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceControlSyncJobId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseSourceControlSyncJobIDInsensitively(input string) (*SourceControlSyncJ return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SourceControlSyncJobId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *SourceControlSyncJobId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.SourceControlName, ok = parsed.Parsed["sourceControlName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceControlName", *parsed) + if id.SourceControlName, ok = input.Parsed["sourceControlName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sourceControlName", input) } - if id.SourceControlSyncJobId, ok = parsed.Parsed["sourceControlSyncJobId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceControlSyncJobId", *parsed) + if id.SourceControlSyncJobId, ok = input.Parsed["sourceControlSyncJobId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sourceControlSyncJobId", input) } - return &id, nil + return nil } // ValidateSourceControlSyncJobID checks that 'input' can be parsed as a Source Control Sync Job ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go index 1658914fcd00..1734b33ba664 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go @@ -42,31 +42,9 @@ func ParseSourceControlSyncJobStreamID(input string) (*SourceControlSyncJobStrea return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SourceControlSyncJobStreamId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.SourceControlName, ok = parsed.Parsed["sourceControlName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceControlName", *parsed) - } - - if id.SourceControlSyncJobId, ok = parsed.Parsed["sourceControlSyncJobId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceControlSyncJobId", *parsed) - } - - if id.StreamId, ok = parsed.Parsed["streamId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseSourceControlSyncJobStreamIDInsensitively(input string) (*SourceContro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SourceControlSyncJobStreamId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SourceControlSyncJobStreamId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.SourceControlName, ok = parsed.Parsed["sourceControlName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceControlName", *parsed) + if id.SourceControlName, ok = input.Parsed["sourceControlName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sourceControlName", input) } - if id.SourceControlSyncJobId, ok = parsed.Parsed["sourceControlSyncJobId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceControlSyncJobId", *parsed) + if id.SourceControlSyncJobId, ok = input.Parsed["sourceControlSyncJobId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sourceControlSyncJobId", input) } - if id.StreamId, ok = parsed.Parsed["streamId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamId", *parsed) + if id.StreamId, ok = input.Parsed["streamId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "streamId", input) } - return &id, nil + return nil } // ValidateSourceControlSyncJobStreamID checks that 'input' can be parsed as a Source Control Sync Job Stream ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/statistics/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/statistics/id_automationaccount.go index acb480c909f3..f1006810ba4c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/statistics/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/statistics/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/testjob/id_runbook.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/testjob/id_runbook.go index 5ea2c22ce962..7a4b2bb504f8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/testjob/id_runbook.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/testjob/id_runbook.go @@ -38,23 +38,9 @@ func ParseRunbookID(input string) (*RunbookId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RunbookId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.RunbookName, ok = parsed.Parsed["runbookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runbookName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RunbookId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RunbookId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.RunbookName, ok = parsed.Parsed["runbookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runbookName", *parsed) + if id.RunbookName, ok = input.Parsed["runbookName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "runbookName", input) } - return &id, nil + return nil } // ValidateRunbookID checks that 'input' can be parsed as a Runbook ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/testjobstream/id_runbook.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/testjobstream/id_runbook.go index b9602d1e0749..2db9b3a2d82a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/testjobstream/id_runbook.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/testjobstream/id_runbook.go @@ -38,23 +38,9 @@ func ParseRunbookID(input string) (*RunbookId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RunbookId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.RunbookName, ok = parsed.Parsed["runbookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runbookName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RunbookId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RunbookId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.RunbookName, ok = parsed.Parsed["runbookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runbookName", *parsed) + if id.RunbookName, ok = input.Parsed["runbookName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "runbookName", input) } - return &id, nil + return nil } // ValidateRunbookID checks that 'input' can be parsed as a Runbook ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/testjobstream/id_testjobstream.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/testjobstream/id_testjobstream.go index 7cfa557b55b2..adb397aab0c2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/testjobstream/id_testjobstream.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/testjobstream/id_testjobstream.go @@ -40,27 +40,9 @@ func ParseTestJobStreamID(input string) (*TestJobStreamId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TestJobStreamId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.RunbookName, ok = parsed.Parsed["runbookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runbookName", *parsed) - } - - if id.JobStreamId, ok = parsed.Parsed["jobStreamId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobStreamId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseTestJobStreamIDInsensitively(input string) (*TestJobStreamId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TestJobStreamId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *TestJobStreamId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.RunbookName, ok = parsed.Parsed["runbookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runbookName", *parsed) + if id.RunbookName, ok = input.Parsed["runbookName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "runbookName", input) } - if id.JobStreamId, ok = parsed.Parsed["jobStreamId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobStreamId", *parsed) + if id.JobStreamId, ok = input.Parsed["jobStreamId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobStreamId", input) } - return &id, nil + return nil } // ValidateTestJobStreamID checks that 'input' can be parsed as a Test Job Stream ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/typefields/id_type.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/typefields/id_type.go index 494728e37cc9..a8529df8d82f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/typefields/id_type.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/typefields/id_type.go @@ -40,27 +40,9 @@ func ParseTypeID(input string) (*TypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TypeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.ModuleName, ok = parsed.Parsed["moduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "moduleName", *parsed) - } - - if id.TypeName, ok = parsed.Parsed["typeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "typeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseTypeIDInsensitively(input string) (*TypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *TypeId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.ModuleName, ok = parsed.Parsed["moduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "moduleName", *parsed) + if id.ModuleName, ok = input.Parsed["moduleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "moduleName", input) } - if id.TypeName, ok = parsed.Parsed["typeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "typeName", *parsed) + if id.TypeName, ok = input.Parsed["typeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "typeName", input) } - return &id, nil + return nil } // ValidateTypeID checks that 'input' can be parsed as a Type ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/usages/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/usages/id_automationaccount.go index 92d03475dfcc..5325f60346c3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/usages/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/usages/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/variable/id_automationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/variable/id_automationaccount.go index 5e89d091247f..55cc4873ac05 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/variable/id_automationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/variable/id_automationaccount.go @@ -36,19 +36,9 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutomationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - return &id, nil + return nil } // ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/variable/id_variable.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/variable/id_variable.go index 6f4c6f2db0e4..15c186227f24 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/variable/id_variable.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/variable/id_variable.go @@ -38,23 +38,9 @@ func ParseVariableID(input string) (*VariableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VariableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) - } - - if id.VariableName, ok = parsed.Parsed["variableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "variableName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseVariableIDInsensitively(input string) (*VariableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VariableId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VariableId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutomationAccountName, ok = parsed.Parsed["automationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", *parsed) + if id.AutomationAccountName, ok = input.Parsed["automationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationAccountName", input) } - if id.VariableName, ok = parsed.Parsed["variableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "variableName", *parsed) + if id.VariableName, ok = input.Parsed["variableName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "variableName", input) } - return &id, nil + return nil } // ValidateVariableID checks that 'input' can be parsed as a Variable ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/id_diagnosticsetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/id_diagnosticsetting.go index 3e104ec51c61..8abf7a7174e0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/id_diagnosticsetting.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/id_diagnosticsetting.go @@ -32,11 +32,9 @@ func ParseDiagnosticSettingID(input string) (*DiagnosticSettingId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DiagnosticSettingId{} - - if id.DiagnosticSettingName, ok = parsed.Parsed["diagnosticSettingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diagnosticSettingName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseDiagnosticSettingIDInsensitively(input string) (*DiagnosticSettingId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DiagnosticSettingId{} - - if id.DiagnosticSettingName, ok = parsed.Parsed["diagnosticSettingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diagnosticSettingName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *DiagnosticSettingId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.DiagnosticSettingName, ok = input.Parsed["diagnosticSettingName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "diagnosticSettingName", input) + } + + return nil +} + // ValidateDiagnosticSettingID checks that 'input' can be parsed as a Diagnostic Setting ID func ValidateDiagnosticSettingID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/id_arcsetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/id_arcsetting.go index f126af6e3ff4..b9efbac67edc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/id_arcsetting.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/id_arcsetting.go @@ -38,23 +38,9 @@ func ParseArcSettingID(input string) (*ArcSettingId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ArcSettingId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.ArcSettingName, ok = parsed.Parsed["arcSettingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arcSettingName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseArcSettingIDInsensitively(input string) (*ArcSettingId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ArcSettingId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ArcSettingId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.ArcSettingName, ok = parsed.Parsed["arcSettingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arcSettingName", *parsed) + if id.ArcSettingName, ok = input.Parsed["arcSettingName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "arcSettingName", input) } - return &id, nil + return nil } // ValidateArcSettingID checks that 'input' can be parsed as a Arc Setting ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/id_cluster.go index 2c50f526410a..85d91e2b16a9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/id_cluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/id_cluster.go @@ -36,19 +36,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/id_cluster.go index 342c6072fb6d..89c47c1adb5b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/id_cluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/id_cluster.go @@ -36,19 +36,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/id_cluster.go index 4b5d6ee8ea76..a552fc4d6d51 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/id_cluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/id_cluster.go @@ -36,19 +36,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/id_arcsetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/id_arcsetting.go index f37e348672d2..517db4fbed73 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/id_arcsetting.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/id_arcsetting.go @@ -38,23 +38,9 @@ func ParseArcSettingID(input string) (*ArcSettingId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ArcSettingId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.ArcSettingName, ok = parsed.Parsed["arcSettingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arcSettingName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseArcSettingIDInsensitively(input string) (*ArcSettingId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ArcSettingId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ArcSettingId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.ArcSettingName, ok = parsed.Parsed["arcSettingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arcSettingName", *parsed) + if id.ArcSettingName, ok = input.Parsed["arcSettingName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "arcSettingName", input) } - return &id, nil + return nil } // ValidateArcSettingID checks that 'input' can be parsed as a Arc Setting ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/id_extension.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/id_extension.go index d1760de7bfdf..4a325da9fd9e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/id_extension.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/id_extension.go @@ -40,27 +40,9 @@ func ParseExtensionID(input string) (*ExtensionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExtensionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.ArcSettingName, ok = parsed.Parsed["arcSettingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arcSettingName", *parsed) - } - - if id.ExtensionName, ok = parsed.Parsed["extensionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "extensionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExtensionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ExtensionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.ArcSettingName, ok = parsed.Parsed["arcSettingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arcSettingName", *parsed) + if id.ArcSettingName, ok = input.Parsed["arcSettingName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "arcSettingName", input) } - if id.ExtensionName, ok = parsed.Parsed["extensionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "extensionName", *parsed) + if id.ExtensionName, ok = input.Parsed["extensionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "extensionName", input) } - return &id, nil + return nil } // ValidateExtensionID checks that 'input' can be parsed as a Extension ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/id_cluster.go index 2e5411100310..a13927d7be20 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/id_cluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/id_cluster.go @@ -36,19 +36,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/id_offer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/id_offer.go index 0042e2bdbc70..676f856d72c6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/id_offer.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/id_offer.go @@ -40,27 +40,9 @@ func ParseOfferID(input string) (*OfferId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OfferId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.PublisherName, ok = parsed.Parsed["publisherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publisherName", *parsed) - } - - if id.OfferName, ok = parsed.Parsed["offerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "offerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseOfferIDInsensitively(input string) (*OfferId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OfferId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *OfferId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.PublisherName, ok = parsed.Parsed["publisherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publisherName", *parsed) + if id.PublisherName, ok = input.Parsed["publisherName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "publisherName", input) } - if id.OfferName, ok = parsed.Parsed["offerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "offerName", *parsed) + if id.OfferName, ok = input.Parsed["offerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "offerName", input) } - return &id, nil + return nil } // ValidateOfferID checks that 'input' can be parsed as a Offer ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/id_publisher.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/id_publisher.go index 38ccfe706932..18e5f87ecc0e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/id_publisher.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/id_publisher.go @@ -38,23 +38,9 @@ func ParsePublisherID(input string) (*PublisherId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PublisherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.PublisherName, ok = parsed.Parsed["publisherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publisherName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePublisherIDInsensitively(input string) (*PublisherId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PublisherId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PublisherId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.PublisherName, ok = parsed.Parsed["publisherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publisherName", *parsed) + if id.PublisherName, ok = input.Parsed["publisherName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "publisherName", input) } - return &id, nil + return nil } // ValidatePublisherID checks that 'input' can be parsed as a Publisher ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/id_cluster.go index 118e2ff0de30..300868710e96 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/id_cluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/id_cluster.go @@ -36,19 +36,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/id_publisher.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/id_publisher.go index 78e9c1c4de13..41ece713a9b1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/id_publisher.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/id_publisher.go @@ -38,23 +38,9 @@ func ParsePublisherID(input string) (*PublisherId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PublisherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.PublisherName, ok = parsed.Parsed["publisherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publisherName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePublisherIDInsensitively(input string) (*PublisherId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PublisherId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PublisherId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.PublisherName, ok = parsed.Parsed["publisherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publisherName", *parsed) + if id.PublisherName, ok = input.Parsed["publisherName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "publisherName", input) } - return &id, nil + return nil } // ValidatePublisherID checks that 'input' can be parsed as a Publisher ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/id_offer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/id_offer.go index a58695f2bde2..4c0a40c1ef78 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/id_offer.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/id_offer.go @@ -40,27 +40,9 @@ func ParseOfferID(input string) (*OfferId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OfferId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.PublisherName, ok = parsed.Parsed["publisherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publisherName", *parsed) - } - - if id.OfferName, ok = parsed.Parsed["offerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "offerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseOfferIDInsensitively(input string) (*OfferId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OfferId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *OfferId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.PublisherName, ok = parsed.Parsed["publisherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publisherName", *parsed) + if id.PublisherName, ok = input.Parsed["publisherName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "publisherName", input) } - if id.OfferName, ok = parsed.Parsed["offerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "offerName", *parsed) + if id.OfferName, ok = input.Parsed["offerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "offerName", input) } - return &id, nil + return nil } // ValidateOfferID checks that 'input' can be parsed as a Offer ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/id_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/id_sku.go index ac7c69edbb63..e3d1107f311e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/id_sku.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/id_sku.go @@ -42,31 +42,9 @@ func ParseSkuID(input string) (*SkuId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SkuId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.PublisherName, ok = parsed.Parsed["publisherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publisherName", *parsed) - } - - if id.OfferName, ok = parsed.Parsed["offerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "offerName", *parsed) - } - - if id.SkuName, ok = parsed.Parsed["skuName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "skuName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseSkuIDInsensitively(input string) (*SkuId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SkuId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SkuId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.PublisherName, ok = parsed.Parsed["publisherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publisherName", *parsed) + if id.PublisherName, ok = input.Parsed["publisherName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "publisherName", input) } - if id.OfferName, ok = parsed.Parsed["offerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "offerName", *parsed) + if id.OfferName, ok = input.Parsed["offerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "offerName", input) } - if id.SkuName, ok = parsed.Parsed["skuName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "skuName", *parsed) + if id.SkuName, ok = input.Parsed["skuName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "skuName", input) } - return &id, nil + return nil } // ValidateSkuID checks that 'input' can be parsed as a Sku ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/id_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/id_update.go index 3d261720d548..d095a318f13a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/id_update.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/id_update.go @@ -38,23 +38,9 @@ func ParseUpdateID(input string) (*UpdateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UpdateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.UpdateName, ok = parsed.Parsed["updateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "updateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseUpdateIDInsensitively(input string) (*UpdateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UpdateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *UpdateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.UpdateName, ok = parsed.Parsed["updateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "updateName", *parsed) + if id.UpdateName, ok = input.Parsed["updateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "updateName", input) } - return &id, nil + return nil } // ValidateUpdateID checks that 'input' can be parsed as a Update ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/id_updaterun.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/id_updaterun.go index 6bfbc2436d3a..5404c3aca808 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/id_updaterun.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/id_updaterun.go @@ -40,27 +40,9 @@ func ParseUpdateRunID(input string) (*UpdateRunId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UpdateRunId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.UpdateName, ok = parsed.Parsed["updateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "updateName", *parsed) - } - - if id.UpdateRunName, ok = parsed.Parsed["updateRunName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "updateRunName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseUpdateRunIDInsensitively(input string) (*UpdateRunId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UpdateRunId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *UpdateRunId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.UpdateName, ok = parsed.Parsed["updateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "updateName", *parsed) + if id.UpdateName, ok = input.Parsed["updateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "updateName", input) } - if id.UpdateRunName, ok = parsed.Parsed["updateRunName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "updateRunName", *parsed) + if id.UpdateRunName, ok = input.Parsed["updateRunName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "updateRunName", input) } - return &id, nil + return nil } // ValidateUpdateRunID checks that 'input' can be parsed as a Update Run ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/id_cluster.go index 19104ecfcfda..5d5c57c157d6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/id_cluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/id_cluster.go @@ -36,19 +36,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/id_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/id_update.go index 3ed1403336c4..f3a5a20a8fb6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/id_update.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/id_update.go @@ -38,23 +38,9 @@ func ParseUpdateID(input string) (*UpdateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UpdateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.UpdateName, ok = parsed.Parsed["updateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "updateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseUpdateIDInsensitively(input string) (*UpdateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UpdateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *UpdateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.UpdateName, ok = parsed.Parsed["updateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "updateName", *parsed) + if id.UpdateName, ok = input.Parsed["updateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "updateName", input) } - return &id, nil + return nil } // ValidateUpdateID checks that 'input' can be parsed as a Update ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/id_cluster.go index b651c33a67f4..8cf6fe94e8d7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/id_cluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/id_cluster.go @@ -36,19 +36,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/application/id_application.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/application/id_application.go index 4df2bc2fd408..5423db228ec8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/application/id_application.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/application/id_application.go @@ -38,23 +38,9 @@ func ParseApplicationID(input string) (*ApplicationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BatchAccountName, ok = parsed.Parsed["batchAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", *parsed) - } - - if id.ApplicationName, ok = parsed.Parsed["applicationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApplicationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.BatchAccountName, ok = parsed.Parsed["batchAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", *parsed) + if id.BatchAccountName, ok = input.Parsed["batchAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", input) } - if id.ApplicationName, ok = parsed.Parsed["applicationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationName", *parsed) + if id.ApplicationName, ok = input.Parsed["applicationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationName", input) } - return &id, nil + return nil } // ValidateApplicationID checks that 'input' can be parsed as a Application ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/application/id_batchaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/application/id_batchaccount.go index 9b487f42d5f7..1dc31c99bd95 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/application/id_batchaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/application/id_batchaccount.go @@ -36,19 +36,9 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BatchAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BatchAccountName, ok = parsed.Parsed["batchAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BatchAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *BatchAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.BatchAccountName, ok = parsed.Parsed["batchAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", *parsed) + if id.BatchAccountName, ok = input.Parsed["batchAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", input) } - return &id, nil + return nil } // ValidateBatchAccountID checks that 'input' can be parsed as a Batch Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/batchaccount/id_batchaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/batchaccount/id_batchaccount.go index 59d4160a459c..a535db3cf59f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/batchaccount/id_batchaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/batchaccount/id_batchaccount.go @@ -36,19 +36,9 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BatchAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BatchAccountName, ok = parsed.Parsed["batchAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BatchAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *BatchAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.BatchAccountName, ok = parsed.Parsed["batchAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", *parsed) + if id.BatchAccountName, ok = input.Parsed["batchAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", input) } - return &id, nil + return nil } // ValidateBatchAccountID checks that 'input' can be parsed as a Batch Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/certificate/id_batchaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/certificate/id_batchaccount.go index b86f8fcd1618..c61d83f1e917 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/certificate/id_batchaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/certificate/id_batchaccount.go @@ -36,19 +36,9 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BatchAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BatchAccountName, ok = parsed.Parsed["batchAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BatchAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *BatchAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.BatchAccountName, ok = parsed.Parsed["batchAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", *parsed) + if id.BatchAccountName, ok = input.Parsed["batchAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", input) } - return &id, nil + return nil } // ValidateBatchAccountID checks that 'input' can be parsed as a Batch Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/certificate/id_certificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/certificate/id_certificate.go index 8953ef5ffaea..51f6ac813f27 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/certificate/id_certificate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/certificate/id_certificate.go @@ -38,23 +38,9 @@ func ParseCertificateID(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BatchAccountName, ok = parsed.Parsed["batchAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", *parsed) - } - - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CertificateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.BatchAccountName, ok = parsed.Parsed["batchAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", *parsed) + if id.BatchAccountName, ok = input.Parsed["batchAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", input) } - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if id.CertificateName, ok = input.Parsed["certificateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "certificateName", input) } - return &id, nil + return nil } // ValidateCertificateID checks that 'input' can be parsed as a Certificate ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/pool/id_batchaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/pool/id_batchaccount.go index 63b4a9fc1b5f..2e306c3bf503 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/pool/id_batchaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/pool/id_batchaccount.go @@ -36,19 +36,9 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BatchAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BatchAccountName, ok = parsed.Parsed["batchAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BatchAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *BatchAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.BatchAccountName, ok = parsed.Parsed["batchAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", *parsed) + if id.BatchAccountName, ok = input.Parsed["batchAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", input) } - return &id, nil + return nil } // ValidateBatchAccountID checks that 'input' can be parsed as a Batch Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/pool/id_pool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/pool/id_pool.go index 95c4ec6031b0..3f2c4f531231 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/pool/id_pool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/pool/id_pool.go @@ -38,23 +38,9 @@ func ParsePoolID(input string) (*PoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BatchAccountName, ok = parsed.Parsed["batchAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", *parsed) - } - - if id.PoolName, ok = parsed.Parsed["poolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "poolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePoolIDInsensitively(input string) (*PoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PoolId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.BatchAccountName, ok = parsed.Parsed["batchAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", *parsed) + if id.BatchAccountName, ok = input.Parsed["batchAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", input) } - if id.PoolName, ok = parsed.Parsed["poolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "poolName", *parsed) + if id.PoolName, ok = input.Parsed["poolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "poolName", input) } - return &id, nil + return nil } // ValidatePoolID checks that 'input' can be parsed as a Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/assignment/id_scopedblueprintassignment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/assignment/id_scopedblueprintassignment.go index f6f2d50a8ac8..d19fc3683142 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/assignment/id_scopedblueprintassignment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/assignment/id_scopedblueprintassignment.go @@ -34,15 +34,9 @@ func ParseScopedBlueprintAssignmentID(input string) (*ScopedBlueprintAssignmentI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedBlueprintAssignmentId{} - - if id.ResourceScope, ok = parsed.Parsed["resourceScope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceScope", *parsed) - } - - if id.BlueprintAssignmentName, ok = parsed.Parsed["blueprintAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "blueprintAssignmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedBlueprintAssignmentIDInsensitively(input string) (*ScopedBluepri return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedBlueprintAssignmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.ResourceScope, ok = parsed.Parsed["resourceScope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceScope", *parsed) + return &id, nil +} + +func (id *ScopedBlueprintAssignmentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ResourceScope, ok = input.Parsed["resourceScope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceScope", input) } - if id.BlueprintAssignmentName, ok = parsed.Parsed["blueprintAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "blueprintAssignmentName", *parsed) + if id.BlueprintAssignmentName, ok = input.Parsed["blueprintAssignmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "blueprintAssignmentName", input) } - return &id, nil + return nil } // ValidateScopedBlueprintAssignmentID checks that 'input' can be parsed as a Scoped Blueprint Assignment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/blueprint/id_scopedblueprint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/blueprint/id_scopedblueprint.go index eb77efed0449..e6027367207c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/blueprint/id_scopedblueprint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/blueprint/id_scopedblueprint.go @@ -34,15 +34,9 @@ func ParseScopedBlueprintID(input string) (*ScopedBlueprintId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedBlueprintId{} - - if id.ResourceScope, ok = parsed.Parsed["resourceScope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceScope", *parsed) - } - - if id.BlueprintName, ok = parsed.Parsed["blueprintName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "blueprintName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedBlueprintIDInsensitively(input string) (*ScopedBlueprintId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedBlueprintId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.ResourceScope, ok = parsed.Parsed["resourceScope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceScope", *parsed) + return &id, nil +} + +func (id *ScopedBlueprintId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ResourceScope, ok = input.Parsed["resourceScope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceScope", input) } - if id.BlueprintName, ok = parsed.Parsed["blueprintName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "blueprintName", *parsed) + if id.BlueprintName, ok = input.Parsed["blueprintName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "blueprintName", input) } - return &id, nil + return nil } // ValidateScopedBlueprintID checks that 'input' can be parsed as a Scoped Blueprint ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/id_scopedblueprint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/id_scopedblueprint.go index 4ce19f325c1b..e45234381c88 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/id_scopedblueprint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/id_scopedblueprint.go @@ -34,15 +34,9 @@ func ParseScopedBlueprintID(input string) (*ScopedBlueprintId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedBlueprintId{} - - if id.ResourceScope, ok = parsed.Parsed["resourceScope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceScope", *parsed) - } - - if id.BlueprintName, ok = parsed.Parsed["blueprintName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "blueprintName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedBlueprintIDInsensitively(input string) (*ScopedBlueprintId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedBlueprintId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.ResourceScope, ok = parsed.Parsed["resourceScope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceScope", *parsed) + return &id, nil +} + +func (id *ScopedBlueprintId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ResourceScope, ok = input.Parsed["resourceScope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceScope", input) } - if id.BlueprintName, ok = parsed.Parsed["blueprintName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "blueprintName", *parsed) + if id.BlueprintName, ok = input.Parsed["blueprintName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "blueprintName", input) } - return &id, nil + return nil } // ValidateScopedBlueprintID checks that 'input' can be parsed as a Scoped Blueprint ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/id_scopedversion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/id_scopedversion.go index e205868b3852..cfc6e91c252f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/id_scopedversion.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/id_scopedversion.go @@ -36,19 +36,9 @@ func ParseScopedVersionID(input string) (*ScopedVersionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedVersionId{} - - if id.ResourceScope, ok = parsed.Parsed["resourceScope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceScope", *parsed) - } - - if id.BlueprintName, ok = parsed.Parsed["blueprintName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "blueprintName", *parsed) - } - - if id.VersionId, ok = parsed.Parsed["versionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "versionId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseScopedVersionIDInsensitively(input string) (*ScopedVersionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedVersionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.ResourceScope, ok = parsed.Parsed["resourceScope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceScope", *parsed) +func (id *ScopedVersionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ResourceScope, ok = input.Parsed["resourceScope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceScope", input) } - if id.BlueprintName, ok = parsed.Parsed["blueprintName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "blueprintName", *parsed) + if id.BlueprintName, ok = input.Parsed["blueprintName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "blueprintName", input) } - if id.VersionId, ok = parsed.Parsed["versionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "versionId", *parsed) + if id.VersionId, ok = input.Parsed["versionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "versionId", input) } - return &id, nil + return nil } // ValidateScopedVersionID checks that 'input' can be parsed as a Scoped Version ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_account.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_account.go index 083e7fdfbedb..6c5fa6c56650 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_account.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_account.go @@ -36,19 +36,9 @@ func ParseAccountID(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - return &id, nil + return nil } // ValidateAccountID checks that 'input' can be parsed as a Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_deletedaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_deletedaccount.go index f16de8a0f133..bc58fbc512d5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_deletedaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_deletedaccount.go @@ -38,23 +38,9 @@ func ParseDeletedAccountID(input string) (*DeletedAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeletedAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DeletedAccountName, ok = parsed.Parsed["deletedAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deletedAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDeletedAccountIDInsensitively(input string) (*DeletedAccountId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeletedAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DeletedAccountId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DeletedAccountName, ok = parsed.Parsed["deletedAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deletedAccountName", *parsed) + if id.DeletedAccountName, ok = input.Parsed["deletedAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "deletedAccountName", input) } - return &id, nil + return nil } // ValidateDeletedAccountID checks that 'input' can be parsed as a Deleted Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_location.go index 338b34bed02c..fd579b6ac4b5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/id_account.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/id_account.go index b0f74aaeafd1..fc5e1a97e510 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/id_account.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/id_account.go @@ -36,19 +36,9 @@ func ParseAccountID(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - return &id, nil + return nil } // ValidateAccountID checks that 'input' can be parsed as a Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/id_deployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/id_deployment.go index 55a493a15303..b9a8c8f2cbdb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/id_deployment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments/id_deployment.go @@ -38,23 +38,9 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeploymentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) - } - - if id.DeploymentName, ok = parsed.Parsed["deploymentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deploymentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeploymentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DeploymentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - if id.DeploymentName, ok = parsed.Parsed["deploymentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deploymentName", *parsed) + if id.DeploymentName, ok = input.Parsed["deploymentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "deploymentName", input) } - return &id, nil + return nil } // ValidateDeploymentID checks that 'input' can be parsed as a Deployment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-03-31/communicationservices/id_communicationservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-03-31/communicationservices/id_communicationservice.go index bfc7ec53aba7..87d9f6a7383c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-03-31/communicationservices/id_communicationservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-03-31/communicationservices/id_communicationservice.go @@ -36,19 +36,9 @@ func ParseCommunicationServiceID(input string) (*CommunicationServiceId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CommunicationServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CommunicationServiceName, ok = parsed.Parsed["communicationServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "communicationServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseCommunicationServiceIDInsensitively(input string) (*CommunicationServi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CommunicationServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *CommunicationServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CommunicationServiceName, ok = parsed.Parsed["communicationServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "communicationServiceName", *parsed) + if id.CommunicationServiceName, ok = input.Parsed["communicationServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "communicationServiceName", input) } - return &id, nil + return nil } // ValidateCommunicationServiceID checks that 'input' can be parsed as a Communication Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-03-31/emailservices/id_emailservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-03-31/emailservices/id_emailservice.go index 3a2d023294f0..d96232e86345 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-03-31/emailservices/id_emailservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-03-31/emailservices/id_emailservice.go @@ -36,19 +36,9 @@ func ParseEmailServiceID(input string) (*EmailServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EmailServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.EmailServiceName, ok = parsed.Parsed["emailServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "emailServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseEmailServiceIDInsensitively(input string) (*EmailServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EmailServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *EmailServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.EmailServiceName, ok = parsed.Parsed["emailServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "emailServiceName", *parsed) + if id.EmailServiceName, ok = input.Parsed["emailServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "emailServiceName", input) } - return &id, nil + return nil } // ValidateEmailServiceID checks that 'input' can be parsed as a Email Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/id_availabilityset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/id_availabilityset.go index 8564b6ab2ac9..2393723dfd3c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/id_availabilityset.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/availabilitysets/id_availabilityset.go @@ -36,19 +36,9 @@ func ParseAvailabilitySetID(input string) (*AvailabilitySetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AvailabilitySetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AvailabilitySetName, ok = parsed.Parsed["availabilitySetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "availabilitySetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAvailabilitySetIDInsensitively(input string) (*AvailabilitySetId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AvailabilitySetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AvailabilitySetId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AvailabilitySetName, ok = parsed.Parsed["availabilitySetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "availabilitySetName", *parsed) + if id.AvailabilitySetName, ok = input.Parsed["availabilitySetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "availabilitySetName", input) } - return &id, nil + return nil } // ValidateAvailabilitySetID checks that 'input' can be parsed as a Availability Set ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/id_hostgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/id_hostgroup.go index 745235829528..fea78a50c471 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/id_hostgroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhostgroups/id_hostgroup.go @@ -36,19 +36,9 @@ func ParseHostGroupID(input string) (*HostGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HostGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.HostGroupName, ok = parsed.Parsed["hostGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hostGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseHostGroupIDInsensitively(input string) (*HostGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HostGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *HostGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.HostGroupName, ok = parsed.Parsed["hostGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hostGroupName", *parsed) + if id.HostGroupName, ok = input.Parsed["hostGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hostGroupName", input) } - return &id, nil + return nil } // ValidateHostGroupID checks that 'input' can be parsed as a Host Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/id_host.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/id_host.go index 762971eb0419..4a087b876393 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/id_host.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/dedicatedhosts/id_host.go @@ -38,23 +38,9 @@ func ParseHostID(input string) (*HostId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HostId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.HostGroupName, ok = parsed.Parsed["hostGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hostGroupName", *parsed) - } - - if id.HostName, ok = parsed.Parsed["hostName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hostName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseHostIDInsensitively(input string) (*HostId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HostId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *HostId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.HostGroupName, ok = parsed.Parsed["hostGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hostGroupName", *parsed) + if id.HostGroupName, ok = input.Parsed["hostGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hostGroupName", input) } - if id.HostName, ok = parsed.Parsed["hostName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hostName", *parsed) + if id.HostName, ok = input.Parsed["hostName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hostName", input) } - return &id, nil + return nil } // ValidateHostID checks that 'input' can be parsed as a Host ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/id_sshpublickey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/id_sshpublickey.go index 9c7f9ae62bac..9e9ee5ff0f64 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/id_sshpublickey.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys/id_sshpublickey.go @@ -36,19 +36,9 @@ func ParseSshPublicKeyID(input string) (*SshPublicKeyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SshPublicKeyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SshPublicKeyName, ok = parsed.Parsed["sshPublicKeyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sshPublicKeyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSshPublicKeyIDInsensitively(input string) (*SshPublicKeyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SshPublicKeyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SshPublicKeyId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SshPublicKeyName, ok = parsed.Parsed["sshPublicKeyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sshPublicKeyName", *parsed) + if id.SshPublicKeyName, ok = input.Parsed["sshPublicKeyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sshPublicKeyName", input) } - return &id, nil + return nil } // ValidateSshPublicKeyID checks that 'input' can be parsed as a Ssh Public Key ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/virtualmachines/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/virtualmachines/id_location.go index 4666b6bb1061..8f54853528a8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/virtualmachines/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/virtualmachines/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/virtualmachines/id_virtualmachine.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/virtualmachines/id_virtualmachine.go index 3d3c57c3528b..367cce213654 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/virtualmachines/id_virtualmachine.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/virtualmachines/id_virtualmachine.go @@ -36,19 +36,9 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualMachineId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineName, ok = parsed.Parsed["virtualMachineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualMachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VirtualMachineId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualMachineName, ok = parsed.Parsed["virtualMachineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", *parsed) + if id.VirtualMachineName, ok = input.Parsed["virtualMachineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", input) } - return &id, nil + return nil } // ValidateVirtualMachineID checks that 'input' can be parsed as a Virtual Machine ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/capacityreservationgroups/id_capacityreservationgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/capacityreservationgroups/id_capacityreservationgroup.go index b974029515e9..725ce39f0338 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/capacityreservationgroups/id_capacityreservationgroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/capacityreservationgroups/id_capacityreservationgroup.go @@ -36,19 +36,9 @@ func ParseCapacityReservationGroupID(input string) (*CapacityReservationGroupId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CapacityReservationGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CapacityReservationGroupName, ok = parsed.Parsed["capacityReservationGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityReservationGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseCapacityReservationGroupIDInsensitively(input string) (*CapacityReserv return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CapacityReservationGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *CapacityReservationGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CapacityReservationGroupName, ok = parsed.Parsed["capacityReservationGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityReservationGroupName", *parsed) + if id.CapacityReservationGroupName, ok = input.Parsed["capacityReservationGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "capacityReservationGroupName", input) } - return &id, nil + return nil } // ValidateCapacityReservationGroupID checks that 'input' can be parsed as a Capacity Reservation Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/capacityreservations/id_capacityreservation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/capacityreservations/id_capacityreservation.go index df25394758fe..ac78ccbcc3e8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/capacityreservations/id_capacityreservation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/capacityreservations/id_capacityreservation.go @@ -38,23 +38,9 @@ func ParseCapacityReservationID(input string) (*CapacityReservationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CapacityReservationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CapacityReservationGroupName, ok = parsed.Parsed["capacityReservationGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityReservationGroupName", *parsed) - } - - if id.CapacityReservationName, ok = parsed.Parsed["capacityReservationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityReservationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCapacityReservationIDInsensitively(input string) (*CapacityReservation return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CapacityReservationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CapacityReservationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CapacityReservationGroupName, ok = parsed.Parsed["capacityReservationGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityReservationGroupName", *parsed) + if id.CapacityReservationGroupName, ok = input.Parsed["capacityReservationGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "capacityReservationGroupName", input) } - if id.CapacityReservationName, ok = parsed.Parsed["capacityReservationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityReservationName", *parsed) + if id.CapacityReservationName, ok = input.Parsed["capacityReservationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "capacityReservationName", input) } - return &id, nil + return nil } // ValidateCapacityReservationID checks that 'input' can be parsed as a Capacity Reservation ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/images/id_image.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/images/id_image.go index 048dbeac923d..bd84d2f6092b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/images/id_image.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/images/id_image.go @@ -36,19 +36,9 @@ func ParseImageID(input string) (*ImageId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ImageId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ImageName, ok = parsed.Parsed["imageName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "imageName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ImageId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ImageId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ImageName, ok = parsed.Parsed["imageName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "imageName", *parsed) + if id.ImageName, ok = input.Parsed["imageName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "imageName", input) } - return &id, nil + return nil } // ValidateImageID checks that 'input' can be parsed as a Image ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/proximityplacementgroups/id_proximityplacementgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/proximityplacementgroups/id_proximityplacementgroup.go index b220644fa11f..1232e950c85d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/proximityplacementgroups/id_proximityplacementgroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/proximityplacementgroups/id_proximityplacementgroup.go @@ -36,19 +36,9 @@ func ParseProximityPlacementGroupID(input string) (*ProximityPlacementGroupId, e return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProximityPlacementGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ProximityPlacementGroupName, ok = parsed.Parsed["proximityPlacementGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "proximityPlacementGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProximityPlacementGroupIDInsensitively(input string) (*ProximityPlacem return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProximityPlacementGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProximityPlacementGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ProximityPlacementGroupName, ok = parsed.Parsed["proximityPlacementGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "proximityPlacementGroupName", *parsed) + if id.ProximityPlacementGroupName, ok = input.Parsed["proximityPlacementGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "proximityPlacementGroupName", input) } - return &id, nil + return nil } // ValidateProximityPlacementGroupID checks that 'input' can be parsed as a Proximity Placement Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/diskaccesses/id_diskaccess.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/diskaccesses/id_diskaccess.go index 265eb676bec9..06ceea1dc2a5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/diskaccesses/id_diskaccess.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/diskaccesses/id_diskaccess.go @@ -36,19 +36,9 @@ func ParseDiskAccessID(input string) (*DiskAccessId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DiskAccessId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DiskAccessName, ok = parsed.Parsed["diskAccessName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diskAccessName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDiskAccessIDInsensitively(input string) (*DiskAccessId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DiskAccessId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DiskAccessId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DiskAccessName, ok = parsed.Parsed["diskAccessName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diskAccessName", *parsed) + if id.DiskAccessName, ok = input.Parsed["diskAccessName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "diskAccessName", input) } - return &id, nil + return nil } // ValidateDiskAccessID checks that 'input' can be parsed as a Disk Access ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/diskaccesses/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/diskaccesses/id_privateendpointconnection.go index 6973d6ce8c0c..304a5887be1d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/diskaccesses/id_privateendpointconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/diskaccesses/id_privateendpointconnection.go @@ -38,23 +38,9 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DiskAccessName, ok = parsed.Parsed["diskAccessName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diskAccessName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DiskAccessName, ok = parsed.Parsed["diskAccessName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diskAccessName", *parsed) + if id.DiskAccessName, ok = input.Parsed["diskAccessName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "diskAccessName", input) } - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", input) } - return &id, nil + return nil } // ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/diskencryptionsets/id_diskencryptionset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/diskencryptionsets/id_diskencryptionset.go index b62ee1a0de16..5b5a32d8f173 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/diskencryptionsets/id_diskencryptionset.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/diskencryptionsets/id_diskencryptionset.go @@ -36,19 +36,9 @@ func ParseDiskEncryptionSetID(input string) (*DiskEncryptionSetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DiskEncryptionSetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DiskEncryptionSetName, ok = parsed.Parsed["diskEncryptionSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diskEncryptionSetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDiskEncryptionSetIDInsensitively(input string) (*DiskEncryptionSetId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DiskEncryptionSetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DiskEncryptionSetId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DiskEncryptionSetName, ok = parsed.Parsed["diskEncryptionSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diskEncryptionSetName", *parsed) + if id.DiskEncryptionSetName, ok = input.Parsed["diskEncryptionSetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "diskEncryptionSetName", input) } - return &id, nil + return nil } // ValidateDiskEncryptionSetID checks that 'input' can be parsed as a Disk Encryption Set ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/snapshots/id_snapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/snapshots/id_snapshot.go index f51dc3334545..50c708436574 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/snapshots/id_snapshot.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/snapshots/id_snapshot.go @@ -36,19 +36,9 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SnapshotId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SnapshotName, ok = parsed.Parsed["snapshotName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "snapshotName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SnapshotId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SnapshotId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SnapshotName, ok = parsed.Parsed["snapshotName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "snapshotName", *parsed) + if id.SnapshotName, ok = input.Parsed["snapshotName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "snapshotName", input) } - return &id, nil + return nil } // ValidateSnapshotID checks that 'input' can be parsed as a Snapshot ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryapplications/id_application.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryapplications/id_application.go index 8cfa3845ad50..e25e3c30008d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryapplications/id_application.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryapplications/id_application.go @@ -38,23 +38,9 @@ func ParseApplicationID(input string) (*ApplicationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.GalleryName, ok = parsed.Parsed["galleryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "galleryName", *parsed) - } - - if id.ApplicationName, ok = parsed.Parsed["applicationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApplicationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.GalleryName, ok = parsed.Parsed["galleryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "galleryName", *parsed) + if id.GalleryName, ok = input.Parsed["galleryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "galleryName", input) } - if id.ApplicationName, ok = parsed.Parsed["applicationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationName", *parsed) + if id.ApplicationName, ok = input.Parsed["applicationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationName", input) } - return &id, nil + return nil } // ValidateApplicationID checks that 'input' can be parsed as a Application ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryapplicationversions/id_application.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryapplicationversions/id_application.go index 4b14e9a9b14a..8065846d94a9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryapplicationversions/id_application.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryapplicationversions/id_application.go @@ -38,23 +38,9 @@ func ParseApplicationID(input string) (*ApplicationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.GalleryName, ok = parsed.Parsed["galleryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "galleryName", *parsed) - } - - if id.ApplicationName, ok = parsed.Parsed["applicationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApplicationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.GalleryName, ok = parsed.Parsed["galleryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "galleryName", *parsed) + if id.GalleryName, ok = input.Parsed["galleryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "galleryName", input) } - if id.ApplicationName, ok = parsed.Parsed["applicationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationName", *parsed) + if id.ApplicationName, ok = input.Parsed["applicationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationName", input) } - return &id, nil + return nil } // ValidateApplicationID checks that 'input' can be parsed as a Application ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryapplicationversions/id_applicationversion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryapplicationversions/id_applicationversion.go index 3a625169a43d..7da1557e4c4a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryapplicationversions/id_applicationversion.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryapplicationversions/id_applicationversion.go @@ -40,27 +40,9 @@ func ParseApplicationVersionID(input string) (*ApplicationVersionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationVersionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.GalleryName, ok = parsed.Parsed["galleryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "galleryName", *parsed) - } - - if id.ApplicationName, ok = parsed.Parsed["applicationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationName", *parsed) - } - - if id.VersionName, ok = parsed.Parsed["versionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "versionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseApplicationVersionIDInsensitively(input string) (*ApplicationVersionId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationVersionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ApplicationVersionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.GalleryName, ok = parsed.Parsed["galleryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "galleryName", *parsed) + if id.GalleryName, ok = input.Parsed["galleryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "galleryName", input) } - if id.ApplicationName, ok = parsed.Parsed["applicationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationName", *parsed) + if id.ApplicationName, ok = input.Parsed["applicationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationName", input) } - if id.VersionName, ok = parsed.Parsed["versionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "versionName", *parsed) + if id.VersionName, ok = input.Parsed["versionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "versionName", input) } - return &id, nil + return nil } // ValidateApplicationVersionID checks that 'input' can be parsed as a Application Version ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-04-02/disks/id_disk.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-04-02/disks/id_disk.go index 3415c385da73..6266bcedb6db 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-04-02/disks/id_disk.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-04-02/disks/id_disk.go @@ -36,19 +36,9 @@ func ParseDiskID(input string) (*DiskId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DiskId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DiskName, ok = parsed.Parsed["diskName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diskName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDiskIDInsensitively(input string) (*DiskId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DiskId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DiskId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DiskName, ok = parsed.Parsed["diskName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diskName", *parsed) + if id.DiskName, ok = input.Parsed["diskName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "diskName", input) } - return &id, nil + return nil } // ValidateDiskID checks that 'input' can be parsed as a Disk ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/id_ledger.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/id_ledger.go index 9f6236e44070..5cfe57c7a0c0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/id_ledger.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger/id_ledger.go @@ -36,19 +36,9 @@ func ParseLedgerID(input string) (*LedgerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LedgerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LedgerName, ok = parsed.Parsed["ledgerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ledgerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLedgerIDInsensitively(input string) (*LedgerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LedgerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LedgerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LedgerName, ok = parsed.Parsed["ledgerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ledgerName", *parsed) + if id.LedgerName, ok = input.Parsed["ledgerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ledgerName", input) } - return &id, nil + return nil } // ValidateLedgerID checks that 'input' can be parsed as a Ledger ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/budgets/id_scopedbudget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/budgets/id_scopedbudget.go index f5eda7aa882f..1084bf0ee860 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/budgets/id_scopedbudget.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/budgets/id_scopedbudget.go @@ -34,15 +34,9 @@ func ParseScopedBudgetID(input string) (*ScopedBudgetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedBudgetId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.BudgetName, ok = parsed.Parsed["budgetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "budgetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedBudgetIDInsensitively(input string) (*ScopedBudgetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedBudgetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedBudgetId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.BudgetName, ok = parsed.Parsed["budgetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "budgetName", *parsed) + if id.BudgetName, ok = input.Parsed["budgetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "budgetName", input) } - return &id, nil + return nil } // ValidateScopedBudgetID checks that 'input' can be parsed as a Scoped Budget ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates/id_certificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates/id_certificate.go index fd232b2dd05a..21b3813873fd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates/id_certificate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates/id_certificate.go @@ -38,23 +38,9 @@ func ParseCertificateID(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) - } - - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CertificateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) + if id.ManagedEnvironmentName, ok = input.Parsed["managedEnvironmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", input) } - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if id.CertificateName, ok = input.Parsed["certificateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "certificateName", input) } - return &id, nil + return nil } // ValidateCertificateID checks that 'input' can be parsed as a Certificate ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates/id_connectedenvironment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates/id_connectedenvironment.go index 2a6232f173ad..1650e188f4d8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates/id_connectedenvironment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates/id_connectedenvironment.go @@ -36,19 +36,9 @@ func ParseConnectedEnvironmentID(input string) (*ConnectedEnvironmentId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectedEnvironmentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConnectedEnvironmentName, ok = parsed.Parsed["connectedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectedEnvironmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseConnectedEnvironmentIDInsensitively(input string) (*ConnectedEnvironme return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectedEnvironmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ConnectedEnvironmentId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ConnectedEnvironmentName, ok = parsed.Parsed["connectedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectedEnvironmentName", *parsed) + if id.ConnectedEnvironmentName, ok = input.Parsed["connectedEnvironmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "connectedEnvironmentName", input) } - return &id, nil + return nil } // ValidateConnectedEnvironmentID checks that 'input' can be parsed as a Connected Environment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates/id_connectedenvironmentcertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates/id_connectedenvironmentcertificate.go index 85a6c7db3d2e..26feae01aca6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates/id_connectedenvironmentcertificate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates/id_connectedenvironmentcertificate.go @@ -38,23 +38,9 @@ func ParseConnectedEnvironmentCertificateID(input string) (*ConnectedEnvironment return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectedEnvironmentCertificateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConnectedEnvironmentName, ok = parsed.Parsed["connectedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectedEnvironmentName", *parsed) - } - - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseConnectedEnvironmentCertificateIDInsensitively(input string) (*Connect return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectedEnvironmentCertificateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConnectedEnvironmentCertificateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ConnectedEnvironmentName, ok = parsed.Parsed["connectedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectedEnvironmentName", *parsed) + if id.ConnectedEnvironmentName, ok = input.Parsed["connectedEnvironmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "connectedEnvironmentName", input) } - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if id.CertificateName, ok = input.Parsed["certificateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "certificateName", input) } - return &id, nil + return nil } // ValidateConnectedEnvironmentCertificateID checks that 'input' can be parsed as a Connected Environment Certificate ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates/id_managedenvironment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates/id_managedenvironment.go index 5301e3cbf409..dce7709f9a58 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates/id_managedenvironment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates/id_managedenvironment.go @@ -36,19 +36,9 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedEnvironmentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedEnvironmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ManagedEnvironmentId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) + if id.ManagedEnvironmentName, ok = input.Parsed["managedEnvironmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", input) } - return &id, nil + return nil } // ValidateManagedEnvironmentID checks that 'input' can be parsed as a Managed Environment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerapps/id_containerapp.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerapps/id_containerapp.go index bec76c9d8cd4..b5cb92a4826b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerapps/id_containerapp.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerapps/id_containerapp.go @@ -36,19 +36,9 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContainerAppId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ContainerAppName, ok = parsed.Parsed["containerAppName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerAppName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContainerAppId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ContainerAppId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ContainerAppName, ok = parsed.Parsed["containerAppName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerAppName", *parsed) + if id.ContainerAppName, ok = input.Parsed["containerAppName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "containerAppName", input) } - return &id, nil + return nil } // ValidateContainerAppID checks that 'input' can be parsed as a Container App ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerapps/id_detector.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerapps/id_detector.go index e0635c427725..f868c0e9e852 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerapps/id_detector.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerapps/id_detector.go @@ -38,23 +38,9 @@ func ParseDetectorID(input string) (*DetectorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DetectorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ContainerAppName, ok = parsed.Parsed["containerAppName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerAppName", *parsed) - } - - if id.DetectorName, ok = parsed.Parsed["detectorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "detectorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DetectorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DetectorId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ContainerAppName, ok = parsed.Parsed["containerAppName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerAppName", *parsed) + if id.ContainerAppName, ok = input.Parsed["containerAppName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "containerAppName", input) } - if id.DetectorName, ok = parsed.Parsed["detectorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "detectorName", *parsed) + if id.DetectorName, ok = input.Parsed["detectorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "detectorName", input) } - return &id, nil + return nil } // ValidateDetectorID checks that 'input' can be parsed as a Detector ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerapps/id_revisionsapirevision.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerapps/id_revisionsapirevision.go index a46f51fe65ea..384d409993a9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerapps/id_revisionsapirevision.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerapps/id_revisionsapirevision.go @@ -38,23 +38,9 @@ func ParseRevisionsApiRevisionID(input string) (*RevisionsApiRevisionId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RevisionsApiRevisionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ContainerAppName, ok = parsed.Parsed["containerAppName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerAppName", *parsed) - } - - if id.RevisionName, ok = parsed.Parsed["revisionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "revisionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRevisionsApiRevisionIDInsensitively(input string) (*RevisionsApiRevisi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RevisionsApiRevisionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RevisionsApiRevisionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ContainerAppName, ok = parsed.Parsed["containerAppName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerAppName", *parsed) + if id.ContainerAppName, ok = input.Parsed["containerAppName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "containerAppName", input) } - if id.RevisionName, ok = parsed.Parsed["revisionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "revisionName", *parsed) + if id.RevisionName, ok = input.Parsed["revisionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "revisionName", input) } - return &id, nil + return nil } // ValidateRevisionsApiRevisionID checks that 'input' can be parsed as a Revisions Api Revision ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerappsrevisions/id_containerapp.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerappsrevisions/id_containerapp.go index 0c58f29a8e43..3931986b1de5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerappsrevisions/id_containerapp.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerappsrevisions/id_containerapp.go @@ -36,19 +36,9 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContainerAppId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ContainerAppName, ok = parsed.Parsed["containerAppName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerAppName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContainerAppId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ContainerAppId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ContainerAppName, ok = parsed.Parsed["containerAppName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerAppName", *parsed) + if id.ContainerAppName, ok = input.Parsed["containerAppName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "containerAppName", input) } - return &id, nil + return nil } // ValidateContainerAppID checks that 'input' can be parsed as a Container App ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerappsrevisions/id_revision.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerappsrevisions/id_revision.go index 3afb0fa480f5..2183bef32af8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerappsrevisions/id_revision.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerappsrevisions/id_revision.go @@ -38,23 +38,9 @@ func ParseRevisionID(input string) (*RevisionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RevisionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ContainerAppName, ok = parsed.Parsed["containerAppName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerAppName", *parsed) - } - - if id.RevisionName, ok = parsed.Parsed["revisionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "revisionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRevisionIDInsensitively(input string) (*RevisionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RevisionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RevisionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ContainerAppName, ok = parsed.Parsed["containerAppName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerAppName", *parsed) + if id.ContainerAppName, ok = input.Parsed["containerAppName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "containerAppName", input) } - if id.RevisionName, ok = parsed.Parsed["revisionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "revisionName", *parsed) + if id.RevisionName, ok = input.Parsed["revisionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "revisionName", input) } - return &id, nil + return nil } // ValidateRevisionID checks that 'input' can be parsed as a Revision ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents/id_connectedenvironment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents/id_connectedenvironment.go index ac0bd53cbd06..4713405982fc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents/id_connectedenvironment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents/id_connectedenvironment.go @@ -36,19 +36,9 @@ func ParseConnectedEnvironmentID(input string) (*ConnectedEnvironmentId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectedEnvironmentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConnectedEnvironmentName, ok = parsed.Parsed["connectedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectedEnvironmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseConnectedEnvironmentIDInsensitively(input string) (*ConnectedEnvironme return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectedEnvironmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ConnectedEnvironmentId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ConnectedEnvironmentName, ok = parsed.Parsed["connectedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectedEnvironmentName", *parsed) + if id.ConnectedEnvironmentName, ok = input.Parsed["connectedEnvironmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "connectedEnvironmentName", input) } - return &id, nil + return nil } // ValidateConnectedEnvironmentID checks that 'input' can be parsed as a Connected Environment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents/id_connectedenvironmentdaprcomponent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents/id_connectedenvironmentdaprcomponent.go index ee117ae73ec6..677df196b683 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents/id_connectedenvironmentdaprcomponent.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents/id_connectedenvironmentdaprcomponent.go @@ -38,23 +38,9 @@ func ParseConnectedEnvironmentDaprComponentID(input string) (*ConnectedEnvironme return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectedEnvironmentDaprComponentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConnectedEnvironmentName, ok = parsed.Parsed["connectedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectedEnvironmentName", *parsed) - } - - if id.DaprComponentName, ok = parsed.Parsed["daprComponentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "daprComponentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseConnectedEnvironmentDaprComponentIDInsensitively(input string) (*Conne return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectedEnvironmentDaprComponentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConnectedEnvironmentDaprComponentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ConnectedEnvironmentName, ok = parsed.Parsed["connectedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectedEnvironmentName", *parsed) + if id.ConnectedEnvironmentName, ok = input.Parsed["connectedEnvironmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "connectedEnvironmentName", input) } - if id.DaprComponentName, ok = parsed.Parsed["daprComponentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "daprComponentName", *parsed) + if id.DaprComponentName, ok = input.Parsed["daprComponentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "daprComponentName", input) } - return &id, nil + return nil } // ValidateConnectedEnvironmentDaprComponentID checks that 'input' can be parsed as a Connected Environment Dapr Component ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents/id_daprcomponent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents/id_daprcomponent.go index 490cdc8217de..fb0b153db562 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents/id_daprcomponent.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents/id_daprcomponent.go @@ -38,23 +38,9 @@ func ParseDaprComponentID(input string) (*DaprComponentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DaprComponentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) - } - - if id.DaprComponentName, ok = parsed.Parsed["daprComponentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "daprComponentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDaprComponentIDInsensitively(input string) (*DaprComponentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DaprComponentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DaprComponentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) + if id.ManagedEnvironmentName, ok = input.Parsed["managedEnvironmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", input) } - if id.DaprComponentName, ok = parsed.Parsed["daprComponentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "daprComponentName", *parsed) + if id.DaprComponentName, ok = input.Parsed["daprComponentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "daprComponentName", input) } - return &id, nil + return nil } // ValidateDaprComponentID checks that 'input' can be parsed as a Dapr Component ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents/id_managedenvironment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents/id_managedenvironment.go index 550d5ac0ba91..2337e0c4eaca 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents/id_managedenvironment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents/id_managedenvironment.go @@ -36,19 +36,9 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedEnvironmentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedEnvironmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ManagedEnvironmentId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) + if id.ManagedEnvironmentName, ok = input.Parsed["managedEnvironmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", input) } - return &id, nil + return nil } // ValidateManagedEnvironmentID checks that 'input' can be parsed as a Managed Environment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments/id_certificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments/id_certificate.go index 05dfa0b72675..e62686ef7441 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments/id_certificate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments/id_certificate.go @@ -38,23 +38,9 @@ func ParseCertificateID(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) - } - - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CertificateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) + if id.ManagedEnvironmentName, ok = input.Parsed["managedEnvironmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", input) } - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if id.CertificateName, ok = input.Parsed["certificateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "certificateName", input) } - return &id, nil + return nil } // ValidateCertificateID checks that 'input' can be parsed as a Certificate ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedcertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedcertificate.go index e862ec48850a..17686c0b4a4b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedcertificate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedcertificate.go @@ -38,23 +38,9 @@ func ParseManagedCertificateID(input string) (*ManagedCertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedCertificateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) - } - - if id.ManagedCertificateName, ok = parsed.Parsed["managedCertificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedCertificateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseManagedCertificateIDInsensitively(input string) (*ManagedCertificateId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedCertificateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ManagedCertificateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) + if id.ManagedEnvironmentName, ok = input.Parsed["managedEnvironmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", input) } - if id.ManagedCertificateName, ok = parsed.Parsed["managedCertificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedCertificateName", *parsed) + if id.ManagedCertificateName, ok = input.Parsed["managedCertificateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedCertificateName", input) } - return &id, nil + return nil } // ValidateManagedCertificateID checks that 'input' can be parsed as a Managed Certificate ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedenvironment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedenvironment.go index 52a50616de88..a803b6275e4a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedenvironment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedenvironment.go @@ -36,19 +36,9 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedEnvironmentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedEnvironmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ManagedEnvironmentId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) + if id.ManagedEnvironmentName, ok = input.Parsed["managedEnvironmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", input) } - return &id, nil + return nil } // ValidateManagedEnvironmentID checks that 'input' can be parsed as a Managed Environment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedenvironmentdetector.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedenvironmentdetector.go index b564dfc7b20b..c10cc4a440e5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedenvironmentdetector.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedenvironmentdetector.go @@ -38,23 +38,9 @@ func ParseManagedEnvironmentDetectorID(input string) (*ManagedEnvironmentDetecto return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedEnvironmentDetectorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) - } - - if id.DetectorName, ok = parsed.Parsed["detectorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "detectorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseManagedEnvironmentDetectorIDInsensitively(input string) (*ManagedEnvir return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedEnvironmentDetectorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ManagedEnvironmentDetectorId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) + if id.ManagedEnvironmentName, ok = input.Parsed["managedEnvironmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", input) } - if id.DetectorName, ok = parsed.Parsed["detectorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "detectorName", *parsed) + if id.DetectorName, ok = input.Parsed["detectorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "detectorName", input) } - return &id, nil + return nil } // ValidateManagedEnvironmentDetectorID checks that 'input' can be parsed as a Managed Environment Detector ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/id_managedenvironment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/id_managedenvironment.go index 04633e9d25ce..a5fb5cd82acc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/id_managedenvironment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/id_managedenvironment.go @@ -36,19 +36,9 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedEnvironmentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedEnvironmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ManagedEnvironmentId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) + if id.ManagedEnvironmentName, ok = input.Parsed["managedEnvironmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", input) } - return &id, nil + return nil } // ValidateManagedEnvironmentID checks that 'input' can be parsed as a Managed Environment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/id_storage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/id_storage.go index 6539b4853218..f66f3604baa7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/id_storage.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/id_storage.go @@ -38,23 +38,9 @@ func ParseStorageID(input string) (*StorageId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) - } - - if id.StorageName, ok = parsed.Parsed["storageName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseStorageIDInsensitively(input string) (*StorageId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *StorageId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedEnvironmentName, ok = parsed.Parsed["managedEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", *parsed) + if id.ManagedEnvironmentName, ok = input.Parsed["managedEnvironmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedEnvironmentName", input) } - if id.StorageName, ok = parsed.Parsed["storageName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageName", *parsed) + if id.StorageName, ok = input.Parsed["storageName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageName", input) } - return &id, nil + return nil } // ValidateStorageID checks that 'input' can be parsed as a Storage ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2023-05-01/containerinstance/id_container.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2023-05-01/containerinstance/id_container.go index c8ee393e72c1..a8806a88bb09 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2023-05-01/containerinstance/id_container.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2023-05-01/containerinstance/id_container.go @@ -38,23 +38,9 @@ func ParseContainerID(input string) (*ContainerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContainerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ContainerGroupName, ok = parsed.Parsed["containerGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerGroupName", *parsed) - } - - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContainerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ContainerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ContainerGroupName, ok = parsed.Parsed["containerGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerGroupName", *parsed) + if id.ContainerGroupName, ok = input.Parsed["containerGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "containerGroupName", input) } - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) + if id.ContainerName, ok = input.Parsed["containerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "containerName", input) } - return &id, nil + return nil } // ValidateContainerID checks that 'input' can be parsed as a Container ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2023-05-01/containerinstance/id_containergroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2023-05-01/containerinstance/id_containergroup.go index 86c13cf8f7c4..34310eedbca7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2023-05-01/containerinstance/id_containergroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2023-05-01/containerinstance/id_containergroup.go @@ -36,19 +36,9 @@ func ParseContainerGroupID(input string) (*ContainerGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContainerGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ContainerGroupName, ok = parsed.Parsed["containerGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseContainerGroupIDInsensitively(input string) (*ContainerGroupId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContainerGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ContainerGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ContainerGroupName, ok = parsed.Parsed["containerGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerGroupName", *parsed) + if id.ContainerGroupName, ok = input.Parsed["containerGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "containerGroupName", input) } - return &id, nil + return nil } // ValidateContainerGroupID checks that 'input' can be parsed as a Container Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2023-05-01/containerinstance/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2023-05-01/containerinstance/id_location.go index 93da8a732d92..f9c550d73b7d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2023-05-01/containerinstance/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2023-05-01/containerinstance/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/agentpools/id_agentpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/agentpools/id_agentpool.go index 98184247fa3e..228474891433 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/agentpools/id_agentpool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/agentpools/id_agentpool.go @@ -38,23 +38,9 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AgentPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) - } - - if id.AgentPoolName, ok = parsed.Parsed["agentPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "agentPoolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AgentPoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AgentPoolId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - if id.AgentPoolName, ok = parsed.Parsed["agentPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "agentPoolName", *parsed) + if id.AgentPoolName, ok = input.Parsed["agentPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "agentPoolName", input) } - return &id, nil + return nil } // ValidateAgentPoolID checks that 'input' can be parsed as a Agent Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/agentpools/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/agentpools/id_registry.go index 244780b7f17d..c64c075987b6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/agentpools/id_registry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/agentpools/id_registry.go @@ -36,19 +36,9 @@ func ParseRegistryID(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RegistryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - return &id, nil + return nil } // ValidateRegistryID checks that 'input' can be parsed as a Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/registries/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/registries/id_registry.go index e45e8501b3ff..ffeb4dae9198 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/registries/id_registry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/registries/id_registry.go @@ -36,19 +36,9 @@ func ParseRegistryID(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RegistryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - return &id, nil + return nil } // ValidateRegistryID checks that 'input' can be parsed as a Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/runs/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/runs/id_registry.go index 1606fb7d23ff..aed98c64bd43 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/runs/id_registry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/runs/id_registry.go @@ -36,19 +36,9 @@ func ParseRegistryID(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RegistryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - return &id, nil + return nil } // ValidateRegistryID checks that 'input' can be parsed as a Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/runs/id_run.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/runs/id_run.go index 025e84219c63..9479e3a3cb33 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/runs/id_run.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/runs/id_run.go @@ -38,23 +38,9 @@ func ParseRunID(input string) (*RunId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RunId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) - } - - if id.RunId, ok = parsed.Parsed["runId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRunIDInsensitively(input string) (*RunId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RunId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RunId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - if id.RunId, ok = parsed.Parsed["runId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runId", *parsed) + if id.RunId, ok = input.Parsed["runId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "runId", input) } - return &id, nil + return nil } // ValidateRunID checks that 'input' can be parsed as a Run ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/taskruns/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/taskruns/id_registry.go index 81c676662b80..be014a38a3ec 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/taskruns/id_registry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/taskruns/id_registry.go @@ -36,19 +36,9 @@ func ParseRegistryID(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RegistryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - return &id, nil + return nil } // ValidateRegistryID checks that 'input' can be parsed as a Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/taskruns/id_taskrun.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/taskruns/id_taskrun.go index 89afd32bb5e7..da73f72513b1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/taskruns/id_taskrun.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/taskruns/id_taskrun.go @@ -38,23 +38,9 @@ func ParseTaskRunID(input string) (*TaskRunId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TaskRunId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) - } - - if id.TaskRunName, ok = parsed.Parsed["taskRunName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "taskRunName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTaskRunIDInsensitively(input string) (*TaskRunId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TaskRunId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TaskRunId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - if id.TaskRunName, ok = parsed.Parsed["taskRunName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "taskRunName", *parsed) + if id.TaskRunName, ok = input.Parsed["taskRunName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "taskRunName", input) } - return &id, nil + return nil } // ValidateTaskRunID checks that 'input' can be parsed as a Task Run ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/tasks/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/tasks/id_registry.go index b956c09e9912..c5e4bc0b4973 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/tasks/id_registry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/tasks/id_registry.go @@ -36,19 +36,9 @@ func ParseRegistryID(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RegistryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - return &id, nil + return nil } // ValidateRegistryID checks that 'input' can be parsed as a Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/tasks/id_task.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/tasks/id_task.go index 2c905a519262..eb0a7f4d3efc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/tasks/id_task.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/tasks/id_task.go @@ -38,23 +38,9 @@ func ParseTaskID(input string) (*TaskId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TaskId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) - } - - if id.TaskName, ok = parsed.Parsed["taskName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "taskName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TaskId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TaskId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - if id.TaskName, ok = parsed.Parsed["taskName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "taskName", *parsed) + if id.TaskName, ok = input.Parsed["taskName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "taskName", input) } - return &id, nil + return nil } // ValidateTaskID checks that 'input' can be parsed as a Task ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_connectedregistry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_connectedregistry.go index 198aa0220fee..c4f2eb52f2af 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_connectedregistry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_connectedregistry.go @@ -38,23 +38,9 @@ func ParseConnectedRegistryID(input string) (*ConnectedRegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectedRegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) - } - - if id.ConnectedRegistryName, ok = parsed.Parsed["connectedRegistryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectedRegistryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseConnectedRegistryIDInsensitively(input string) (*ConnectedRegistryId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectedRegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConnectedRegistryId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - if id.ConnectedRegistryName, ok = parsed.Parsed["connectedRegistryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectedRegistryName", *parsed) + if id.ConnectedRegistryName, ok = input.Parsed["connectedRegistryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "connectedRegistryName", input) } - return &id, nil + return nil } // ValidateConnectedRegistryID checks that 'input' can be parsed as a Connected Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_registry.go index 9216a770edff..1ce00ecc55eb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_registry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_registry.go @@ -36,19 +36,9 @@ func ParseRegistryID(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RegistryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - return &id, nil + return nil } // ValidateRegistryID checks that 'input' can be parsed as a Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_exportpipeline.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_exportpipeline.go index 9ba9002dc0a4..881454df5e52 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_exportpipeline.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_exportpipeline.go @@ -38,23 +38,9 @@ func ParseExportPipelineID(input string) (*ExportPipelineId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExportPipelineId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) - } - - if id.ExportPipelineName, ok = parsed.Parsed["exportPipelineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "exportPipelineName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseExportPipelineIDInsensitively(input string) (*ExportPipelineId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExportPipelineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ExportPipelineId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - if id.ExportPipelineName, ok = parsed.Parsed["exportPipelineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "exportPipelineName", *parsed) + if id.ExportPipelineName, ok = input.Parsed["exportPipelineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "exportPipelineName", input) } - return &id, nil + return nil } // ValidateExportPipelineID checks that 'input' can be parsed as a Export Pipeline ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_registry.go index 414d1596ae5b..056b44b557b1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_registry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_registry.go @@ -36,19 +36,9 @@ func ParseRegistryID(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RegistryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - return &id, nil + return nil } // ValidateRegistryID checks that 'input' can be parsed as a Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_importpipeline.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_importpipeline.go index 8485d497098c..52ae73663ab5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_importpipeline.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_importpipeline.go @@ -38,23 +38,9 @@ func ParseImportPipelineID(input string) (*ImportPipelineId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ImportPipelineId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) - } - - if id.ImportPipelineName, ok = parsed.Parsed["importPipelineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "importPipelineName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseImportPipelineIDInsensitively(input string) (*ImportPipelineId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ImportPipelineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ImportPipelineId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - if id.ImportPipelineName, ok = parsed.Parsed["importPipelineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "importPipelineName", *parsed) + if id.ImportPipelineName, ok = input.Parsed["importPipelineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "importPipelineName", input) } - return &id, nil + return nil } // ValidateImportPipelineID checks that 'input' can be parsed as a Import Pipeline ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_registry.go index 92b0968b327d..a4a12be164f1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_registry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_registry.go @@ -36,19 +36,9 @@ func ParseRegistryID(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RegistryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - return &id, nil + return nil } // ValidateRegistryID checks that 'input' can be parsed as a Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_pipelinerun.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_pipelinerun.go index 01ad98f15272..08b96320955a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_pipelinerun.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_pipelinerun.go @@ -38,23 +38,9 @@ func ParsePipelineRunID(input string) (*PipelineRunId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PipelineRunId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) - } - - if id.PipelineRunName, ok = parsed.Parsed["pipelineRunName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "pipelineRunName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePipelineRunIDInsensitively(input string) (*PipelineRunId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PipelineRunId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PipelineRunId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - if id.PipelineRunName, ok = parsed.Parsed["pipelineRunName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "pipelineRunName", *parsed) + if id.PipelineRunName, ok = input.Parsed["pipelineRunName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "pipelineRunName", input) } - return &id, nil + return nil } // ValidatePipelineRunID checks that 'input' can be parsed as a Pipeline Run ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_registry.go index e3788f768ec3..3d6572ed1d89 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_registry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_registry.go @@ -36,19 +36,9 @@ func ParseRegistryID(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RegistryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - return &id, nil + return nil } // ValidateRegistryID checks that 'input' can be parsed as a Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_privateendpointconnection.go index cfcb50d14bec..7eb8592cfaef 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_privateendpointconnection.go @@ -38,23 +38,9 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", input) } - return &id, nil + return nil } // ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_registry.go index 1adc54deebd6..eb409b4bd6a0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_registry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_registry.go @@ -36,19 +36,9 @@ func ParseRegistryID(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RegistryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - return &id, nil + return nil } // ValidateRegistryID checks that 'input' can be parsed as a Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/id_registry.go index e45e8501b3ff..ffeb4dae9198 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/id_registry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries/id_registry.go @@ -36,19 +36,9 @@ func ParseRegistryID(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RegistryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - return &id, nil + return nil } // ValidateRegistryID checks that 'input' can be parsed as a Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/id_registry.go index 457ec9c52f5b..cbb00da8695b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/id_registry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/id_registry.go @@ -36,19 +36,9 @@ func ParseRegistryID(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RegistryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - return &id, nil + return nil } // ValidateRegistryID checks that 'input' can be parsed as a Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/id_replication.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/id_replication.go index 6402b1649eda..7f51f17366a4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/id_replication.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications/id_replication.go @@ -38,23 +38,9 @@ func ParseReplicationID(input string) (*ReplicationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) - } - - if id.ReplicationName, ok = parsed.Parsed["replicationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseReplicationIDInsensitively(input string) (*ReplicationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ReplicationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - if id.ReplicationName, ok = parsed.Parsed["replicationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationName", *parsed) + if id.ReplicationName, ok = input.Parsed["replicationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationName", input) } - return &id, nil + return nil } // ValidateReplicationID checks that 'input' can be parsed as a Replication ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_registry.go index 1967fbf250a4..8169983df550 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_registry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_registry.go @@ -36,19 +36,9 @@ func ParseRegistryID(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RegistryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - return &id, nil + return nil } // ValidateRegistryID checks that 'input' can be parsed as a Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_scopemap.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_scopemap.go index 1286cbbb29e9..932f5b82fae3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_scopemap.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_scopemap.go @@ -38,23 +38,9 @@ func ParseScopeMapID(input string) (*ScopeMapId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopeMapId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) - } - - if id.ScopeMapName, ok = parsed.Parsed["scopeMapName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scopeMapName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseScopeMapIDInsensitively(input string) (*ScopeMapId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopeMapId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ScopeMapId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - if id.ScopeMapName, ok = parsed.Parsed["scopeMapName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scopeMapName", *parsed) + if id.ScopeMapName, ok = input.Parsed["scopeMapName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scopeMapName", input) } - return &id, nil + return nil } // ValidateScopeMapID checks that 'input' can be parsed as a Scope Map ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/id_registry.go index 4c7ee22e373c..fd7beda105e9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/id_registry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/id_registry.go @@ -36,19 +36,9 @@ func ParseRegistryID(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RegistryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - return &id, nil + return nil } // ValidateRegistryID checks that 'input' can be parsed as a Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/id_token.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/id_token.go index 6d8c7149e6c8..d9b9677eef95 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/id_token.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens/id_token.go @@ -38,23 +38,9 @@ func ParseTokenID(input string) (*TokenId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TokenId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) - } - - if id.TokenName, ok = parsed.Parsed["tokenName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tokenName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTokenIDInsensitively(input string) (*TokenId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TokenId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TokenId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - if id.TokenName, ok = parsed.Parsed["tokenName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tokenName", *parsed) + if id.TokenName, ok = input.Parsed["tokenName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "tokenName", input) } - return &id, nil + return nil } // ValidateTokenID checks that 'input' can be parsed as a Token ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_registry.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_registry.go index 6a0695fe81df..c57285a575e0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_registry.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_registry.go @@ -36,19 +36,9 @@ func ParseRegistryID(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegistryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RegistryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - return &id, nil + return nil } // ValidateRegistryID checks that 'input' can be parsed as a Registry ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_webhook.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_webhook.go index 9764cd18a8c2..eca5ddc35ce7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_webhook.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_webhook.go @@ -38,23 +38,9 @@ func ParseWebHookID(input string) (*WebHookId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WebHookId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) - } - - if id.WebHookName, ok = parsed.Parsed["webHookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webHookName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseWebHookIDInsensitively(input string) (*WebHookId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WebHookId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *WebHookId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RegistryName, ok = parsed.Parsed["registryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registryName", *parsed) + if id.RegistryName, ok = input.Parsed["registryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registryName", input) } - if id.WebHookName, ok = parsed.Parsed["webHookName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webHookName", *parsed) + if id.WebHookName, ok = input.Parsed["webHookName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "webHookName", input) } - return &id, nil + return nil } // ValidateWebHookID checks that 'input' can be parsed as a Web Hook ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2019-08-01/containerservices/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2019-08-01/containerservices/id_location.go index 9a6721b79f8e..3e5869114105 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2019-08-01/containerservices/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2019-08-01/containerservices/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/agentpools/id_agentpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/agentpools/id_agentpool.go index 1f64140362bc..1f73b8efc509 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/agentpools/id_agentpool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/agentpools/id_agentpool.go @@ -38,23 +38,9 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AgentPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) - } - - if id.AgentPoolName, ok = parsed.Parsed["agentPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "agentPoolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AgentPoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AgentPoolId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - if id.AgentPoolName, ok = parsed.Parsed["agentPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "agentPoolName", *parsed) + if id.AgentPoolName, ok = input.Parsed["agentPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "agentPoolName", input) } - return &id, nil + return nil } // ValidateAgentPoolID checks that 'input' can be parsed as a Agent Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/fleetmembers/id_fleet.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/fleetmembers/id_fleet.go index e7133b4c9e86..cdea5cf32fc1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/fleetmembers/id_fleet.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/fleetmembers/id_fleet.go @@ -36,19 +36,9 @@ func ParseFleetID(input string) (*FleetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FleetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FleetName, ok = parsed.Parsed["fleetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fleetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFleetIDInsensitively(input string) (*FleetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FleetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FleetId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FleetName, ok = parsed.Parsed["fleetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fleetName", *parsed) + if id.FleetName, ok = input.Parsed["fleetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "fleetName", input) } - return &id, nil + return nil } // ValidateFleetID checks that 'input' can be parsed as a Fleet ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/fleetmembers/id_member.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/fleetmembers/id_member.go index 32f25a7891ce..a344d3e65595 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/fleetmembers/id_member.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/fleetmembers/id_member.go @@ -38,23 +38,9 @@ func ParseMemberID(input string) (*MemberId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MemberId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FleetName, ok = parsed.Parsed["fleetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fleetName", *parsed) - } - - if id.MemberName, ok = parsed.Parsed["memberName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "memberName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseMemberIDInsensitively(input string) (*MemberId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MemberId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MemberId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FleetName, ok = parsed.Parsed["fleetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fleetName", *parsed) + if id.FleetName, ok = input.Parsed["fleetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "fleetName", input) } - if id.MemberName, ok = parsed.Parsed["memberName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "memberName", *parsed) + if id.MemberName, ok = input.Parsed["memberName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "memberName", input) } - return &id, nil + return nil } // ValidateMemberID checks that 'input' can be parsed as a Member ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/fleets/id_fleet.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/fleets/id_fleet.go index 4e1772089488..d7d7a775d3e3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/fleets/id_fleet.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/fleets/id_fleet.go @@ -36,19 +36,9 @@ func ParseFleetID(input string) (*FleetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FleetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FleetName, ok = parsed.Parsed["fleetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fleetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFleetIDInsensitively(input string) (*FleetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FleetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FleetId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FleetName, ok = parsed.Parsed["fleetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fleetName", *parsed) + if id.FleetName, ok = input.Parsed["fleetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "fleetName", input) } - return &id, nil + return nil } // ValidateFleetID checks that 'input' can be parsed as a Fleet ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go index 90a03b719469..c660a4ef60c1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go @@ -38,23 +38,9 @@ func ParseMaintenanceConfigurationID(input string) (*MaintenanceConfigurationId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MaintenanceConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) - } - - if id.MaintenanceConfigurationName, ok = parsed.Parsed["maintenanceConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "maintenanceConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseMaintenanceConfigurationIDInsensitively(input string) (*MaintenanceCon return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MaintenanceConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MaintenanceConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - if id.MaintenanceConfigurationName, ok = parsed.Parsed["maintenanceConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "maintenanceConfigurationName", *parsed) + if id.MaintenanceConfigurationName, ok = input.Parsed["maintenanceConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "maintenanceConfigurationName", input) } - return &id, nil + return nil } // ValidateMaintenanceConfigurationID checks that 'input' can be parsed as a Maintenance Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/managedclusters/id_accessprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/managedclusters/id_accessprofile.go index 5da6342fca3f..e838fda20b8b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/managedclusters/id_accessprofile.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/managedclusters/id_accessprofile.go @@ -38,23 +38,9 @@ func ParseAccessProfileID(input string) (*AccessProfileId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessProfileId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) - } - - if id.AccessProfileName, ok = parsed.Parsed["accessProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessProfileName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAccessProfileIDInsensitively(input string) (*AccessProfileId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessProfileId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AccessProfileId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - if id.AccessProfileName, ok = parsed.Parsed["accessProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessProfileName", *parsed) + if id.AccessProfileName, ok = input.Parsed["accessProfileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accessProfileName", input) } - return &id, nil + return nil } // ValidateAccessProfileID checks that 'input' can be parsed as a Access Profile ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/managedclusters/id_commandresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/managedclusters/id_commandresult.go index 16be91bbdfdf..db8b9ca40da5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/managedclusters/id_commandresult.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/managedclusters/id_commandresult.go @@ -38,23 +38,9 @@ func ParseCommandResultID(input string) (*CommandResultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CommandResultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) - } - - if id.CommandId, ok = parsed.Parsed["commandId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "commandId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCommandResultIDInsensitively(input string) (*CommandResultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CommandResultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CommandResultId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - if id.CommandId, ok = parsed.Parsed["commandId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "commandId", *parsed) + if id.CommandId, ok = input.Parsed["commandId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "commandId", input) } - return &id, nil + return nil } // ValidateCommandResultID checks that 'input' can be parsed as a Command Result ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/managedclusters/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/managedclusters/id_location.go index e9153531da7c..8af29300251e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/managedclusters/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/managedclusters/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/managedclustersnapshots/id_managedclustersnapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/managedclustersnapshots/id_managedclustersnapshot.go index 56aae183e0d9..e07637662944 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/managedclustersnapshots/id_managedclustersnapshot.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/managedclustersnapshots/id_managedclustersnapshot.go @@ -36,19 +36,9 @@ func ParseManagedClusterSnapshotID(input string) (*ManagedClusterSnapshotId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedClusterSnapshotId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterSnapshotName, ok = parsed.Parsed["managedClusterSnapshotName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterSnapshotName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseManagedClusterSnapshotIDInsensitively(input string) (*ManagedClusterSn return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedClusterSnapshotId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ManagedClusterSnapshotId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterSnapshotName, ok = parsed.Parsed["managedClusterSnapshotName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterSnapshotName", *parsed) + if id.ManagedClusterSnapshotName, ok = input.Parsed["managedClusterSnapshotName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterSnapshotName", input) } - return &id, nil + return nil } // ValidateManagedClusterSnapshotID checks that 'input' can be parsed as a Managed Cluster Snapshot ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/privateendpointconnections/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/privateendpointconnections/id_privateendpointconnection.go index 7957d5c208c3..1d0e3202ace0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/privateendpointconnections/id_privateendpointconnection.go @@ -38,23 +38,9 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", input) } - return &id, nil + return nil } // ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/snapshots/id_snapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/snapshots/id_snapshot.go index eee9219c9606..7e6f2b197537 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/snapshots/id_snapshot.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/snapshots/id_snapshot.go @@ -36,19 +36,9 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SnapshotId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SnapshotName, ok = parsed.Parsed["snapshotName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "snapshotName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SnapshotId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SnapshotId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SnapshotName, ok = parsed.Parsed["snapshotName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "snapshotName", *parsed) + if id.SnapshotName, ok = input.Parsed["snapshotName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "snapshotName", input) } - return &id, nil + return nil } // ValidateSnapshotID checks that 'input' can be parsed as a Snapshot ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/trustedaccess/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/trustedaccess/id_location.go index 792145d00c9a..23c1dd4cbeef 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/trustedaccess/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/trustedaccess/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/trustedaccess/id_trustedaccessrolebinding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/trustedaccess/id_trustedaccessrolebinding.go index e04f903658fd..2ab0bd8e0d46 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/trustedaccess/id_trustedaccessrolebinding.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2022-09-02-preview/trustedaccess/id_trustedaccessrolebinding.go @@ -38,23 +38,9 @@ func ParseTrustedAccessRoleBindingID(input string) (*TrustedAccessRoleBindingId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TrustedAccessRoleBindingId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) - } - - if id.TrustedAccessRoleBindingName, ok = parsed.Parsed["trustedAccessRoleBindingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trustedAccessRoleBindingName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTrustedAccessRoleBindingIDInsensitively(input string) (*TrustedAccessR return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TrustedAccessRoleBindingId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TrustedAccessRoleBindingId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - if id.TrustedAccessRoleBindingName, ok = parsed.Parsed["trustedAccessRoleBindingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trustedAccessRoleBindingName", *parsed) + if id.TrustedAccessRoleBindingName, ok = input.Parsed["trustedAccessRoleBindingName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "trustedAccessRoleBindingName", input) } - return &id, nil + return nil } // ValidateTrustedAccessRoleBindingID checks that 'input' can be parsed as a Trusted Access Role Binding ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/agentpools/id_agentpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/agentpools/id_agentpool.go index 1f64140362bc..1f73b8efc509 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/agentpools/id_agentpool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/agentpools/id_agentpool.go @@ -38,23 +38,9 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AgentPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) - } - - if id.AgentPoolName, ok = parsed.Parsed["agentPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "agentPoolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AgentPoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AgentPoolId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - if id.AgentPoolName, ok = parsed.Parsed["agentPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "agentPoolName", *parsed) + if id.AgentPoolName, ok = input.Parsed["agentPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "agentPoolName", input) } - return &id, nil + return nil } // ValidateAgentPoolID checks that 'input' can be parsed as a Agent Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go index 90a03b719469..c660a4ef60c1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go @@ -38,23 +38,9 @@ func ParseMaintenanceConfigurationID(input string) (*MaintenanceConfigurationId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MaintenanceConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) - } - - if id.MaintenanceConfigurationName, ok = parsed.Parsed["maintenanceConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "maintenanceConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseMaintenanceConfigurationIDInsensitively(input string) (*MaintenanceCon return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MaintenanceConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MaintenanceConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - if id.MaintenanceConfigurationName, ok = parsed.Parsed["maintenanceConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "maintenanceConfigurationName", *parsed) + if id.MaintenanceConfigurationName, ok = input.Parsed["maintenanceConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "maintenanceConfigurationName", input) } - return &id, nil + return nil } // ValidateMaintenanceConfigurationID checks that 'input' can be parsed as a Maintenance Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_accessprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_accessprofile.go index 5da6342fca3f..e838fda20b8b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_accessprofile.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_accessprofile.go @@ -38,23 +38,9 @@ func ParseAccessProfileID(input string) (*AccessProfileId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessProfileId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) - } - - if id.AccessProfileName, ok = parsed.Parsed["accessProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessProfileName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAccessProfileIDInsensitively(input string) (*AccessProfileId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessProfileId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AccessProfileId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - if id.AccessProfileName, ok = parsed.Parsed["accessProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessProfileName", *parsed) + if id.AccessProfileName, ok = input.Parsed["accessProfileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accessProfileName", input) } - return &id, nil + return nil } // ValidateAccessProfileID checks that 'input' can be parsed as a Access Profile ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_commandresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_commandresult.go index 16be91bbdfdf..db8b9ca40da5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_commandresult.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_commandresult.go @@ -38,23 +38,9 @@ func ParseCommandResultID(input string) (*CommandResultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CommandResultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) - } - - if id.CommandId, ok = parsed.Parsed["commandId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "commandId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCommandResultIDInsensitively(input string) (*CommandResultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CommandResultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CommandResultId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - if id.CommandId, ok = parsed.Parsed["commandId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "commandId", *parsed) + if id.CommandId, ok = input.Parsed["commandId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "commandId", input) } - return &id, nil + return nil } // ValidateCommandResultID checks that 'input' can be parsed as a Command Result ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_location.go index e9153531da7c..8af29300251e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/id_managedclustersnapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/id_managedclustersnapshot.go index 56aae183e0d9..e07637662944 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/id_managedclustersnapshot.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/id_managedclustersnapshot.go @@ -36,19 +36,9 @@ func ParseManagedClusterSnapshotID(input string) (*ManagedClusterSnapshotId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedClusterSnapshotId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterSnapshotName, ok = parsed.Parsed["managedClusterSnapshotName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterSnapshotName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseManagedClusterSnapshotIDInsensitively(input string) (*ManagedClusterSn return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedClusterSnapshotId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ManagedClusterSnapshotId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterSnapshotName, ok = parsed.Parsed["managedClusterSnapshotName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterSnapshotName", *parsed) + if id.ManagedClusterSnapshotName, ok = input.Parsed["managedClusterSnapshotName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterSnapshotName", input) } - return &id, nil + return nil } // ValidateManagedClusterSnapshotID checks that 'input' can be parsed as a Managed Cluster Snapshot ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/id_privateendpointconnection.go index 7957d5c208c3..1d0e3202ace0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/id_privateendpointconnection.go @@ -38,23 +38,9 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", input) } - return &id, nil + return nil } // ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/snapshots/id_snapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/snapshots/id_snapshot.go index eee9219c9606..7e6f2b197537 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/snapshots/id_snapshot.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/snapshots/id_snapshot.go @@ -36,19 +36,9 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SnapshotId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SnapshotName, ok = parsed.Parsed["snapshotName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "snapshotName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SnapshotId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SnapshotId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SnapshotName, ok = parsed.Parsed["snapshotName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "snapshotName", *parsed) + if id.SnapshotName, ok = input.Parsed["snapshotName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "snapshotName", input) } - return &id, nil + return nil } // ValidateSnapshotID checks that 'input' can be parsed as a Snapshot ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/trustedaccess/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/trustedaccess/id_location.go index 792145d00c9a..23c1dd4cbeef 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/trustedaccess/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/trustedaccess/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/trustedaccess/id_trustedaccessrolebinding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/trustedaccess/id_trustedaccessrolebinding.go index e04f903658fd..2ab0bd8e0d46 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/trustedaccess/id_trustedaccessrolebinding.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/trustedaccess/id_trustedaccessrolebinding.go @@ -38,23 +38,9 @@ func ParseTrustedAccessRoleBindingID(input string) (*TrustedAccessRoleBindingId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TrustedAccessRoleBindingId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) - } - - if id.TrustedAccessRoleBindingName, ok = parsed.Parsed["trustedAccessRoleBindingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trustedAccessRoleBindingName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTrustedAccessRoleBindingIDInsensitively(input string) (*TrustedAccessR return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TrustedAccessRoleBindingId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TrustedAccessRoleBindingId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - if id.TrustedAccessRoleBindingName, ok = parsed.Parsed["trustedAccessRoleBindingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trustedAccessRoleBindingName", *parsed) + if id.TrustedAccessRoleBindingName, ok = input.Parsed["trustedAccessRoleBindingName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "trustedAccessRoleBindingName", input) } - return &id, nil + return nil } // ValidateTrustedAccessRoleBindingID checks that 'input' can be parsed as a Trusted Access Role Binding ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/agentpools/id_agentpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/agentpools/id_agentpool.go index 1f64140362bc..1f73b8efc509 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/agentpools/id_agentpool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/agentpools/id_agentpool.go @@ -38,23 +38,9 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AgentPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) - } - - if id.AgentPoolName, ok = parsed.Parsed["agentPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "agentPoolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AgentPoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AgentPoolId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - if id.AgentPoolName, ok = parsed.Parsed["agentPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "agentPoolName", *parsed) + if id.AgentPoolName, ok = input.Parsed["agentPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "agentPoolName", input) } - return &id, nil + return nil } // ValidateAgentPoolID checks that 'input' can be parsed as a Agent Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go index 90a03b719469..c660a4ef60c1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go @@ -38,23 +38,9 @@ func ParseMaintenanceConfigurationID(input string) (*MaintenanceConfigurationId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MaintenanceConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) - } - - if id.MaintenanceConfigurationName, ok = parsed.Parsed["maintenanceConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "maintenanceConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseMaintenanceConfigurationIDInsensitively(input string) (*MaintenanceCon return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MaintenanceConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MaintenanceConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - if id.MaintenanceConfigurationName, ok = parsed.Parsed["maintenanceConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "maintenanceConfigurationName", *parsed) + if id.MaintenanceConfigurationName, ok = input.Parsed["maintenanceConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "maintenanceConfigurationName", input) } - return &id, nil + return nil } // ValidateMaintenanceConfigurationID checks that 'input' can be parsed as a Maintenance Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/managedclusters/id_accessprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/managedclusters/id_accessprofile.go index 5da6342fca3f..e838fda20b8b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/managedclusters/id_accessprofile.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/managedclusters/id_accessprofile.go @@ -38,23 +38,9 @@ func ParseAccessProfileID(input string) (*AccessProfileId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessProfileId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) - } - - if id.AccessProfileName, ok = parsed.Parsed["accessProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessProfileName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAccessProfileIDInsensitively(input string) (*AccessProfileId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessProfileId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AccessProfileId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - if id.AccessProfileName, ok = parsed.Parsed["accessProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessProfileName", *parsed) + if id.AccessProfileName, ok = input.Parsed["accessProfileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accessProfileName", input) } - return &id, nil + return nil } // ValidateAccessProfileID checks that 'input' can be parsed as a Access Profile ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/managedclusters/id_commandresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/managedclusters/id_commandresult.go index 16be91bbdfdf..db8b9ca40da5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/managedclusters/id_commandresult.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/managedclusters/id_commandresult.go @@ -38,23 +38,9 @@ func ParseCommandResultID(input string) (*CommandResultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CommandResultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) - } - - if id.CommandId, ok = parsed.Parsed["commandId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "commandId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCommandResultIDInsensitively(input string) (*CommandResultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CommandResultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CommandResultId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - if id.CommandId, ok = parsed.Parsed["commandId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "commandId", *parsed) + if id.CommandId, ok = input.Parsed["commandId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "commandId", input) } - return &id, nil + return nil } // ValidateCommandResultID checks that 'input' can be parsed as a Command Result ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/managedclusters/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/managedclusters/id_location.go index e9153531da7c..8af29300251e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/managedclusters/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/managedclusters/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/snapshots/id_snapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/snapshots/id_snapshot.go index eee9219c9606..7e6f2b197537 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/snapshots/id_snapshot.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/snapshots/id_snapshot.go @@ -36,19 +36,9 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SnapshotId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SnapshotName, ok = parsed.Parsed["snapshotName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "snapshotName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SnapshotId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SnapshotId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SnapshotName, ok = parsed.Parsed["snapshotName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "snapshotName", *parsed) + if id.SnapshotName, ok = input.Parsed["snapshotName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "snapshotName", input) } - return &id, nil + return nil } // ValidateSnapshotID checks that 'input' can be parsed as a Snapshot ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_cassandrakeyspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_cassandrakeyspace.go index 9555cbf46b10..c0948748c2dc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_cassandrakeyspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_cassandrakeyspace.go @@ -38,23 +38,9 @@ func ParseCassandraKeyspaceID(input string) (*CassandraKeyspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CassandraKeyspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.CassandraKeyspaceName, ok = parsed.Parsed["cassandraKeyspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cassandraKeyspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCassandraKeyspaceIDInsensitively(input string) (*CassandraKeyspaceId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CassandraKeyspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CassandraKeyspaceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.CassandraKeyspaceName, ok = parsed.Parsed["cassandraKeyspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cassandraKeyspaceName", *parsed) + if id.CassandraKeyspaceName, ok = input.Parsed["cassandraKeyspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cassandraKeyspaceName", input) } - return &id, nil + return nil } // ValidateCassandraKeyspaceID checks that 'input' can be parsed as a Cassandra Keyspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_cassandrakeyspacetable.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_cassandrakeyspacetable.go index 66b3ea506a45..0e9b31b7d489 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_cassandrakeyspacetable.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_cassandrakeyspacetable.go @@ -40,27 +40,9 @@ func ParseCassandraKeyspaceTableID(input string) (*CassandraKeyspaceTableId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CassandraKeyspaceTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.CassandraKeyspaceName, ok = parsed.Parsed["cassandraKeyspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cassandraKeyspaceName", *parsed) - } - - if id.TableName, ok = parsed.Parsed["tableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tableName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseCassandraKeyspaceTableIDInsensitively(input string) (*CassandraKeyspac return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CassandraKeyspaceTableId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *CassandraKeyspaceTableId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.CassandraKeyspaceName, ok = parsed.Parsed["cassandraKeyspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cassandraKeyspaceName", *parsed) + if id.CassandraKeyspaceName, ok = input.Parsed["cassandraKeyspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cassandraKeyspaceName", input) } - if id.TableName, ok = parsed.Parsed["tableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tableName", *parsed) + if id.TableName, ok = input.Parsed["tableName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "tableName", input) } - return &id, nil + return nil } // ValidateCassandraKeyspaceTableID checks that 'input' can be parsed as a Cassandra Keyspace Table ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_collection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_collection.go index a7e01b980150..06ba5f2c3823 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_collection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_collection.go @@ -40,27 +40,9 @@ func ParseCollectionID(input string) (*CollectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CollectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) - } - - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseCollectionIDInsensitively(input string) (*CollectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CollectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *CollectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) + if id.CollectionName, ok = input.Parsed["collectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "collectionName", input) } - return &id, nil + return nil } // ValidateCollectionID checks that 'input' can be parsed as a Collection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_collectionpartitionkeyrangeid.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_collectionpartitionkeyrangeid.go index 5819216ab8d6..af2697450ff5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_collectionpartitionkeyrangeid.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_collectionpartitionkeyrangeid.go @@ -44,35 +44,9 @@ func ParseCollectionPartitionKeyRangeIdID(input string) (*CollectionPartitionKey return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CollectionPartitionKeyRangeIdId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.RegionName, ok = parsed.Parsed["regionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "regionName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) - } - - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) - } - - if id.PartitionKeyRangeId, ok = parsed.Parsed["partitionKeyRangeId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partitionKeyRangeId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -87,38 +61,46 @@ func ParseCollectionPartitionKeyRangeIdIDInsensitively(input string) (*Collectio return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CollectionPartitionKeyRangeIdId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *CollectionPartitionKeyRangeIdId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.RegionName, ok = parsed.Parsed["regionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "regionName", *parsed) + if id.RegionName, ok = input.Parsed["regionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "regionName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) + if id.CollectionName, ok = input.Parsed["collectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "collectionName", input) } - if id.PartitionKeyRangeId, ok = parsed.Parsed["partitionKeyRangeId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partitionKeyRangeId", *parsed) + if id.PartitionKeyRangeId, ok = input.Parsed["partitionKeyRangeId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "partitionKeyRangeId", input) } - return &id, nil + return nil } // ValidateCollectionPartitionKeyRangeIdID checks that 'input' can be parsed as a Collection Partition Key Range Id ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_container.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_container.go index 7a27bedb7080..325844c7b0fa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_container.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_container.go @@ -40,27 +40,9 @@ func ParseContainerID(input string) (*ContainerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContainerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) - } - - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContainerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ContainerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) + if id.SqlDatabaseName, ok = input.Parsed["sqlDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", input) } - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) + if id.ContainerName, ok = input.Parsed["containerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "containerName", input) } - return &id, nil + return nil } // ValidateContainerID checks that 'input' can be parsed as a Container ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_database.go index 06541d6f6c6c..c52995f2bc9b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_database.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_database.go @@ -38,23 +38,9 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool 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 = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - return &id, nil + return nil } // ValidateDatabaseID checks that 'input' can be parsed as a Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databaseaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databaseaccount.go index 0e56a8d66f54..425f2c9b5aee 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databaseaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databaseaccount.go @@ -36,19 +36,9 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DatabaseAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - return &id, nil + return nil } // ValidateDatabaseAccountID checks that 'input' can be parsed as a Database Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databaseaccountname.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databaseaccountname.go index 1ad2a926aa2d..a2757f563031 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databaseaccountname.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databaseaccountname.go @@ -32,11 +32,9 @@ func ParseDatabaseAccountNameID(input string) (*DatabaseAccountNameId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseAccountNameId{} - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseDatabaseAccountNameIDInsensitively(input string) (*DatabaseAccountName return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseAccountNameId{} - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *DatabaseAccountNameId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) + } + + return nil +} + // ValidateDatabaseAccountNameID checks that 'input' can be parsed as a Database Account Name ID func ValidateDatabaseAccountNameID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databasecollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databasecollection.go index ae75117d04e2..82742bb4c959 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databasecollection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databasecollection.go @@ -42,31 +42,9 @@ func ParseDatabaseCollectionID(input string) (*DatabaseCollectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseCollectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.RegionName, ok = parsed.Parsed["regionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "regionName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) - } - - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseDatabaseCollectionIDInsensitively(input string) (*DatabaseCollectionId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseCollectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DatabaseCollectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.RegionName, ok = parsed.Parsed["regionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "regionName", *parsed) + if id.RegionName, ok = input.Parsed["regionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "regionName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) + if id.CollectionName, ok = input.Parsed["collectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "collectionName", input) } - return &id, nil + return nil } // ValidateDatabaseCollectionID checks that 'input' can be parsed as a Database Collection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_graph.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_graph.go index 990cf689b19a..87414bff4e5a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_graph.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_graph.go @@ -40,27 +40,9 @@ func ParseGraphID(input string) (*GraphId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GraphId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.GremlinDatabaseName, ok = parsed.Parsed["gremlinDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gremlinDatabaseName", *parsed) - } - - if id.GraphName, ok = parsed.Parsed["graphName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "graphName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseGraphIDInsensitively(input string) (*GraphId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GraphId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *GraphId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.GremlinDatabaseName, ok = parsed.Parsed["gremlinDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gremlinDatabaseName", *parsed) + if id.GremlinDatabaseName, ok = input.Parsed["gremlinDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "gremlinDatabaseName", input) } - if id.GraphName, ok = parsed.Parsed["graphName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "graphName", *parsed) + if id.GraphName, ok = input.Parsed["graphName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "graphName", input) } - return &id, nil + return nil } // ValidateGraphID checks that 'input' can be parsed as a Graph ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_gremlindatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_gremlindatabase.go index 20095da53b2a..62c750d65cee 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_gremlindatabase.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_gremlindatabase.go @@ -38,23 +38,9 @@ func ParseGremlinDatabaseID(input string) (*GremlinDatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GremlinDatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.GremlinDatabaseName, ok = parsed.Parsed["gremlinDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gremlinDatabaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseGremlinDatabaseIDInsensitively(input string) (*GremlinDatabaseId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GremlinDatabaseId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *GremlinDatabaseId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.GremlinDatabaseName, ok = parsed.Parsed["gremlinDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gremlinDatabaseName", *parsed) + if id.GremlinDatabaseName, ok = input.Parsed["gremlinDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "gremlinDatabaseName", input) } - return &id, nil + return nil } // ValidateGremlinDatabaseID checks that 'input' can be parsed as a Gremlin Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_location.go index bc6bbfc9d1d9..2955e6dd5436 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_mongodbdatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_mongodbdatabase.go index 245c181e3101..f156cc1f4631 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_mongodbdatabase.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_mongodbdatabase.go @@ -38,23 +38,9 @@ func ParseMongodbDatabaseID(input string) (*MongodbDatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MongodbDatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.MongodbDatabaseName, ok = parsed.Parsed["mongodbDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mongodbDatabaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseMongodbDatabaseIDInsensitively(input string) (*MongodbDatabaseId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MongodbDatabaseId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MongodbDatabaseId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.MongodbDatabaseName, ok = parsed.Parsed["mongodbDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mongodbDatabaseName", *parsed) + if id.MongodbDatabaseName, ok = input.Parsed["mongodbDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mongodbDatabaseName", input) } - return &id, nil + return nil } // ValidateMongodbDatabaseID checks that 'input' can be parsed as a Mongodb Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_mongodbdatabasecollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_mongodbdatabasecollection.go index fd0ec8e076ab..e571a8d6f954 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_mongodbdatabasecollection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_mongodbdatabasecollection.go @@ -40,27 +40,9 @@ func ParseMongodbDatabaseCollectionID(input string) (*MongodbDatabaseCollectionI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MongodbDatabaseCollectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.MongodbDatabaseName, ok = parsed.Parsed["mongodbDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mongodbDatabaseName", *parsed) - } - - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseMongodbDatabaseCollectionIDInsensitively(input string) (*MongodbDataba return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MongodbDatabaseCollectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *MongodbDatabaseCollectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.MongodbDatabaseName, ok = parsed.Parsed["mongodbDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mongodbDatabaseName", *parsed) + if id.MongodbDatabaseName, ok = input.Parsed["mongodbDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mongodbDatabaseName", input) } - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) + if id.CollectionName, ok = input.Parsed["collectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "collectionName", input) } - return &id, nil + return nil } // ValidateMongodbDatabaseCollectionID checks that 'input' can be parsed as a Mongodb Database Collection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_partitionkeyrangeid.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_partitionkeyrangeid.go index f90c9d9a225b..991131e877af 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_partitionkeyrangeid.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_partitionkeyrangeid.go @@ -42,31 +42,9 @@ func ParsePartitionKeyRangeIdID(input string) (*PartitionKeyRangeIdId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartitionKeyRangeIdId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) - } - - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) - } - - if id.PartitionKeyRangeId, ok = parsed.Parsed["partitionKeyRangeId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partitionKeyRangeId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParsePartitionKeyRangeIdIDInsensitively(input string) (*PartitionKeyRangeId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartitionKeyRangeIdId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PartitionKeyRangeIdId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) + if id.CollectionName, ok = input.Parsed["collectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "collectionName", input) } - if id.PartitionKeyRangeId, ok = parsed.Parsed["partitionKeyRangeId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partitionKeyRangeId", *parsed) + if id.PartitionKeyRangeId, ok = input.Parsed["partitionKeyRangeId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "partitionKeyRangeId", input) } - return &id, nil + return nil } // ValidatePartitionKeyRangeIdID checks that 'input' can be parsed as a Partition Key Range Id ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_region.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_region.go index cc2b2ed76b18..957458f0e996 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_region.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_region.go @@ -38,23 +38,9 @@ func ParseRegionID(input string) (*RegionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.RegionName, ok = parsed.Parsed["regionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "regionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRegionIDInsensitively(input string) (*RegionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RegionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.RegionName, ok = parsed.Parsed["regionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "regionName", *parsed) + if id.RegionName, ok = input.Parsed["regionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "regionName", input) } - return &id, nil + return nil } // ValidateRegionID checks that 'input' can be parsed as a Region ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_sourceregiontargetregion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_sourceregiontargetregion.go index 6482bb9bd1ff..1b21054abf3a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_sourceregiontargetregion.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_sourceregiontargetregion.go @@ -40,27 +40,9 @@ func ParseSourceRegionTargetRegionID(input string) (*SourceRegionTargetRegionId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SourceRegionTargetRegionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.SourceRegionName, ok = parsed.Parsed["sourceRegionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceRegionName", *parsed) - } - - if id.TargetRegionName, ok = parsed.Parsed["targetRegionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "targetRegionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseSourceRegionTargetRegionIDInsensitively(input string) (*SourceRegionTa return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SourceRegionTargetRegionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *SourceRegionTargetRegionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.SourceRegionName, ok = parsed.Parsed["sourceRegionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceRegionName", *parsed) + if id.SourceRegionName, ok = input.Parsed["sourceRegionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sourceRegionName", input) } - if id.TargetRegionName, ok = parsed.Parsed["targetRegionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "targetRegionName", *parsed) + if id.TargetRegionName, ok = input.Parsed["targetRegionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "targetRegionName", input) } - return &id, nil + return nil } // ValidateSourceRegionTargetRegionID checks that 'input' can be parsed as a Source Region Target Region ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_sqldatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_sqldatabase.go index 0efbaa7dbca0..c8cd86949a81 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_sqldatabase.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_sqldatabase.go @@ -38,23 +38,9 @@ func ParseSqlDatabaseID(input string) (*SqlDatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SqlDatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSqlDatabaseIDInsensitively(input string) (*SqlDatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SqlDatabaseId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SqlDatabaseId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) + if id.SqlDatabaseName, ok = input.Parsed["sqlDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", input) } - return &id, nil + return nil } // ValidateSqlDatabaseID checks that 'input' can be parsed as a Sql Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_storedprocedure.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_storedprocedure.go index fd7480b7609b..5468c795b652 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_storedprocedure.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_storedprocedure.go @@ -42,31 +42,9 @@ func ParseStoredProcedureID(input string) (*StoredProcedureId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StoredProcedureId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) - } - - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) - } - - if id.StoredProcedureName, ok = parsed.Parsed["storedProcedureName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storedProcedureName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseStoredProcedureIDInsensitively(input string) (*StoredProcedureId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StoredProcedureId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *StoredProcedureId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) + if id.SqlDatabaseName, ok = input.Parsed["sqlDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", input) } - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) + if id.ContainerName, ok = input.Parsed["containerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "containerName", input) } - if id.StoredProcedureName, ok = parsed.Parsed["storedProcedureName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storedProcedureName", *parsed) + if id.StoredProcedureName, ok = input.Parsed["storedProcedureName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storedProcedureName", input) } - return &id, nil + return nil } // ValidateStoredProcedureID checks that 'input' can be parsed as a Stored Procedure ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_table.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_table.go index f4d64253830c..006d2a6171bd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_table.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_table.go @@ -38,23 +38,9 @@ func ParseTableID(input string) (*TableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.TableName, ok = parsed.Parsed["tableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tableName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TableId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TableId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.TableName, ok = parsed.Parsed["tableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tableName", *parsed) + if id.TableName, ok = input.Parsed["tableName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "tableName", input) } - return &id, nil + return nil } // ValidateTableID checks that 'input' can be parsed as a Table ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_targetregion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_targetregion.go index 1604e4b598b6..bbf4612af005 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_targetregion.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_targetregion.go @@ -38,23 +38,9 @@ func ParseTargetRegionID(input string) (*TargetRegionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TargetRegionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.TargetRegionName, ok = parsed.Parsed["targetRegionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "targetRegionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTargetRegionIDInsensitively(input string) (*TargetRegionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TargetRegionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TargetRegionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.TargetRegionName, ok = parsed.Parsed["targetRegionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "targetRegionName", *parsed) + if id.TargetRegionName, ok = input.Parsed["targetRegionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "targetRegionName", input) } - return &id, nil + return nil } // ValidateTargetRegionID checks that 'input' can be parsed as a Target Region ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_trigger.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_trigger.go index 7c06746b92c5..864ee0c2a38a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_trigger.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_trigger.go @@ -42,31 +42,9 @@ func ParseTriggerID(input string) (*TriggerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TriggerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) - } - - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) - } - - if id.TriggerName, ok = parsed.Parsed["triggerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "triggerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TriggerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *TriggerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) + if id.SqlDatabaseName, ok = input.Parsed["sqlDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", input) } - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) + if id.ContainerName, ok = input.Parsed["containerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "containerName", input) } - if id.TriggerName, ok = parsed.Parsed["triggerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "triggerName", *parsed) + if id.TriggerName, ok = input.Parsed["triggerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "triggerName", input) } - return &id, nil + return nil } // ValidateTriggerID checks that 'input' can be parsed as a Trigger ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_userdefinedfunction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_userdefinedfunction.go index 54f09bc5f2dc..90e49c6f84ef 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_userdefinedfunction.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_userdefinedfunction.go @@ -42,31 +42,9 @@ func ParseUserDefinedFunctionID(input string) (*UserDefinedFunctionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UserDefinedFunctionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) - } - - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) - } - - if id.UserDefinedFunctionName, ok = parsed.Parsed["userDefinedFunctionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "userDefinedFunctionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseUserDefinedFunctionIDInsensitively(input string) (*UserDefinedFunction return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UserDefinedFunctionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *UserDefinedFunctionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) + if id.SqlDatabaseName, ok = input.Parsed["sqlDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", input) } - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) + if id.ContainerName, ok = input.Parsed["containerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "containerName", input) } - if id.UserDefinedFunctionName, ok = parsed.Parsed["userDefinedFunctionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "userDefinedFunctionName", *parsed) + if id.UserDefinedFunctionName, ok = input.Parsed["userDefinedFunctionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "userDefinedFunctionName", input) } - return &id, nil + return nil } // ValidateUserDefinedFunctionID checks that 'input' can be parsed as a User Defined Function ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/id_service.go index 1a0173f1bdd9..2ecf0e8462ec 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/id_service.go @@ -38,23 +38,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ServiceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_databaseaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_databaseaccount.go index 9edb9717313c..20b3172f6a2c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_databaseaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_databaseaccount.go @@ -36,19 +36,9 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DatabaseAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - return &id, nil + return nil } // ValidateDatabaseAccountID checks that 'input' can be parsed as a Database Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_mongodbroledefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_mongodbroledefinition.go index a5dad9eda742..737a561ca8a7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_mongodbroledefinition.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_mongodbroledefinition.go @@ -38,23 +38,9 @@ func ParseMongodbRoleDefinitionID(input string) (*MongodbRoleDefinitionId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MongodbRoleDefinitionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.MongoRoleDefinitionId, ok = parsed.Parsed["mongoRoleDefinitionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mongoRoleDefinitionId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseMongodbRoleDefinitionIDInsensitively(input string) (*MongodbRoleDefini return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MongodbRoleDefinitionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MongodbRoleDefinitionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.MongoRoleDefinitionId, ok = parsed.Parsed["mongoRoleDefinitionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mongoRoleDefinitionId", *parsed) + if id.MongoRoleDefinitionId, ok = input.Parsed["mongoRoleDefinitionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mongoRoleDefinitionId", input) } - return &id, nil + return nil } // ValidateMongodbRoleDefinitionID checks that 'input' can be parsed as a Mongodb Role Definition ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_mongodbuserdefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_mongodbuserdefinition.go index 5e5016590a7f..f720d6bbf30a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_mongodbuserdefinition.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_mongodbuserdefinition.go @@ -38,23 +38,9 @@ func ParseMongodbUserDefinitionID(input string) (*MongodbUserDefinitionId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MongodbUserDefinitionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.MongoUserDefinitionId, ok = parsed.Parsed["mongoUserDefinitionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mongoUserDefinitionId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseMongodbUserDefinitionIDInsensitively(input string) (*MongodbUserDefini return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MongodbUserDefinitionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MongodbUserDefinitionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.MongoUserDefinitionId, ok = parsed.Parsed["mongoUserDefinitionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mongoUserDefinitionId", *parsed) + if id.MongoUserDefinitionId, ok = input.Parsed["mongoUserDefinitionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mongoUserDefinitionId", input) } - return &id, nil + return nil } // ValidateMongodbUserDefinitionID checks that 'input' can be parsed as a Mongodb User Definition ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_cassandrakeyspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_cassandrakeyspace.go index 9555cbf46b10..c0948748c2dc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_cassandrakeyspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_cassandrakeyspace.go @@ -38,23 +38,9 @@ func ParseCassandraKeyspaceID(input string) (*CassandraKeyspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CassandraKeyspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.CassandraKeyspaceName, ok = parsed.Parsed["cassandraKeyspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cassandraKeyspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCassandraKeyspaceIDInsensitively(input string) (*CassandraKeyspaceId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CassandraKeyspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CassandraKeyspaceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.CassandraKeyspaceName, ok = parsed.Parsed["cassandraKeyspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cassandraKeyspaceName", *parsed) + if id.CassandraKeyspaceName, ok = input.Parsed["cassandraKeyspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cassandraKeyspaceName", input) } - return &id, nil + return nil } // ValidateCassandraKeyspaceID checks that 'input' can be parsed as a Cassandra Keyspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_cassandrakeyspacetable.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_cassandrakeyspacetable.go index 66b3ea506a45..0e9b31b7d489 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_cassandrakeyspacetable.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_cassandrakeyspacetable.go @@ -40,27 +40,9 @@ func ParseCassandraKeyspaceTableID(input string) (*CassandraKeyspaceTableId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CassandraKeyspaceTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.CassandraKeyspaceName, ok = parsed.Parsed["cassandraKeyspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cassandraKeyspaceName", *parsed) - } - - if id.TableName, ok = parsed.Parsed["tableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tableName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseCassandraKeyspaceTableIDInsensitively(input string) (*CassandraKeyspac return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CassandraKeyspaceTableId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *CassandraKeyspaceTableId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.CassandraKeyspaceName, ok = parsed.Parsed["cassandraKeyspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cassandraKeyspaceName", *parsed) + if id.CassandraKeyspaceName, ok = input.Parsed["cassandraKeyspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cassandraKeyspaceName", input) } - if id.TableName, ok = parsed.Parsed["tableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tableName", *parsed) + if id.TableName, ok = input.Parsed["tableName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "tableName", input) } - return &id, nil + return nil } // ValidateCassandraKeyspaceTableID checks that 'input' can be parsed as a Cassandra Keyspace Table ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_clientencryptionkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_clientencryptionkey.go index 8fcb741d96a5..70599e3ea3d3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_clientencryptionkey.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_clientencryptionkey.go @@ -40,27 +40,9 @@ func ParseClientEncryptionKeyID(input string) (*ClientEncryptionKeyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClientEncryptionKeyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) - } - - if id.ClientEncryptionKeyName, ok = parsed.Parsed["clientEncryptionKeyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clientEncryptionKeyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseClientEncryptionKeyIDInsensitively(input string) (*ClientEncryptionKey return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClientEncryptionKeyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ClientEncryptionKeyId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) + if id.SqlDatabaseName, ok = input.Parsed["sqlDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", input) } - if id.ClientEncryptionKeyName, ok = parsed.Parsed["clientEncryptionKeyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clientEncryptionKeyName", *parsed) + if id.ClientEncryptionKeyName, ok = input.Parsed["clientEncryptionKeyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clientEncryptionKeyName", input) } - return &id, nil + return nil } // ValidateClientEncryptionKeyID checks that 'input' can be parsed as a Client Encryption Key ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_collection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_collection.go index a7e01b980150..06ba5f2c3823 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_collection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_collection.go @@ -40,27 +40,9 @@ func ParseCollectionID(input string) (*CollectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CollectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) - } - - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseCollectionIDInsensitively(input string) (*CollectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CollectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *CollectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) + if id.CollectionName, ok = input.Parsed["collectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "collectionName", input) } - return &id, nil + return nil } // ValidateCollectionID checks that 'input' can be parsed as a Collection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_collectionpartitionkeyrangeid.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_collectionpartitionkeyrangeid.go index 5819216ab8d6..af2697450ff5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_collectionpartitionkeyrangeid.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_collectionpartitionkeyrangeid.go @@ -44,35 +44,9 @@ func ParseCollectionPartitionKeyRangeIdID(input string) (*CollectionPartitionKey return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CollectionPartitionKeyRangeIdId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.RegionName, ok = parsed.Parsed["regionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "regionName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) - } - - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) - } - - if id.PartitionKeyRangeId, ok = parsed.Parsed["partitionKeyRangeId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partitionKeyRangeId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -87,38 +61,46 @@ func ParseCollectionPartitionKeyRangeIdIDInsensitively(input string) (*Collectio return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CollectionPartitionKeyRangeIdId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *CollectionPartitionKeyRangeIdId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.RegionName, ok = parsed.Parsed["regionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "regionName", *parsed) + if id.RegionName, ok = input.Parsed["regionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "regionName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) + if id.CollectionName, ok = input.Parsed["collectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "collectionName", input) } - if id.PartitionKeyRangeId, ok = parsed.Parsed["partitionKeyRangeId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partitionKeyRangeId", *parsed) + if id.PartitionKeyRangeId, ok = input.Parsed["partitionKeyRangeId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "partitionKeyRangeId", input) } - return &id, nil + return nil } // ValidateCollectionPartitionKeyRangeIdID checks that 'input' can be parsed as a Collection Partition Key Range Id ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_container.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_container.go index 7a27bedb7080..325844c7b0fa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_container.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_container.go @@ -40,27 +40,9 @@ func ParseContainerID(input string) (*ContainerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContainerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) - } - - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContainerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ContainerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) + if id.SqlDatabaseName, ok = input.Parsed["sqlDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", input) } - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) + if id.ContainerName, ok = input.Parsed["containerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "containerName", input) } - return &id, nil + return nil } // ValidateContainerID checks that 'input' can be parsed as a Container ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_database.go index 06541d6f6c6c..c52995f2bc9b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_database.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_database.go @@ -38,23 +38,9 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool 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 = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - return &id, nil + return nil } // ValidateDatabaseID checks that 'input' can be parsed as a Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databaseaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databaseaccount.go index 0e56a8d66f54..425f2c9b5aee 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databaseaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databaseaccount.go @@ -36,19 +36,9 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DatabaseAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - return &id, nil + return nil } // ValidateDatabaseAccountID checks that 'input' can be parsed as a Database Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databaseaccountname.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databaseaccountname.go index 1ad2a926aa2d..a2757f563031 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databaseaccountname.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databaseaccountname.go @@ -32,11 +32,9 @@ func ParseDatabaseAccountNameID(input string) (*DatabaseAccountNameId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseAccountNameId{} - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseDatabaseAccountNameIDInsensitively(input string) (*DatabaseAccountName return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseAccountNameId{} - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *DatabaseAccountNameId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) + } + + return nil +} + // ValidateDatabaseAccountNameID checks that 'input' can be parsed as a Database Account Name ID func ValidateDatabaseAccountNameID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databasecollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databasecollection.go index ae75117d04e2..82742bb4c959 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databasecollection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databasecollection.go @@ -42,31 +42,9 @@ func ParseDatabaseCollectionID(input string) (*DatabaseCollectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseCollectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.RegionName, ok = parsed.Parsed["regionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "regionName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) - } - - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseDatabaseCollectionIDInsensitively(input string) (*DatabaseCollectionId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseCollectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DatabaseCollectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.RegionName, ok = parsed.Parsed["regionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "regionName", *parsed) + if id.RegionName, ok = input.Parsed["regionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "regionName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) + if id.CollectionName, ok = input.Parsed["collectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "collectionName", input) } - return &id, nil + return nil } // ValidateDatabaseCollectionID checks that 'input' can be parsed as a Database Collection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_graph.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_graph.go index 990cf689b19a..87414bff4e5a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_graph.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_graph.go @@ -40,27 +40,9 @@ func ParseGraphID(input string) (*GraphId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GraphId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.GremlinDatabaseName, ok = parsed.Parsed["gremlinDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gremlinDatabaseName", *parsed) - } - - if id.GraphName, ok = parsed.Parsed["graphName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "graphName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseGraphIDInsensitively(input string) (*GraphId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GraphId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *GraphId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.GremlinDatabaseName, ok = parsed.Parsed["gremlinDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gremlinDatabaseName", *parsed) + if id.GremlinDatabaseName, ok = input.Parsed["gremlinDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "gremlinDatabaseName", input) } - if id.GraphName, ok = parsed.Parsed["graphName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "graphName", *parsed) + if id.GraphName, ok = input.Parsed["graphName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "graphName", input) } - return &id, nil + return nil } // ValidateGraphID checks that 'input' can be parsed as a Graph ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_gremlindatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_gremlindatabase.go index 20095da53b2a..62c750d65cee 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_gremlindatabase.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_gremlindatabase.go @@ -38,23 +38,9 @@ func ParseGremlinDatabaseID(input string) (*GremlinDatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GremlinDatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.GremlinDatabaseName, ok = parsed.Parsed["gremlinDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gremlinDatabaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseGremlinDatabaseIDInsensitively(input string) (*GremlinDatabaseId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GremlinDatabaseId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *GremlinDatabaseId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.GremlinDatabaseName, ok = parsed.Parsed["gremlinDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gremlinDatabaseName", *parsed) + if id.GremlinDatabaseName, ok = input.Parsed["gremlinDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "gremlinDatabaseName", input) } - return &id, nil + return nil } // ValidateGremlinDatabaseID checks that 'input' can be parsed as a Gremlin Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_location.go index bc6bbfc9d1d9..2955e6dd5436 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_mongodbdatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_mongodbdatabase.go index 245c181e3101..f156cc1f4631 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_mongodbdatabase.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_mongodbdatabase.go @@ -38,23 +38,9 @@ func ParseMongodbDatabaseID(input string) (*MongodbDatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MongodbDatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.MongodbDatabaseName, ok = parsed.Parsed["mongodbDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mongodbDatabaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseMongodbDatabaseIDInsensitively(input string) (*MongodbDatabaseId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MongodbDatabaseId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MongodbDatabaseId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.MongodbDatabaseName, ok = parsed.Parsed["mongodbDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mongodbDatabaseName", *parsed) + if id.MongodbDatabaseName, ok = input.Parsed["mongodbDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mongodbDatabaseName", input) } - return &id, nil + return nil } // ValidateMongodbDatabaseID checks that 'input' can be parsed as a Mongodb Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_mongodbdatabasecollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_mongodbdatabasecollection.go index fd0ec8e076ab..e571a8d6f954 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_mongodbdatabasecollection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_mongodbdatabasecollection.go @@ -40,27 +40,9 @@ func ParseMongodbDatabaseCollectionID(input string) (*MongodbDatabaseCollectionI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MongodbDatabaseCollectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.MongodbDatabaseName, ok = parsed.Parsed["mongodbDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mongodbDatabaseName", *parsed) - } - - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseMongodbDatabaseCollectionIDInsensitively(input string) (*MongodbDataba return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MongodbDatabaseCollectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *MongodbDatabaseCollectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.MongodbDatabaseName, ok = parsed.Parsed["mongodbDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mongodbDatabaseName", *parsed) + if id.MongodbDatabaseName, ok = input.Parsed["mongodbDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mongodbDatabaseName", input) } - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) + if id.CollectionName, ok = input.Parsed["collectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "collectionName", input) } - return &id, nil + return nil } // ValidateMongodbDatabaseCollectionID checks that 'input' can be parsed as a Mongodb Database Collection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_partitionkeyrangeid.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_partitionkeyrangeid.go index f90c9d9a225b..991131e877af 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_partitionkeyrangeid.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_partitionkeyrangeid.go @@ -42,31 +42,9 @@ func ParsePartitionKeyRangeIdID(input string) (*PartitionKeyRangeIdId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartitionKeyRangeIdId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) - } - - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) - } - - if id.PartitionKeyRangeId, ok = parsed.Parsed["partitionKeyRangeId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partitionKeyRangeId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParsePartitionKeyRangeIdIDInsensitively(input string) (*PartitionKeyRangeId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartitionKeyRangeIdId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PartitionKeyRangeIdId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - if id.CollectionName, ok = parsed.Parsed["collectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectionName", *parsed) + if id.CollectionName, ok = input.Parsed["collectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "collectionName", input) } - if id.PartitionKeyRangeId, ok = parsed.Parsed["partitionKeyRangeId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partitionKeyRangeId", *parsed) + if id.PartitionKeyRangeId, ok = input.Parsed["partitionKeyRangeId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "partitionKeyRangeId", input) } - return &id, nil + return nil } // ValidatePartitionKeyRangeIdID checks that 'input' can be parsed as a Partition Key Range Id ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_region.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_region.go index cc2b2ed76b18..957458f0e996 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_region.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_region.go @@ -38,23 +38,9 @@ func ParseRegionID(input string) (*RegionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.RegionName, ok = parsed.Parsed["regionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "regionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRegionIDInsensitively(input string) (*RegionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RegionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RegionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.RegionName, ok = parsed.Parsed["regionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "regionName", *parsed) + if id.RegionName, ok = input.Parsed["regionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "regionName", input) } - return &id, nil + return nil } // ValidateRegionID checks that 'input' can be parsed as a Region ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_sourceregiontargetregion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_sourceregiontargetregion.go index 6482bb9bd1ff..1b21054abf3a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_sourceregiontargetregion.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_sourceregiontargetregion.go @@ -40,27 +40,9 @@ func ParseSourceRegionTargetRegionID(input string) (*SourceRegionTargetRegionId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SourceRegionTargetRegionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.SourceRegionName, ok = parsed.Parsed["sourceRegionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceRegionName", *parsed) - } - - if id.TargetRegionName, ok = parsed.Parsed["targetRegionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "targetRegionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseSourceRegionTargetRegionIDInsensitively(input string) (*SourceRegionTa return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SourceRegionTargetRegionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *SourceRegionTargetRegionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.SourceRegionName, ok = parsed.Parsed["sourceRegionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sourceRegionName", *parsed) + if id.SourceRegionName, ok = input.Parsed["sourceRegionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sourceRegionName", input) } - if id.TargetRegionName, ok = parsed.Parsed["targetRegionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "targetRegionName", *parsed) + if id.TargetRegionName, ok = input.Parsed["targetRegionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "targetRegionName", input) } - return &id, nil + return nil } // ValidateSourceRegionTargetRegionID checks that 'input' can be parsed as a Source Region Target Region ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_sqldatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_sqldatabase.go index 0efbaa7dbca0..c8cd86949a81 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_sqldatabase.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_sqldatabase.go @@ -38,23 +38,9 @@ func ParseSqlDatabaseID(input string) (*SqlDatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SqlDatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSqlDatabaseIDInsensitively(input string) (*SqlDatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SqlDatabaseId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SqlDatabaseId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) + if id.SqlDatabaseName, ok = input.Parsed["sqlDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", input) } - return &id, nil + return nil } // ValidateSqlDatabaseID checks that 'input' can be parsed as a Sql Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_storedprocedure.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_storedprocedure.go index fd7480b7609b..5468c795b652 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_storedprocedure.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_storedprocedure.go @@ -42,31 +42,9 @@ func ParseStoredProcedureID(input string) (*StoredProcedureId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StoredProcedureId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) - } - - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) - } - - if id.StoredProcedureName, ok = parsed.Parsed["storedProcedureName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storedProcedureName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseStoredProcedureIDInsensitively(input string) (*StoredProcedureId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StoredProcedureId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *StoredProcedureId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) + if id.SqlDatabaseName, ok = input.Parsed["sqlDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", input) } - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) + if id.ContainerName, ok = input.Parsed["containerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "containerName", input) } - if id.StoredProcedureName, ok = parsed.Parsed["storedProcedureName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storedProcedureName", *parsed) + if id.StoredProcedureName, ok = input.Parsed["storedProcedureName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storedProcedureName", input) } - return &id, nil + return nil } // ValidateStoredProcedureID checks that 'input' can be parsed as a Stored Procedure ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_table.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_table.go index f4d64253830c..006d2a6171bd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_table.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_table.go @@ -38,23 +38,9 @@ func ParseTableID(input string) (*TableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.TableName, ok = parsed.Parsed["tableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tableName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TableId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TableId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.TableName, ok = parsed.Parsed["tableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tableName", *parsed) + if id.TableName, ok = input.Parsed["tableName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "tableName", input) } - return &id, nil + return nil } // ValidateTableID checks that 'input' can be parsed as a Table ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_targetregion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_targetregion.go index 1604e4b598b6..bbf4612af005 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_targetregion.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_targetregion.go @@ -38,23 +38,9 @@ func ParseTargetRegionID(input string) (*TargetRegionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TargetRegionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.TargetRegionName, ok = parsed.Parsed["targetRegionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "targetRegionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTargetRegionIDInsensitively(input string) (*TargetRegionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TargetRegionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TargetRegionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.TargetRegionName, ok = parsed.Parsed["targetRegionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "targetRegionName", *parsed) + if id.TargetRegionName, ok = input.Parsed["targetRegionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "targetRegionName", input) } - return &id, nil + return nil } // ValidateTargetRegionID checks that 'input' can be parsed as a Target Region ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_trigger.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_trigger.go index 7c06746b92c5..864ee0c2a38a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_trigger.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_trigger.go @@ -42,31 +42,9 @@ func ParseTriggerID(input string) (*TriggerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TriggerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) - } - - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) - } - - if id.TriggerName, ok = parsed.Parsed["triggerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "triggerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TriggerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *TriggerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) + if id.SqlDatabaseName, ok = input.Parsed["sqlDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", input) } - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) + if id.ContainerName, ok = input.Parsed["containerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "containerName", input) } - if id.TriggerName, ok = parsed.Parsed["triggerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "triggerName", *parsed) + if id.TriggerName, ok = input.Parsed["triggerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "triggerName", input) } - return &id, nil + return nil } // ValidateTriggerID checks that 'input' can be parsed as a Trigger ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_userdefinedfunction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_userdefinedfunction.go index 54f09bc5f2dc..90e49c6f84ef 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_userdefinedfunction.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_userdefinedfunction.go @@ -42,31 +42,9 @@ func ParseUserDefinedFunctionID(input string) (*UserDefinedFunctionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UserDefinedFunctionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) - } - - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) - } - - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) - } - - if id.UserDefinedFunctionName, ok = parsed.Parsed["userDefinedFunctionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "userDefinedFunctionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseUserDefinedFunctionIDInsensitively(input string) (*UserDefinedFunction return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UserDefinedFunctionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *UserDefinedFunctionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DatabaseAccountName, ok = parsed.Parsed["databaseAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", *parsed) + if id.DatabaseAccountName, ok = input.Parsed["databaseAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseAccountName", input) } - if id.SqlDatabaseName, ok = parsed.Parsed["sqlDatabaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", *parsed) + if id.SqlDatabaseName, ok = input.Parsed["sqlDatabaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sqlDatabaseName", input) } - if id.ContainerName, ok = parsed.Parsed["containerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "containerName", *parsed) + if id.ContainerName, ok = input.Parsed["containerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "containerName", input) } - if id.UserDefinedFunctionName, ok = parsed.Parsed["userDefinedFunctionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "userDefinedFunctionName", *parsed) + if id.UserDefinedFunctionName, ok = input.Parsed["userDefinedFunctionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "userDefinedFunctionName", input) } - return &id, nil + return nil } // ValidateUserDefinedFunctionID checks that 'input' can be parsed as a User Defined Function ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/managedcassandras/id_cassandracluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/managedcassandras/id_cassandracluster.go index 55c61f4a8646..70b8aac3664a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/managedcassandras/id_cassandracluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/managedcassandras/id_cassandracluster.go @@ -36,19 +36,9 @@ func ParseCassandraClusterID(input string) (*CassandraClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CassandraClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CassandraClusterName, ok = parsed.Parsed["cassandraClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cassandraClusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseCassandraClusterIDInsensitively(input string) (*CassandraClusterId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CassandraClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *CassandraClusterId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CassandraClusterName, ok = parsed.Parsed["cassandraClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cassandraClusterName", *parsed) + if id.CassandraClusterName, ok = input.Parsed["cassandraClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cassandraClusterName", input) } - return &id, nil + return nil } // ValidateCassandraClusterID checks that 'input' can be parsed as a Cassandra Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/managedcassandras/id_datacenter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/managedcassandras/id_datacenter.go index 8d8d88350134..0c8dfad5704b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/managedcassandras/id_datacenter.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/managedcassandras/id_datacenter.go @@ -38,23 +38,9 @@ func ParseDataCenterID(input string) (*DataCenterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataCenterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CassandraClusterName, ok = parsed.Parsed["cassandraClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cassandraClusterName", *parsed) - } - - if id.DataCenterName, ok = parsed.Parsed["dataCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataCenterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDataCenterIDInsensitively(input string) (*DataCenterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataCenterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DataCenterId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CassandraClusterName, ok = parsed.Parsed["cassandraClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cassandraClusterName", *parsed) + if id.CassandraClusterName, ok = input.Parsed["cassandraClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cassandraClusterName", input) } - if id.DataCenterName, ok = parsed.Parsed["dataCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataCenterName", *parsed) + if id.DataCenterName, ok = input.Parsed["dataCenterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dataCenterName", input) } - return &id, nil + return nil } // ValidateDataCenterID checks that 'input' can be parsed as a Data Center ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/id_scopedexport.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/id_scopedexport.go index a5546578efda..7bd793568820 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/id_scopedexport.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/id_scopedexport.go @@ -34,15 +34,9 @@ func ParseScopedExportID(input string) (*ScopedExportId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedExportId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.ExportName, ok = parsed.Parsed["exportName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "exportName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedExportIDInsensitively(input string) (*ScopedExportId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedExportId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedExportId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.ExportName, ok = parsed.Parsed["exportName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "exportName", *parsed) + if id.ExportName, ok = input.Parsed["exportName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "exportName", input) } - return &id, nil + return nil } // ValidateScopedExportID checks that 'input' can be parsed as a Scoped Export ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/id_scheduledaction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/id_scheduledaction.go index b5d002d4286f..69c04db60b5b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/id_scheduledaction.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/id_scheduledaction.go @@ -32,11 +32,9 @@ func ParseScheduledActionID(input string) (*ScheduledActionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScheduledActionId{} - - if id.ScheduledActionName, ok = parsed.Parsed["scheduledActionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduledActionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseScheduledActionIDInsensitively(input string) (*ScheduledActionId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScheduledActionId{} - - if id.ScheduledActionName, ok = parsed.Parsed["scheduledActionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduledActionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *ScheduledActionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ScheduledActionName, ok = input.Parsed["scheduledActionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scheduledActionName", input) + } + + return nil +} + // ValidateScheduledActionID checks that 'input' can be parsed as a Scheduled Action ID func ValidateScheduledActionID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/id_scopedscheduledaction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/id_scopedscheduledaction.go index 3e166c601f47..a5b593cd533a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/id_scopedscheduledaction.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/id_scopedscheduledaction.go @@ -34,15 +34,9 @@ func ParseScopedScheduledActionID(input string) (*ScopedScheduledActionId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedScheduledActionId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.ScheduledActionName, ok = parsed.Parsed["scheduledActionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduledActionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedScheduledActionIDInsensitively(input string) (*ScopedScheduledAc return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedScheduledActionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedScheduledActionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.ScheduledActionName, ok = parsed.Parsed["scheduledActionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduledActionName", *parsed) + if id.ScheduledActionName, ok = input.Parsed["scheduledActionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scheduledActionName", input) } - return &id, nil + return nil } // ValidateScopedScheduledActionID checks that 'input' can be parsed as a Scoped Scheduled Action ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/scheduledactions/id_scheduledaction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/scheduledactions/id_scheduledaction.go index b5d002d4286f..69c04db60b5b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/scheduledactions/id_scheduledaction.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/scheduledactions/id_scheduledaction.go @@ -32,11 +32,9 @@ func ParseScheduledActionID(input string) (*ScheduledActionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScheduledActionId{} - - if id.ScheduledActionName, ok = parsed.Parsed["scheduledActionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduledActionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseScheduledActionIDInsensitively(input string) (*ScheduledActionId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScheduledActionId{} - - if id.ScheduledActionName, ok = parsed.Parsed["scheduledActionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduledActionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *ScheduledActionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ScheduledActionName, ok = input.Parsed["scheduledActionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scheduledActionName", input) + } + + return nil +} + // ValidateScheduledActionID checks that 'input' can be parsed as a Scheduled Action ID func ValidateScheduledActionID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/scheduledactions/id_scopedscheduledaction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/scheduledactions/id_scopedscheduledaction.go index 3e166c601f47..a5b593cd533a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/scheduledactions/id_scopedscheduledaction.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/scheduledactions/id_scopedscheduledaction.go @@ -34,15 +34,9 @@ func ParseScopedScheduledActionID(input string) (*ScopedScheduledActionId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedScheduledActionId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.ScheduledActionName, ok = parsed.Parsed["scheduledActionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduledActionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedScheduledActionIDInsensitively(input string) (*ScopedScheduledAc return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedScheduledActionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedScheduledActionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.ScheduledActionName, ok = parsed.Parsed["scheduledActionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduledActionName", *parsed) + if id.ScheduledActionName, ok = input.Parsed["scheduledActionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scheduledActionName", input) } - return &id, nil + return nil } // ValidateScopedScheduledActionID checks that 'input' can be parsed as a Scoped Scheduled Action ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/views/id_scopedview.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/views/id_scopedview.go index 788d550f8657..f2575e1e5205 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/views/id_scopedview.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/views/id_scopedview.go @@ -34,15 +34,9 @@ func ParseScopedViewID(input string) (*ScopedViewId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedViewId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.ViewName, ok = parsed.Parsed["viewName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "viewName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedViewIDInsensitively(input string) (*ScopedViewId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedViewId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedViewId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.ViewName, ok = parsed.Parsed["viewName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "viewName", *parsed) + if id.ViewName, ok = input.Parsed["viewName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "viewName", input) } - return &id, nil + return nil } // ValidateScopedViewID checks that 'input' can be parsed as a Scoped View ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/views/id_view.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/views/id_view.go index b4cc2295d4a3..e1afb0fe35b7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/views/id_view.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/views/id_view.go @@ -32,11 +32,9 @@ func ParseViewID(input string) (*ViewId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ViewId{} - - if id.ViewName, ok = parsed.Parsed["viewName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "viewName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseViewIDInsensitively(input string) (*ViewId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ViewId{} - - if id.ViewName, ok = parsed.Parsed["viewName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "viewName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *ViewId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ViewName, ok = input.Parsed["viewName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "viewName", input) + } + + return nil +} + // ValidateViewID checks that 'input' can be parsed as a View ID func ValidateViewID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/id_resourceprovider.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/id_resourceprovider.go index ac013405c300..f6051ffe53ae 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/id_resourceprovider.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/id_resourceprovider.go @@ -36,19 +36,9 @@ func ParseResourceProviderID(input string) (*ResourceProviderId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ResourceProviderId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ResourceProviderName, ok = parsed.Parsed["resourceProviderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceProviderName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseResourceProviderIDInsensitively(input string) (*ResourceProviderId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ResourceProviderId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ResourceProviderId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ResourceProviderName, ok = parsed.Parsed["resourceProviderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceProviderName", *parsed) + if id.ResourceProviderName, ok = input.Parsed["resourceProviderName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceProviderName", input) } - return &id, nil + return nil } // ValidateResourceProviderID checks that 'input' can be parsed as a Resource Provider ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dashboard/2023-09-01/grafanaresource/id_grafana.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dashboard/2023-09-01/grafanaresource/id_grafana.go index c3aece524bb7..36a2ddf94630 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dashboard/2023-09-01/grafanaresource/id_grafana.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dashboard/2023-09-01/grafanaresource/id_grafana.go @@ -36,19 +36,9 @@ func ParseGrafanaID(input string) (*GrafanaId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GrafanaId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.GrafanaName, ok = parsed.Parsed["grafanaName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "grafanaName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseGrafanaIDInsensitively(input string) (*GrafanaId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GrafanaId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *GrafanaId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.GrafanaName, ok = parsed.Parsed["grafanaName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "grafanaName", *parsed) + if id.GrafanaName, ok = input.Parsed["grafanaName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "grafanaName", input) } - return &id, nil + return nil } // ValidateGrafanaID checks that 'input' can be parsed as a Grafana ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/devices/id_databoxedgedevice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/devices/id_databoxedgedevice.go index 055d38cf5aa1..dd95c70ba233 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/devices/id_databoxedgedevice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/devices/id_databoxedgedevice.go @@ -36,19 +36,9 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataBoxEdgeDeviceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DataBoxEdgeDeviceName, ok = parsed.Parsed["dataBoxEdgeDeviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataBoxEdgeDeviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataBoxEdgeDeviceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DataBoxEdgeDeviceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DataBoxEdgeDeviceName, ok = parsed.Parsed["dataBoxEdgeDeviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataBoxEdgeDeviceName", *parsed) + if id.DataBoxEdgeDeviceName, ok = input.Parsed["dataBoxEdgeDeviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dataBoxEdgeDeviceName", input) } - return &id, nil + return nil } // ValidateDataBoxEdgeDeviceID checks that 'input' can be parsed as a Data Box Edge Device ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/orders/id_databoxedgedevice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/orders/id_databoxedgedevice.go index da50ab36235e..feca815cec27 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/orders/id_databoxedgedevice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/orders/id_databoxedgedevice.go @@ -36,19 +36,9 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataBoxEdgeDeviceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DataBoxEdgeDeviceName, ok = parsed.Parsed["dataBoxEdgeDeviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataBoxEdgeDeviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataBoxEdgeDeviceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DataBoxEdgeDeviceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DataBoxEdgeDeviceName, ok = parsed.Parsed["dataBoxEdgeDeviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataBoxEdgeDeviceName", *parsed) + if id.DataBoxEdgeDeviceName, ok = input.Parsed["dataBoxEdgeDeviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dataBoxEdgeDeviceName", input) } - return &id, nil + return nil } // ValidateDataBoxEdgeDeviceID checks that 'input' can be parsed as a Data Box Edge Device ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-04-01-preview/workspaces/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-04-01-preview/workspaces/id_workspace.go index ca5679d8f925..7bf23b118eb0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-04-01-preview/workspaces/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-04-01-preview/workspaces/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-10-01-preview/accessconnector/id_accessconnector.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-10-01-preview/accessconnector/id_accessconnector.go index 73e40286db1f..e5bfb7b650df 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-10-01-preview/accessconnector/id_accessconnector.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-10-01-preview/accessconnector/id_accessconnector.go @@ -36,19 +36,9 @@ func ParseAccessConnectorID(input string) (*AccessConnectorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessConnectorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccessConnectorName, ok = parsed.Parsed["accessConnectorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessConnectorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAccessConnectorIDInsensitively(input string) (*AccessConnectorId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessConnectorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AccessConnectorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccessConnectorName, ok = parsed.Parsed["accessConnectorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessConnectorName", *parsed) + if id.AccessConnectorName, ok = input.Parsed["accessConnectorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accessConnectorName", input) } - return &id, nil + return nil } // ValidateAccessConnectorID checks that 'input' can be parsed as a Access Connector ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/id_virtualnetworkpeering.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/id_virtualnetworkpeering.go index a4e54a29ac63..a1f544dfd6ff 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/id_virtualnetworkpeering.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/id_virtualnetworkpeering.go @@ -38,23 +38,9 @@ func ParseVirtualNetworkPeeringID(input string) (*VirtualNetworkPeeringId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkPeeringId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.VirtualNetworkPeeringName, ok = parsed.Parsed["virtualNetworkPeeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkPeeringName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseVirtualNetworkPeeringIDInsensitively(input string) (*VirtualNetworkPee return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkPeeringId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VirtualNetworkPeeringId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.VirtualNetworkPeeringName, ok = parsed.Parsed["virtualNetworkPeeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkPeeringName", *parsed) + if id.VirtualNetworkPeeringName, ok = input.Parsed["virtualNetworkPeeringName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkPeeringName", input) } - return &id, nil + return nil } // ValidateVirtualNetworkPeeringID checks that 'input' can be parsed as a Virtual Network Peering ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/id_workspace.go index 75d5d7939dd0..81b86965d91b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/id_workspace.go index ca5679d8f925..7bf23b118eb0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/apikey/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/apikey/id_monitor.go index f2fc72f83d04..72284fd13d9c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/apikey/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/apikey/id_monitor.go @@ -36,19 +36,9 @@ func ParseMonitorID(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MonitorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - return &id, nil + return nil } // ValidateMonitorID checks that 'input' can be parsed as a Monitor ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/hosts/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/hosts/id_monitor.go index 365bc358163a..13465f863f92 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/hosts/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/hosts/id_monitor.go @@ -36,19 +36,9 @@ func ParseMonitorID(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MonitorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - return &id, nil + return nil } // ValidateMonitorID checks that 'input' can be parsed as a Monitor ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/linkedresources/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/linkedresources/id_monitor.go index cdda6e3c2e81..7ef85c016d78 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/linkedresources/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/linkedresources/id_monitor.go @@ -36,19 +36,9 @@ func ParseMonitorID(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MonitorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - return &id, nil + return nil } // ValidateMonitorID checks that 'input' can be parsed as a Monitor ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/monitoredresources/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/monitoredresources/id_monitor.go index 49925b3c6472..825f2f113fa3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/monitoredresources/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/monitoredresources/id_monitor.go @@ -36,19 +36,9 @@ func ParseMonitorID(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MonitorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - return &id, nil + return nil } // ValidateMonitorID checks that 'input' can be parsed as a Monitor ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/monitorsresource/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/monitorsresource/id_monitor.go index 44564802c48f..b2b27eeaa9ad 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/monitorsresource/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/monitorsresource/id_monitor.go @@ -36,19 +36,9 @@ func ParseMonitorID(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MonitorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - return &id, nil + return nil } // ValidateMonitorID checks that 'input' can be parsed as a Monitor ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/id_monitor.go index 591cce6202c8..ecfe987a66e6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/id_monitor.go @@ -36,19 +36,9 @@ func ParseMonitorID(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MonitorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - return &id, nil + return nil } // ValidateMonitorID checks that 'input' can be parsed as a Monitor ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/rules/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/rules/id_monitor.go index 77503953b289..bf61b2c04ff2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/rules/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/rules/id_monitor.go @@ -36,19 +36,9 @@ func ParseMonitorID(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MonitorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - return &id, nil + return nil } // ValidateMonitorID checks that 'input' can be parsed as a Monitor ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/rules/id_tagrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/rules/id_tagrule.go index 9068f37981d4..f8c6a9c9000c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/rules/id_tagrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/rules/id_tagrule.go @@ -38,23 +38,9 @@ func ParseTagRuleID(input string) (*TagRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TagRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) - } - - if id.TagRuleName, ok = parsed.Parsed["tagRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTagRuleIDInsensitively(input string) (*TagRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TagRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TagRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - if id.TagRuleName, ok = parsed.Parsed["tagRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagRuleName", *parsed) + if id.TagRuleName, ok = input.Parsed["tagRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "tagRuleName", input) } - return &id, nil + return nil } // ValidateTagRuleID checks that 'input' can be parsed as a Tag Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/singlesignon/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/singlesignon/id_monitor.go index 48f831acf3a0..607eb2d03587 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/singlesignon/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/singlesignon/id_monitor.go @@ -36,19 +36,9 @@ func ParseMonitorID(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MonitorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - return &id, nil + return nil } // ValidateMonitorID checks that 'input' can be parsed as a Monitor ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/singlesignon/id_singlesignonconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/singlesignon/id_singlesignonconfiguration.go index a20e52c32363..dc39e12ece42 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/singlesignon/id_singlesignonconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/singlesignon/id_singlesignonconfiguration.go @@ -38,23 +38,9 @@ func ParseSingleSignOnConfigurationID(input string) (*SingleSignOnConfigurationI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SingleSignOnConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) - } - - if id.SingleSignOnConfigurationName, ok = parsed.Parsed["singleSignOnConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "singleSignOnConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSingleSignOnConfigurationIDInsensitively(input string) (*SingleSignOnC return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SingleSignOnConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SingleSignOnConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - if id.SingleSignOnConfigurationName, ok = parsed.Parsed["singleSignOnConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "singleSignOnConfigurationName", *parsed) + if id.SingleSignOnConfigurationName, ok = input.Parsed["singleSignOnConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "singleSignOnConfigurationName", input) } - return &id, nil + return nil } // ValidateSingleSignOnConfigurationID checks that 'input' can be parsed as a Single Sign On Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/factories/id_factory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/factories/id_factory.go index b17f4b5c2e88..b766e311fb2e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/factories/id_factory.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/factories/id_factory.go @@ -36,19 +36,9 @@ func ParseFactoryID(input string) (*FactoryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FactoryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FactoryName, ok = parsed.Parsed["factoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "factoryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FactoryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FactoryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FactoryName, ok = parsed.Parsed["factoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "factoryName", *parsed) + if id.FactoryName, ok = input.Parsed["factoryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "factoryName", input) } - return &id, nil + return nil } // ValidateFactoryID checks that 'input' can be parsed as a Factory ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/factories/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/factories/id_location.go index 33ed5b5089f4..bc709adf10a5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/factories/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/factories/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationId, ok = parsed.Parsed["locationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationId, ok = parsed.Parsed["locationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationId", *parsed) + if id.LocationId, ok = input.Parsed["locationId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationId", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedprivateendpoints/id_managedprivateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedprivateendpoints/id_managedprivateendpoint.go index ecf3547d2b51..5308e6fe45ac 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedprivateendpoints/id_managedprivateendpoint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedprivateendpoints/id_managedprivateendpoint.go @@ -40,27 +40,9 @@ func ParseManagedPrivateEndpointID(input string) (*ManagedPrivateEndpointId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedPrivateEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FactoryName, ok = parsed.Parsed["factoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "factoryName", *parsed) - } - - if id.ManagedVirtualNetworkName, ok = parsed.Parsed["managedVirtualNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedVirtualNetworkName", *parsed) - } - - if id.ManagedPrivateEndpointName, ok = parsed.Parsed["managedPrivateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedPrivateEndpointName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseManagedPrivateEndpointIDInsensitively(input string) (*ManagedPrivateEn return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedPrivateEndpointId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ManagedPrivateEndpointId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FactoryName, ok = parsed.Parsed["factoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "factoryName", *parsed) + if id.FactoryName, ok = input.Parsed["factoryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "factoryName", input) } - if id.ManagedVirtualNetworkName, ok = parsed.Parsed["managedVirtualNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedVirtualNetworkName", *parsed) + if id.ManagedVirtualNetworkName, ok = input.Parsed["managedVirtualNetworkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedVirtualNetworkName", input) } - if id.ManagedPrivateEndpointName, ok = parsed.Parsed["managedPrivateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedPrivateEndpointName", *parsed) + if id.ManagedPrivateEndpointName, ok = input.Parsed["managedPrivateEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedPrivateEndpointName", input) } - return &id, nil + return nil } // ValidateManagedPrivateEndpointID checks that 'input' can be parsed as a Managed Private Endpoint ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedprivateendpoints/id_managedvirtualnetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedprivateendpoints/id_managedvirtualnetwork.go index 6a3aed5c5256..3bf1c0d131f4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedprivateendpoints/id_managedvirtualnetwork.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedprivateendpoints/id_managedvirtualnetwork.go @@ -38,23 +38,9 @@ func ParseManagedVirtualNetworkID(input string) (*ManagedVirtualNetworkId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedVirtualNetworkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FactoryName, ok = parsed.Parsed["factoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "factoryName", *parsed) - } - - if id.ManagedVirtualNetworkName, ok = parsed.Parsed["managedVirtualNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedVirtualNetworkName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseManagedVirtualNetworkIDInsensitively(input string) (*ManagedVirtualNet return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedVirtualNetworkId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ManagedVirtualNetworkId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FactoryName, ok = parsed.Parsed["factoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "factoryName", *parsed) + if id.FactoryName, ok = input.Parsed["factoryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "factoryName", input) } - if id.ManagedVirtualNetworkName, ok = parsed.Parsed["managedVirtualNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedVirtualNetworkName", *parsed) + if id.ManagedVirtualNetworkName, ok = input.Parsed["managedVirtualNetworkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedVirtualNetworkName", input) } - return &id, nil + return nil } // ValidateManagedVirtualNetworkID checks that 'input' can be parsed as a Managed Virtual Network ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/id_factory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/id_factory.go index 1364a5f7f472..954327b02377 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/id_factory.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/id_factory.go @@ -36,19 +36,9 @@ func ParseFactoryID(input string) (*FactoryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FactoryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FactoryName, ok = parsed.Parsed["factoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "factoryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FactoryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FactoryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FactoryName, ok = parsed.Parsed["factoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "factoryName", *parsed) + if id.FactoryName, ok = input.Parsed["factoryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "factoryName", input) } - return &id, nil + return nil } // ValidateFactoryID checks that 'input' can be parsed as a Factory ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/id_managedvirtualnetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/id_managedvirtualnetwork.go index 4e9c01a19365..2a6e35cfcdb5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/id_managedvirtualnetwork.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/id_managedvirtualnetwork.go @@ -38,23 +38,9 @@ func ParseManagedVirtualNetworkID(input string) (*ManagedVirtualNetworkId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedVirtualNetworkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FactoryName, ok = parsed.Parsed["factoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "factoryName", *parsed) - } - - if id.ManagedVirtualNetworkName, ok = parsed.Parsed["managedVirtualNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedVirtualNetworkName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseManagedVirtualNetworkIDInsensitively(input string) (*ManagedVirtualNet return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedVirtualNetworkId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ManagedVirtualNetworkId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FactoryName, ok = parsed.Parsed["factoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "factoryName", *parsed) + if id.FactoryName, ok = input.Parsed["factoryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "factoryName", input) } - if id.ManagedVirtualNetworkName, ok = parsed.Parsed["managedVirtualNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedVirtualNetworkName", *parsed) + if id.ManagedVirtualNetworkName, ok = input.Parsed["managedVirtualNetworkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedVirtualNetworkName", input) } - return &id, nil + return nil } // ValidateManagedVirtualNetworkID checks that 'input' can be parsed as a Managed Virtual Network ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/projectresource/id_project.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/projectresource/id_project.go index 4c2e34433e99..58a495e7c53b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/projectresource/id_project.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/projectresource/id_project.go @@ -38,23 +38,9 @@ func ParseProjectID(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProjectId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if id.ProjectName, ok = input.Parsed["projectName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "projectName", input) } - return &id, nil + return nil } // ValidateProjectID checks that 'input' can be parsed as a Project ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/projectresource/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/projectresource/id_service.go index 73311ba86256..a8ea11d90ff5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/projectresource/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/projectresource/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/serviceresource/id_project.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/serviceresource/id_project.go index 8bb57a1432d9..b8b736c65ad8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/serviceresource/id_project.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/serviceresource/id_project.go @@ -38,23 +38,9 @@ func ParseProjectID(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) - } - - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProjectId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if id.ProjectName, ok = input.Parsed["projectName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "projectName", input) } - return &id, nil + return nil } // ValidateProjectID checks that 'input' can be parsed as a Project ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/serviceresource/id_resourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/serviceresource/id_resourcegroup.go index edee5aba35cc..6ffd61eefcef 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/serviceresource/id_resourcegroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/serviceresource/id_resourcegroup.go @@ -34,15 +34,9 @@ func ParseResourceGroupID(input string) (*ResourceGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ResourceGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseResourceGroupIDInsensitively(input string) (*ResourceGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ResourceGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ResourceGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - return &id, nil + return nil } // ValidateResourceGroupID checks that 'input' can be parsed as a Resource Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/serviceresource/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/serviceresource/id_service.go index dd3a2f5f3417..53645707db49 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/serviceresource/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/serviceresource/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backupinstances/id_backupinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backupinstances/id_backupinstance.go index c4cac4c11667..2ed30ac32148 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backupinstances/id_backupinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backupinstances/id_backupinstance.go @@ -38,23 +38,9 @@ func ParseBackupInstanceID(input string) (*BackupInstanceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupInstanceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BackupVaultName, ok = parsed.Parsed["backupVaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", *parsed) - } - - if id.BackupInstanceName, ok = parsed.Parsed["backupInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupInstanceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseBackupInstanceIDInsensitively(input string) (*BackupInstanceId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BackupInstanceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.BackupVaultName, ok = parsed.Parsed["backupVaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", *parsed) + if id.BackupVaultName, ok = input.Parsed["backupVaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", input) } - if id.BackupInstanceName, ok = parsed.Parsed["backupInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupInstanceName", *parsed) + if id.BackupInstanceName, ok = input.Parsed["backupInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupInstanceName", input) } - return &id, nil + return nil } // ValidateBackupInstanceID checks that 'input' can be parsed as a Backup Instance ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backupinstances/id_backupvault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backupinstances/id_backupvault.go index 8c5066717dff..51e9b47f9af7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backupinstances/id_backupvault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backupinstances/id_backupvault.go @@ -36,19 +36,9 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupVaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BackupVaultName, ok = parsed.Parsed["backupVaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupVaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *BackupVaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.BackupVaultName, ok = parsed.Parsed["backupVaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", *parsed) + if id.BackupVaultName, ok = input.Parsed["backupVaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", input) } - return &id, nil + return nil } // ValidateBackupVaultID checks that 'input' can be parsed as a Backup Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backuppolicies/id_backuppolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backuppolicies/id_backuppolicy.go index ffa3a9a836f4..8403e90a879e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backuppolicies/id_backuppolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backuppolicies/id_backuppolicy.go @@ -38,23 +38,9 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BackupVaultName, ok = parsed.Parsed["backupVaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", *parsed) - } - - if id.BackupPolicyName, ok = parsed.Parsed["backupPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BackupPolicyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.BackupVaultName, ok = parsed.Parsed["backupVaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", *parsed) + if id.BackupVaultName, ok = input.Parsed["backupVaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", input) } - if id.BackupPolicyName, ok = parsed.Parsed["backupPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupPolicyName", *parsed) + if id.BackupPolicyName, ok = input.Parsed["backupPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupPolicyName", input) } - return &id, nil + return nil } // ValidateBackupPolicyID checks that 'input' can be parsed as a Backup Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backuppolicies/id_backupvault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backuppolicies/id_backupvault.go index 34bc1350ce43..de03baab418d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backuppolicies/id_backupvault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backuppolicies/id_backupvault.go @@ -36,19 +36,9 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupVaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BackupVaultName, ok = parsed.Parsed["backupVaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupVaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *BackupVaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.BackupVaultName, ok = parsed.Parsed["backupVaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", *parsed) + if id.BackupVaultName, ok = input.Parsed["backupVaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", input) } - return &id, nil + return nil } // ValidateBackupVaultID checks that 'input' can be parsed as a Backup Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backupvaults/id_backupvault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backupvaults/id_backupvault.go index 9f16ee084a45..b2cb37557bf5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backupvaults/id_backupvault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backupvaults/id_backupvault.go @@ -36,19 +36,9 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupVaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BackupVaultName, ok = parsed.Parsed["backupVaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupVaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *BackupVaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.BackupVaultName, ok = parsed.Parsed["backupVaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", *parsed) + if id.BackupVaultName, ok = input.Parsed["backupVaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupVaultName", input) } - return &id, nil + return nil } // ValidateBackupVaultID checks that 'input' can be parsed as a Backup Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backupvaults/id_providerlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backupvaults/id_providerlocation.go index a14a842db5e5..ade2d54f0fcb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backupvaults/id_providerlocation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/backupvaults/id_providerlocation.go @@ -36,19 +36,9 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProviderLocationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_deleteprotecteditemrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_deleteprotecteditemrequest.go index 03c016a126df..077bf5a8c057 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_deleteprotecteditemrequest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_deleteprotecteditemrequest.go @@ -38,23 +38,9 @@ func ParseDeleteProtectedItemRequestID(input string) (*DeleteProtectedItemReques return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeleteProtectedItemRequestId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ResourceGuardName, ok = parsed.Parsed["resourceGuardName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", *parsed) - } - - if id.DeleteProtectedItemRequestName, ok = parsed.Parsed["deleteProtectedItemRequestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deleteProtectedItemRequestName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDeleteProtectedItemRequestIDInsensitively(input string) (*DeleteProtec return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeleteProtectedItemRequestId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DeleteProtectedItemRequestId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ResourceGuardName, ok = parsed.Parsed["resourceGuardName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", *parsed) + if id.ResourceGuardName, ok = input.Parsed["resourceGuardName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", input) } - if id.DeleteProtectedItemRequestName, ok = parsed.Parsed["deleteProtectedItemRequestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deleteProtectedItemRequestName", *parsed) + if id.DeleteProtectedItemRequestName, ok = input.Parsed["deleteProtectedItemRequestName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "deleteProtectedItemRequestName", input) } - return &id, nil + return nil } // ValidateDeleteProtectedItemRequestID checks that 'input' can be parsed as a Delete Protected Item Request ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_deleteresourceguardproxyrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_deleteresourceguardproxyrequest.go index e622080b39e1..3bdca535a6f7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_deleteresourceguardproxyrequest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_deleteresourceguardproxyrequest.go @@ -38,23 +38,9 @@ func ParseDeleteResourceGuardProxyRequestID(input string) (*DeleteResourceGuardP return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeleteResourceGuardProxyRequestId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ResourceGuardName, ok = parsed.Parsed["resourceGuardName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", *parsed) - } - - if id.DeleteResourceGuardProxyRequestName, ok = parsed.Parsed["deleteResourceGuardProxyRequestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deleteResourceGuardProxyRequestName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDeleteResourceGuardProxyRequestIDInsensitively(input string) (*DeleteR return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeleteResourceGuardProxyRequestId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DeleteResourceGuardProxyRequestId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ResourceGuardName, ok = parsed.Parsed["resourceGuardName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", *parsed) + if id.ResourceGuardName, ok = input.Parsed["resourceGuardName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", input) } - if id.DeleteResourceGuardProxyRequestName, ok = parsed.Parsed["deleteResourceGuardProxyRequestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deleteResourceGuardProxyRequestName", *parsed) + if id.DeleteResourceGuardProxyRequestName, ok = input.Parsed["deleteResourceGuardProxyRequestName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "deleteResourceGuardProxyRequestName", input) } - return &id, nil + return nil } // ValidateDeleteResourceGuardProxyRequestID checks that 'input' can be parsed as a Delete Resource Guard Proxy Request ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_disablesoftdeleterequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_disablesoftdeleterequest.go index cbd2f1974af3..51e4b8a6126c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_disablesoftdeleterequest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_disablesoftdeleterequest.go @@ -38,23 +38,9 @@ func ParseDisableSoftDeleteRequestID(input string) (*DisableSoftDeleteRequestId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DisableSoftDeleteRequestId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ResourceGuardName, ok = parsed.Parsed["resourceGuardName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", *parsed) - } - - if id.DisableSoftDeleteRequestName, ok = parsed.Parsed["disableSoftDeleteRequestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "disableSoftDeleteRequestName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDisableSoftDeleteRequestIDInsensitively(input string) (*DisableSoftDel return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DisableSoftDeleteRequestId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DisableSoftDeleteRequestId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ResourceGuardName, ok = parsed.Parsed["resourceGuardName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", *parsed) + if id.ResourceGuardName, ok = input.Parsed["resourceGuardName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", input) } - if id.DisableSoftDeleteRequestName, ok = parsed.Parsed["disableSoftDeleteRequestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "disableSoftDeleteRequestName", *parsed) + if id.DisableSoftDeleteRequestName, ok = input.Parsed["disableSoftDeleteRequestName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "disableSoftDeleteRequestName", input) } - return &id, nil + return nil } // ValidateDisableSoftDeleteRequestID checks that 'input' can be parsed as a Disable Soft Delete Request ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_getbackupsecuritypinrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_getbackupsecuritypinrequest.go index 8af3cb7a2a0a..5c057ffdbc9c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_getbackupsecuritypinrequest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_getbackupsecuritypinrequest.go @@ -38,23 +38,9 @@ func ParseGetBackupSecurityPINRequestID(input string) (*GetBackupSecurityPINRequ return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GetBackupSecurityPINRequestId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ResourceGuardName, ok = parsed.Parsed["resourceGuardName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", *parsed) - } - - if id.GetBackupSecurityPINRequestName, ok = parsed.Parsed["getBackupSecurityPINRequestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "getBackupSecurityPINRequestName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseGetBackupSecurityPINRequestIDInsensitively(input string) (*GetBackupSe return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GetBackupSecurityPINRequestId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *GetBackupSecurityPINRequestId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ResourceGuardName, ok = parsed.Parsed["resourceGuardName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", *parsed) + if id.ResourceGuardName, ok = input.Parsed["resourceGuardName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", input) } - if id.GetBackupSecurityPINRequestName, ok = parsed.Parsed["getBackupSecurityPINRequestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "getBackupSecurityPINRequestName", *parsed) + if id.GetBackupSecurityPINRequestName, ok = input.Parsed["getBackupSecurityPINRequestName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "getBackupSecurityPINRequestName", input) } - return &id, nil + return nil } // ValidateGetBackupSecurityPINRequestID checks that 'input' can be parsed as a Get Backup Security P I N Request ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_resourceguard.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_resourceguard.go index c8fab0d7a99a..e6e61f5477f9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_resourceguard.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_resourceguard.go @@ -36,19 +36,9 @@ func ParseResourceGuardID(input string) (*ResourceGuardId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ResourceGuardId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ResourceGuardName, ok = parsed.Parsed["resourceGuardName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseResourceGuardIDInsensitively(input string) (*ResourceGuardId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ResourceGuardId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ResourceGuardId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ResourceGuardName, ok = parsed.Parsed["resourceGuardName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", *parsed) + if id.ResourceGuardName, ok = input.Parsed["resourceGuardName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", input) } - return &id, nil + return nil } // ValidateResourceGuardID checks that 'input' can be parsed as a Resource Guard ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_updateprotecteditemrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_updateprotecteditemrequest.go index 27b184462b68..0010cc6cb2f7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_updateprotecteditemrequest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_updateprotecteditemrequest.go @@ -38,23 +38,9 @@ func ParseUpdateProtectedItemRequestID(input string) (*UpdateProtectedItemReques return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UpdateProtectedItemRequestId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ResourceGuardName, ok = parsed.Parsed["resourceGuardName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", *parsed) - } - - if id.UpdateProtectedItemRequestName, ok = parsed.Parsed["updateProtectedItemRequestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "updateProtectedItemRequestName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseUpdateProtectedItemRequestIDInsensitively(input string) (*UpdateProtec return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UpdateProtectedItemRequestId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *UpdateProtectedItemRequestId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ResourceGuardName, ok = parsed.Parsed["resourceGuardName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", *parsed) + if id.ResourceGuardName, ok = input.Parsed["resourceGuardName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", input) } - if id.UpdateProtectedItemRequestName, ok = parsed.Parsed["updateProtectedItemRequestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "updateProtectedItemRequestName", *parsed) + if id.UpdateProtectedItemRequestName, ok = input.Parsed["updateProtectedItemRequestName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "updateProtectedItemRequestName", input) } - return &id, nil + return nil } // ValidateUpdateProtectedItemRequestID checks that 'input' can be parsed as a Update Protected Item Request ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_updateprotectionpolicyrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_updateprotectionpolicyrequest.go index e6be01e67c37..3dd15fab9135 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_updateprotectionpolicyrequest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2022-04-01/resourceguards/id_updateprotectionpolicyrequest.go @@ -38,23 +38,9 @@ func ParseUpdateProtectionPolicyRequestID(input string) (*UpdateProtectionPolicy return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UpdateProtectionPolicyRequestId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ResourceGuardName, ok = parsed.Parsed["resourceGuardName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", *parsed) - } - - if id.UpdateProtectionPolicyRequestName, ok = parsed.Parsed["updateProtectionPolicyRequestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "updateProtectionPolicyRequestName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseUpdateProtectionPolicyRequestIDInsensitively(input string) (*UpdatePro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UpdateProtectionPolicyRequestId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *UpdateProtectionPolicyRequestId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ResourceGuardName, ok = parsed.Parsed["resourceGuardName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", *parsed) + if id.ResourceGuardName, ok = input.Parsed["resourceGuardName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGuardName", input) } - if id.UpdateProtectionPolicyRequestName, ok = parsed.Parsed["updateProtectionPolicyRequestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "updateProtectionPolicyRequestName", *parsed) + if id.UpdateProtectionPolicyRequestName, ok = input.Parsed["updateProtectionPolicyRequestName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "updateProtectionPolicyRequestName", input) } - return &id, nil + return nil } // ValidateUpdateProtectionPolicyRequestID checks that 'input' can be parsed as a Update Protection Policy Request ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/account/id_account.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/account/id_account.go index 4298bb5d1ac3..177ad85a4903 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/account/id_account.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/account/id_account.go @@ -36,19 +36,9 @@ func ParseAccountID(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - return &id, nil + return nil } // ValidateAccountID checks that 'input' can be parsed as a Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/dataset/id_dataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/dataset/id_dataset.go index 4b460fd7b152..e4038261eb1a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/dataset/id_dataset.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/dataset/id_dataset.go @@ -40,27 +40,9 @@ func ParseDataSetID(input string) (*DataSetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataSetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) - } - - if id.ShareName, ok = parsed.Parsed["shareName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "shareName", *parsed) - } - - if id.DataSetName, ok = parsed.Parsed["dataSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataSetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseDataSetIDInsensitively(input string) (*DataSetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataSetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *DataSetId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - if id.ShareName, ok = parsed.Parsed["shareName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "shareName", *parsed) + if id.ShareName, ok = input.Parsed["shareName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "shareName", input) } - if id.DataSetName, ok = parsed.Parsed["dataSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataSetName", *parsed) + if id.DataSetName, ok = input.Parsed["dataSetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dataSetName", input) } - return &id, nil + return nil } // ValidateDataSetID checks that 'input' can be parsed as a Data Set ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/dataset/id_share.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/dataset/id_share.go index 0d6f24f29bef..dfcd82c0e076 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/dataset/id_share.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/dataset/id_share.go @@ -38,23 +38,9 @@ func ParseShareID(input string) (*ShareId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ShareId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) - } - - if id.ShareName, ok = parsed.Parsed["shareName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "shareName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseShareIDInsensitively(input string) (*ShareId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ShareId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ShareId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - if id.ShareName, ok = parsed.Parsed["shareName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "shareName", *parsed) + if id.ShareName, ok = input.Parsed["shareName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "shareName", input) } - return &id, nil + return nil } // ValidateShareID checks that 'input' can be parsed as a Share ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/share/id_account.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/share/id_account.go index 6b7ca31b4231..09697cc9dbe2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/share/id_account.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/share/id_account.go @@ -36,19 +36,9 @@ func ParseAccountID(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - return &id, nil + return nil } // ValidateAccountID checks that 'input' can be parsed as a Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/share/id_providersharesubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/share/id_providersharesubscription.go index 0ea3bfdd0321..af44deabf5f8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/share/id_providersharesubscription.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/share/id_providersharesubscription.go @@ -40,27 +40,9 @@ func ParseProviderShareSubscriptionID(input string) (*ProviderShareSubscriptionI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderShareSubscriptionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) - } - - if id.ShareName, ok = parsed.Parsed["shareName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "shareName", *parsed) - } - - if id.ProviderShareSubscriptionId, ok = parsed.Parsed["providerShareSubscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "providerShareSubscriptionId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseProviderShareSubscriptionIDInsensitively(input string) (*ProviderShare return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderShareSubscriptionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ProviderShareSubscriptionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - if id.ShareName, ok = parsed.Parsed["shareName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "shareName", *parsed) + if id.ShareName, ok = input.Parsed["shareName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "shareName", input) } - if id.ProviderShareSubscriptionId, ok = parsed.Parsed["providerShareSubscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "providerShareSubscriptionId", *parsed) + if id.ProviderShareSubscriptionId, ok = input.Parsed["providerShareSubscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "providerShareSubscriptionId", input) } - return &id, nil + return nil } // ValidateProviderShareSubscriptionID checks that 'input' can be parsed as a Provider Share Subscription ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/share/id_share.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/share/id_share.go index e7fc90ee7fdb..4f23535a3449 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/share/id_share.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/share/id_share.go @@ -38,23 +38,9 @@ func ParseShareID(input string) (*ShareId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ShareId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) - } - - if id.ShareName, ok = parsed.Parsed["shareName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "shareName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseShareIDInsensitively(input string) (*ShareId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ShareId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ShareId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - if id.ShareName, ok = parsed.Parsed["shareName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "shareName", *parsed) + if id.ShareName, ok = input.Parsed["shareName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "shareName", input) } - return &id, nil + return nil } // ValidateShareID checks that 'input' can be parsed as a Share ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/synchronizationsetting/id_share.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/synchronizationsetting/id_share.go index 6355fef50466..5231ed81336d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/synchronizationsetting/id_share.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/synchronizationsetting/id_share.go @@ -38,23 +38,9 @@ func ParseShareID(input string) (*ShareId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ShareId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) - } - - if id.ShareName, ok = parsed.Parsed["shareName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "shareName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseShareIDInsensitively(input string) (*ShareId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ShareId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ShareId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - if id.ShareName, ok = parsed.Parsed["shareName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "shareName", *parsed) + if id.ShareName, ok = input.Parsed["shareName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "shareName", input) } - return &id, nil + return nil } // ValidateShareID checks that 'input' can be parsed as a Share ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/synchronizationsetting/id_synchronizationsetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/synchronizationsetting/id_synchronizationsetting.go index fbf9a57d492a..4c8deb139e08 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/synchronizationsetting/id_synchronizationsetting.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/synchronizationsetting/id_synchronizationsetting.go @@ -40,27 +40,9 @@ func ParseSynchronizationSettingID(input string) (*SynchronizationSettingId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SynchronizationSettingId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) - } - - if id.ShareName, ok = parsed.Parsed["shareName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "shareName", *parsed) - } - - if id.SynchronizationSettingName, ok = parsed.Parsed["synchronizationSettingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "synchronizationSettingName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseSynchronizationSettingIDInsensitively(input string) (*SynchronizationS return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SynchronizationSettingId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *SynchronizationSettingId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - if id.ShareName, ok = parsed.Parsed["shareName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "shareName", *parsed) + if id.ShareName, ok = input.Parsed["shareName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "shareName", input) } - if id.SynchronizationSettingName, ok = parsed.Parsed["synchronizationSettingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "synchronizationSettingName", *parsed) + if id.SynchronizationSettingName, ok = input.Parsed["synchronizationSettingName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "synchronizationSettingName", input) } - return &id, nil + return nil } // ValidateSynchronizationSettingID checks that 'input' can be parsed as a Synchronization Setting ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/id_applicationgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/id_applicationgroup.go index 763845e0e9b9..6637983e5811 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/id_applicationgroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/id_applicationgroup.go @@ -36,19 +36,9 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGroupName, ok = parsed.Parsed["applicationGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ApplicationGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ApplicationGroupName, ok = parsed.Parsed["applicationGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", *parsed) + if id.ApplicationGroupName, ok = input.Parsed["applicationGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", input) } - return &id, nil + return nil } // ValidateApplicationGroupID checks that 'input' can be parsed as a Application Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/id_hostpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/id_hostpool.go index 152224130b15..aa2786ca0ccb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/id_hostpool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/id_hostpool.go @@ -36,19 +36,9 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HostPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.HostPoolName, ok = parsed.Parsed["hostPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hostPoolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HostPoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *HostPoolId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.HostPoolName, ok = parsed.Parsed["hostPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hostPoolName", *parsed) + if id.HostPoolName, ok = input.Parsed["hostPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hostPoolName", input) } - return &id, nil + return nil } // ValidateHostPoolID checks that 'input' can be parsed as a Host Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/id_workspace.go index 2512237f2a5e..f96275299333 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/application/id_application.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/application/id_application.go index 17c0d9e28f33..3b7ffbaa1070 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/application/id_application.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/application/id_application.go @@ -38,23 +38,9 @@ func ParseApplicationID(input string) (*ApplicationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGroupName, ok = parsed.Parsed["applicationGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", *parsed) - } - - if id.ApplicationName, ok = parsed.Parsed["applicationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApplicationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ApplicationGroupName, ok = parsed.Parsed["applicationGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", *parsed) + if id.ApplicationGroupName, ok = input.Parsed["applicationGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", input) } - if id.ApplicationName, ok = parsed.Parsed["applicationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationName", *parsed) + if id.ApplicationName, ok = input.Parsed["applicationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationName", input) } - return &id, nil + return nil } // ValidateApplicationID checks that 'input' can be parsed as a Application ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/application/id_applicationgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/application/id_applicationgroup.go index c08ebfa9f68e..914b1c118c76 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/application/id_applicationgroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/application/id_applicationgroup.go @@ -36,19 +36,9 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGroupName, ok = parsed.Parsed["applicationGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ApplicationGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ApplicationGroupName, ok = parsed.Parsed["applicationGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", *parsed) + if id.ApplicationGroupName, ok = input.Parsed["applicationGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", input) } - return &id, nil + return nil } // ValidateApplicationGroupID checks that 'input' can be parsed as a Application Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/id_applicationgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/id_applicationgroup.go index 763845e0e9b9..6637983e5811 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/id_applicationgroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/id_applicationgroup.go @@ -36,19 +36,9 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGroupName, ok = parsed.Parsed["applicationGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ApplicationGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ApplicationGroupName, ok = parsed.Parsed["applicationGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", *parsed) + if id.ApplicationGroupName, ok = input.Parsed["applicationGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", input) } - return &id, nil + return nil } // ValidateApplicationGroupID checks that 'input' can be parsed as a Application Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/id_applicationgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/id_applicationgroup.go index e9e2160d2ddd..d7f3e3db720f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/id_applicationgroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/id_applicationgroup.go @@ -36,19 +36,9 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGroupName, ok = parsed.Parsed["applicationGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ApplicationGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ApplicationGroupName, ok = parsed.Parsed["applicationGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", *parsed) + if id.ApplicationGroupName, ok = input.Parsed["applicationGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", input) } - return &id, nil + return nil } // ValidateApplicationGroupID checks that 'input' can be parsed as a Application Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/id_desktop.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/id_desktop.go index ddd70187bca9..4d5c78a8b539 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/id_desktop.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/id_desktop.go @@ -38,23 +38,9 @@ func ParseDesktopID(input string) (*DesktopId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DesktopId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGroupName, ok = parsed.Parsed["applicationGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", *parsed) - } - - if id.DesktopName, ok = parsed.Parsed["desktopName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "desktopName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDesktopIDInsensitively(input string) (*DesktopId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DesktopId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DesktopId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ApplicationGroupName, ok = parsed.Parsed["applicationGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", *parsed) + if id.ApplicationGroupName, ok = input.Parsed["applicationGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationGroupName", input) } - if id.DesktopName, ok = parsed.Parsed["desktopName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "desktopName", *parsed) + if id.DesktopName, ok = input.Parsed["desktopName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "desktopName", input) } - return &id, nil + return nil } // ValidateDesktopID checks that 'input' can be parsed as a Desktop ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/id_hostpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/id_hostpool.go index 152224130b15..aa2786ca0ccb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/id_hostpool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/id_hostpool.go @@ -36,19 +36,9 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HostPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.HostPoolName, ok = parsed.Parsed["hostPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hostPoolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HostPoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *HostPoolId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.HostPoolName, ok = parsed.Parsed["hostPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hostPoolName", *parsed) + if id.HostPoolName, ok = input.Parsed["hostPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hostPoolName", input) } - return &id, nil + return nil } // ValidateHostPoolID checks that 'input' can be parsed as a Host Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/id_hostpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/id_hostpool.go index 2644a463e378..cc5a710488c2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/id_hostpool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/id_hostpool.go @@ -36,19 +36,9 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HostPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.HostPoolName, ok = parsed.Parsed["hostPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hostPoolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HostPoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *HostPoolId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.HostPoolName, ok = parsed.Parsed["hostPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hostPoolName", *parsed) + if id.HostPoolName, ok = input.Parsed["hostPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hostPoolName", input) } - return &id, nil + return nil } // ValidateHostPoolID checks that 'input' can be parsed as a Host Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/id_scalingplan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/id_scalingplan.go index b887400c4bfe..dc5a9ff54685 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/id_scalingplan.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/id_scalingplan.go @@ -36,19 +36,9 @@ func ParseScalingPlanID(input string) (*ScalingPlanId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScalingPlanId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ScalingPlanName, ok = parsed.Parsed["scalingPlanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scalingPlanName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseScalingPlanIDInsensitively(input string) (*ScalingPlanId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScalingPlanId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ScalingPlanId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ScalingPlanName, ok = parsed.Parsed["scalingPlanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scalingPlanName", *parsed) + if id.ScalingPlanName, ok = input.Parsed["scalingPlanName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scalingPlanName", input) } - return &id, nil + return nil } // ValidateScalingPlanID checks that 'input' can be parsed as a Scaling Plan ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/id_hostpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/id_hostpool.go index 368c87025ada..f03ed7ff2176 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/id_hostpool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/id_hostpool.go @@ -36,19 +36,9 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HostPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.HostPoolName, ok = parsed.Parsed["hostPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hostPoolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HostPoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *HostPoolId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.HostPoolName, ok = parsed.Parsed["hostPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hostPoolName", *parsed) + if id.HostPoolName, ok = input.Parsed["hostPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hostPoolName", input) } - return &id, nil + return nil } // ValidateHostPoolID checks that 'input' can be parsed as a Host Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/id_sessionhost.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/id_sessionhost.go index ef439b473cc5..b35ccefa84c9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/id_sessionhost.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/id_sessionhost.go @@ -38,23 +38,9 @@ func ParseSessionHostID(input string) (*SessionHostId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SessionHostId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.HostPoolName, ok = parsed.Parsed["hostPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hostPoolName", *parsed) - } - - if id.SessionHostName, ok = parsed.Parsed["sessionHostName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sessionHostName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSessionHostIDInsensitively(input string) (*SessionHostId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SessionHostId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SessionHostId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.HostPoolName, ok = parsed.Parsed["hostPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hostPoolName", *parsed) + if id.HostPoolName, ok = input.Parsed["hostPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hostPoolName", input) } - if id.SessionHostName, ok = parsed.Parsed["sessionHostName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sessionHostName", *parsed) + if id.SessionHostName, ok = input.Parsed["sessionHostName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sessionHostName", input) } - return &id, nil + return nil } // ValidateSessionHostID checks that 'input' can be parsed as a Session Host ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/id_workspace.go index 2512237f2a5e..f96275299333 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/attachednetworkconnections/id_devcenter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/attachednetworkconnections/id_devcenter.go index d10f31983598..384cc44955ef 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/attachednetworkconnections/id_devcenter.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/attachednetworkconnections/id_devcenter.go @@ -36,19 +36,9 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DevCenterId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if id.DevCenterName, ok = input.Parsed["devCenterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", input) } - return &id, nil + return nil } // ValidateDevCenterID checks that 'input' can be parsed as a Dev Center ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/attachednetworkconnections/id_project.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/attachednetworkconnections/id_project.go index 6077761c94db..c8d64d345c9a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/attachednetworkconnections/id_project.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/attachednetworkconnections/id_project.go @@ -36,19 +36,9 @@ func ParseProjectID(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProjectId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if id.ProjectName, ok = input.Parsed["projectName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "projectName", input) } - return &id, nil + return nil } // ValidateProjectID checks that 'input' can be parsed as a Project ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/catalogs/id_catalog.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/catalogs/id_catalog.go index 62b73a20d671..748920bbaf20 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/catalogs/id_catalog.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/catalogs/id_catalog.go @@ -38,23 +38,9 @@ func ParseCatalogID(input string) (*CatalogId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CatalogId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) - } - - if id.CatalogName, ok = parsed.Parsed["catalogName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "catalogName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCatalogIDInsensitively(input string) (*CatalogId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CatalogId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CatalogId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if id.DevCenterName, ok = input.Parsed["devCenterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", input) } - if id.CatalogName, ok = parsed.Parsed["catalogName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "catalogName", *parsed) + if id.CatalogName, ok = input.Parsed["catalogName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "catalogName", input) } - return &id, nil + return nil } // ValidateCatalogID checks that 'input' can be parsed as a Catalog ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/catalogs/id_devcenter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/catalogs/id_devcenter.go index 54ac9062aa95..299da2f856a5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/catalogs/id_devcenter.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/catalogs/id_devcenter.go @@ -36,19 +36,9 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DevCenterId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if id.DevCenterName, ok = input.Parsed["devCenterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", input) } - return &id, nil + return nil } // ValidateDevCenterID checks that 'input' can be parsed as a Dev Center ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devboxdefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devboxdefinition.go index 913218923657..9c3cf898d689 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devboxdefinition.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devboxdefinition.go @@ -38,23 +38,9 @@ func ParseDevBoxDefinitionID(input string) (*DevBoxDefinitionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevBoxDefinitionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) - } - - if id.DevBoxDefinitionName, ok = parsed.Parsed["devBoxDefinitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devBoxDefinitionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDevBoxDefinitionIDInsensitively(input string) (*DevBoxDefinitionId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevBoxDefinitionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DevBoxDefinitionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if id.ProjectName, ok = input.Parsed["projectName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "projectName", input) } - if id.DevBoxDefinitionName, ok = parsed.Parsed["devBoxDefinitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devBoxDefinitionName", *parsed) + if id.DevBoxDefinitionName, ok = input.Parsed["devBoxDefinitionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devBoxDefinitionName", input) } - return &id, nil + return nil } // ValidateDevBoxDefinitionID checks that 'input' can be parsed as a Dev Box Definition ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devcenter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devcenter.go index c571bfdc3dcb..3dd2f9b92717 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devcenter.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devcenter.go @@ -36,19 +36,9 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DevCenterId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if id.DevCenterName, ok = input.Parsed["devCenterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", input) } - return &id, nil + return nil } // ValidateDevCenterID checks that 'input' can be parsed as a Dev Center ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devcenterdevboxdefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devcenterdevboxdefinition.go index 917703ae8426..7249a567810d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devcenterdevboxdefinition.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devcenterdevboxdefinition.go @@ -38,23 +38,9 @@ func ParseDevCenterDevBoxDefinitionID(input string) (*DevCenterDevBoxDefinitionI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterDevBoxDefinitionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) - } - - if id.DevBoxDefinitionName, ok = parsed.Parsed["devBoxDefinitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devBoxDefinitionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDevCenterDevBoxDefinitionIDInsensitively(input string) (*DevCenterDevB return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterDevBoxDefinitionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DevCenterDevBoxDefinitionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if id.DevCenterName, ok = input.Parsed["devCenterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", input) } - if id.DevBoxDefinitionName, ok = parsed.Parsed["devBoxDefinitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devBoxDefinitionName", *parsed) + if id.DevBoxDefinitionName, ok = input.Parsed["devBoxDefinitionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devBoxDefinitionName", input) } - return &id, nil + return nil } // ValidateDevCenterDevBoxDefinitionID checks that 'input' can be parsed as a Dev Center Dev Box Definition ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_project.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_project.go index 5d536974588c..0f2dec6c8ff3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_project.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_project.go @@ -36,19 +36,9 @@ func ParseProjectID(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProjectId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if id.ProjectName, ok = input.Parsed["projectName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "projectName", input) } - return &id, nil + return nil } // ValidateProjectID checks that 'input' can be parsed as a Project ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devcenters/id_devcenter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devcenters/id_devcenter.go index 1eb7247b57e2..90ac4f924e70 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devcenters/id_devcenter.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devcenters/id_devcenter.go @@ -36,19 +36,9 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DevCenterId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if id.DevCenterName, ok = input.Parsed["devCenterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", input) } - return &id, nil + return nil } // ValidateDevCenterID checks that 'input' can be parsed as a Dev Center ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_allowedenvironmenttype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_allowedenvironmenttype.go index 75209a71179b..9f2897f9297d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_allowedenvironmenttype.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_allowedenvironmenttype.go @@ -38,23 +38,9 @@ func ParseAllowedEnvironmentTypeID(input string) (*AllowedEnvironmentTypeId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AllowedEnvironmentTypeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) - } - - if id.AllowedEnvironmentTypeName, ok = parsed.Parsed["allowedEnvironmentTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "allowedEnvironmentTypeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAllowedEnvironmentTypeIDInsensitively(input string) (*AllowedEnvironme return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AllowedEnvironmentTypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AllowedEnvironmentTypeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if id.ProjectName, ok = input.Parsed["projectName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "projectName", input) } - if id.AllowedEnvironmentTypeName, ok = parsed.Parsed["allowedEnvironmentTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "allowedEnvironmentTypeName", *parsed) + if id.AllowedEnvironmentTypeName, ok = input.Parsed["allowedEnvironmentTypeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "allowedEnvironmentTypeName", input) } - return &id, nil + return nil } // ValidateAllowedEnvironmentTypeID checks that 'input' can be parsed as a Allowed Environment Type ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_devcenter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_devcenter.go index 999d24e11397..fd8b312fef87 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_devcenter.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_devcenter.go @@ -36,19 +36,9 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DevCenterId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if id.DevCenterName, ok = input.Parsed["devCenterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", input) } - return &id, nil + return nil } // ValidateDevCenterID checks that 'input' can be parsed as a Dev Center ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_devcenterenvironmenttype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_devcenterenvironmenttype.go index 47d83c11e81d..c3a479242ccc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_devcenterenvironmenttype.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_devcenterenvironmenttype.go @@ -38,23 +38,9 @@ func ParseDevCenterEnvironmentTypeID(input string) (*DevCenterEnvironmentTypeId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterEnvironmentTypeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) - } - - if id.EnvironmentTypeName, ok = parsed.Parsed["environmentTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentTypeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDevCenterEnvironmentTypeIDInsensitively(input string) (*DevCenterEnvir return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterEnvironmentTypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DevCenterEnvironmentTypeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if id.DevCenterName, ok = input.Parsed["devCenterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", input) } - if id.EnvironmentTypeName, ok = parsed.Parsed["environmentTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentTypeName", *parsed) + if id.EnvironmentTypeName, ok = input.Parsed["environmentTypeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "environmentTypeName", input) } - return &id, nil + return nil } // ValidateDevCenterEnvironmentTypeID checks that 'input' can be parsed as a Dev Center Environment Type ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_environmenttype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_environmenttype.go index 6c54f3980823..4e4d4e1be5fc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_environmenttype.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_environmenttype.go @@ -38,23 +38,9 @@ func ParseEnvironmentTypeID(input string) (*EnvironmentTypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EnvironmentTypeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) - } - - if id.EnvironmentTypeName, ok = parsed.Parsed["environmentTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentTypeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseEnvironmentTypeIDInsensitively(input string) (*EnvironmentTypeId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EnvironmentTypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *EnvironmentTypeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if id.ProjectName, ok = input.Parsed["projectName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "projectName", input) } - if id.EnvironmentTypeName, ok = parsed.Parsed["environmentTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentTypeName", *parsed) + if id.EnvironmentTypeName, ok = input.Parsed["environmentTypeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "environmentTypeName", input) } - return &id, nil + return nil } // ValidateEnvironmentTypeID checks that 'input' can be parsed as a Environment Type ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_project.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_project.go index 43521e3430f0..20f5d24e5a87 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_project.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes/id_project.go @@ -36,19 +36,9 @@ func ParseProjectID(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProjectId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if id.ProjectName, ok = input.Parsed["projectName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "projectName", input) } - return &id, nil + return nil } // ValidateProjectID checks that 'input' can be parsed as a Project ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/galleries/id_devcenter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/galleries/id_devcenter.go index 03b7882c490c..02da15d02a4e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/galleries/id_devcenter.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/galleries/id_devcenter.go @@ -36,19 +36,9 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DevCenterId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if id.DevCenterName, ok = input.Parsed["devCenterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", input) } - return &id, nil + return nil } // ValidateDevCenterID checks that 'input' can be parsed as a Dev Center ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/galleries/id_gallery.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/galleries/id_gallery.go index 10248bcc2b63..e1068fdd6ae7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/galleries/id_gallery.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/galleries/id_gallery.go @@ -38,23 +38,9 @@ func ParseGalleryID(input string) (*GalleryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GalleryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) - } - - if id.GalleryName, ok = parsed.Parsed["galleryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "galleryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseGalleryIDInsensitively(input string) (*GalleryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GalleryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *GalleryId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if id.DevCenterName, ok = input.Parsed["devCenterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", input) } - if id.GalleryName, ok = parsed.Parsed["galleryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "galleryName", *parsed) + if id.GalleryName, ok = input.Parsed["galleryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "galleryName", input) } - return &id, nil + return nil } // ValidateGalleryID checks that 'input' can be parsed as a Gallery ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/images/id_devcenter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/images/id_devcenter.go index ae656ee6b8ce..95d75862b605 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/images/id_devcenter.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/images/id_devcenter.go @@ -36,19 +36,9 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DevCenterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DevCenterId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if id.DevCenterName, ok = input.Parsed["devCenterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", input) } - return &id, nil + return nil } // ValidateDevCenterID checks that 'input' can be parsed as a Dev Center ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/images/id_gallery.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/images/id_gallery.go index 87dac792f9e1..b1e324077c12 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/images/id_gallery.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/images/id_gallery.go @@ -38,23 +38,9 @@ func ParseGalleryID(input string) (*GalleryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GalleryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) - } - - if id.GalleryName, ok = parsed.Parsed["galleryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "galleryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseGalleryIDInsensitively(input string) (*GalleryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GalleryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *GalleryId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if id.DevCenterName, ok = input.Parsed["devCenterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", input) } - if id.GalleryName, ok = parsed.Parsed["galleryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "galleryName", *parsed) + if id.GalleryName, ok = input.Parsed["galleryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "galleryName", input) } - return &id, nil + return nil } // ValidateGalleryID checks that 'input' can be parsed as a Gallery ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/images/id_image.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/images/id_image.go index de29160d74ee..4d1a46e1238d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/images/id_image.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/images/id_image.go @@ -40,27 +40,9 @@ func ParseImageID(input string) (*ImageId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ImageId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) - } - - if id.GalleryName, ok = parsed.Parsed["galleryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "galleryName", *parsed) - } - - if id.ImageName, ok = parsed.Parsed["imageName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "imageName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ImageId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ImageId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if id.DevCenterName, ok = input.Parsed["devCenterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", input) } - if id.GalleryName, ok = parsed.Parsed["galleryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "galleryName", *parsed) + if id.GalleryName, ok = input.Parsed["galleryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "galleryName", input) } - if id.ImageName, ok = parsed.Parsed["imageName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "imageName", *parsed) + if id.ImageName, ok = input.Parsed["imageName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "imageName", input) } - return &id, nil + return nil } // ValidateImageID checks that 'input' can be parsed as a Image ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/imageversions/id_image.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/imageversions/id_image.go index fdb553f931cd..c5810d02b1b9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/imageversions/id_image.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/imageversions/id_image.go @@ -40,27 +40,9 @@ func ParseImageID(input string) (*ImageId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ImageId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) - } - - if id.GalleryName, ok = parsed.Parsed["galleryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "galleryName", *parsed) - } - - if id.ImageName, ok = parsed.Parsed["imageName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "imageName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ImageId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ImageId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if id.DevCenterName, ok = input.Parsed["devCenterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", input) } - if id.GalleryName, ok = parsed.Parsed["galleryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "galleryName", *parsed) + if id.GalleryName, ok = input.Parsed["galleryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "galleryName", input) } - if id.ImageName, ok = parsed.Parsed["imageName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "imageName", *parsed) + if id.ImageName, ok = input.Parsed["imageName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "imageName", input) } - return &id, nil + return nil } // ValidateImageID checks that 'input' can be parsed as a Image ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/imageversions/id_version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/imageversions/id_version.go index 534c86d9c168..745c1a4a0d1e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/imageversions/id_version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/imageversions/id_version.go @@ -42,31 +42,9 @@ func ParseVersionID(input string) (*VersionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VersionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) - } - - if id.GalleryName, ok = parsed.Parsed["galleryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "galleryName", *parsed) - } - - if id.ImageName, ok = parsed.Parsed["imageName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "imageName", *parsed) - } - - if id.VersionName, ok = parsed.Parsed["versionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "versionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VersionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VersionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DevCenterName, ok = parsed.Parsed["devCenterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", *parsed) + if id.DevCenterName, ok = input.Parsed["devCenterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "devCenterName", input) } - if id.GalleryName, ok = parsed.Parsed["galleryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "galleryName", *parsed) + if id.GalleryName, ok = input.Parsed["galleryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "galleryName", input) } - if id.ImageName, ok = parsed.Parsed["imageName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "imageName", *parsed) + if id.ImageName, ok = input.Parsed["imageName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "imageName", input) } - if id.VersionName, ok = parsed.Parsed["versionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "versionName", *parsed) + if id.VersionName, ok = input.Parsed["versionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "versionName", input) } - return &id, nil + return nil } // ValidateVersionID checks that 'input' can be parsed as a Version ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/networkconnection/id_networkconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/networkconnection/id_networkconnection.go index 93a5d77141af..146138808271 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/networkconnection/id_networkconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/networkconnection/id_networkconnection.go @@ -36,19 +36,9 @@ func ParseNetworkConnectionID(input string) (*NetworkConnectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkConnectionName, ok = parsed.Parsed["networkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkConnectionIDInsensitively(input string) (*NetworkConnectionId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkConnectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkConnectionName, ok = parsed.Parsed["networkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkConnectionName", *parsed) + if id.NetworkConnectionName, ok = input.Parsed["networkConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkConnectionName", input) } - return &id, nil + return nil } // ValidateNetworkConnectionID checks that 'input' can be parsed as a Network Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/networkconnections/id_networkconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/networkconnections/id_networkconnection.go index 435f2eeccbbf..8730bbb9c6ac 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/networkconnections/id_networkconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/networkconnections/id_networkconnection.go @@ -36,19 +36,9 @@ func ParseNetworkConnectionID(input string) (*NetworkConnectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkConnectionName, ok = parsed.Parsed["networkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkConnectionIDInsensitively(input string) (*NetworkConnectionId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkConnectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkConnectionName, ok = parsed.Parsed["networkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkConnectionName", *parsed) + if id.NetworkConnectionName, ok = input.Parsed["networkConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkConnectionName", input) } - return &id, nil + return nil } // ValidateNetworkConnectionID checks that 'input' can be parsed as a Network Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/pools/id_pool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/pools/id_pool.go index b20ae1e3519d..383968aa902c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/pools/id_pool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/pools/id_pool.go @@ -38,23 +38,9 @@ func ParsePoolID(input string) (*PoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) - } - - if id.PoolName, ok = parsed.Parsed["poolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "poolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePoolIDInsensitively(input string) (*PoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PoolId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if id.ProjectName, ok = input.Parsed["projectName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "projectName", input) } - if id.PoolName, ok = parsed.Parsed["poolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "poolName", *parsed) + if id.PoolName, ok = input.Parsed["poolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "poolName", input) } - return &id, nil + return nil } // ValidatePoolID checks that 'input' can be parsed as a Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/pools/id_project.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/pools/id_project.go index 2743f7304c1b..5d850ddf8127 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/pools/id_project.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/pools/id_project.go @@ -36,19 +36,9 @@ func ParseProjectID(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProjectId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if id.ProjectName, ok = input.Parsed["projectName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "projectName", input) } - return &id, nil + return nil } // ValidateProjectID checks that 'input' can be parsed as a Project ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/projects/id_project.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/projects/id_project.go index cb3d588b5999..196652951dfd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/projects/id_project.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/projects/id_project.go @@ -36,19 +36,9 @@ func ParseProjectID(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProjectId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if id.ProjectName, ok = input.Parsed["projectName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "projectName", input) } - return &id, nil + return nil } // ValidateProjectID checks that 'input' can be parsed as a Project ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/schedules/id_pool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/schedules/id_pool.go index dd060649a217..9db8c01e57ad 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/schedules/id_pool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/schedules/id_pool.go @@ -38,23 +38,9 @@ func ParsePoolID(input string) (*PoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) - } - - if id.PoolName, ok = parsed.Parsed["poolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "poolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePoolIDInsensitively(input string) (*PoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PoolId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if id.ProjectName, ok = input.Parsed["projectName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "projectName", input) } - if id.PoolName, ok = parsed.Parsed["poolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "poolName", *parsed) + if id.PoolName, ok = input.Parsed["poolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "poolName", input) } - return &id, nil + return nil } // ValidatePoolID checks that 'input' can be parsed as a Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/schedules/id_schedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/schedules/id_schedule.go index ba6137f557c8..7b5649ee4f63 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/schedules/id_schedule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/schedules/id_schedule.go @@ -40,27 +40,9 @@ func ParseScheduleID(input string) (*ScheduleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScheduleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) - } - - if id.PoolName, ok = parsed.Parsed["poolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "poolName", *parsed) - } - - if id.ScheduleName, ok = parsed.Parsed["scheduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseScheduleIDInsensitively(input string) (*ScheduleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScheduleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ScheduleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if id.ProjectName, ok = input.Parsed["projectName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "projectName", input) } - if id.PoolName, ok = parsed.Parsed["poolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "poolName", *parsed) + if id.PoolName, ok = input.Parsed["poolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "poolName", input) } - if id.ScheduleName, ok = parsed.Parsed["scheduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduleName", *parsed) + if id.ScheduleName, ok = input.Parsed["scheduleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scheduleName", input) } - return &id, nil + return nil } // ValidateScheduleID checks that 'input' can be parsed as a Schedule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/usages/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/usages/id_location.go index 8dc59d59501e..f012f63156e2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/usages/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/usages/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/id_certificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/id_certificate.go index eecb3831c499..13a77c09e668 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/id_certificate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/id_certificate.go @@ -38,23 +38,9 @@ func ParseCertificateID(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ProvisioningServiceName, ok = parsed.Parsed["provisioningServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "provisioningServiceName", *parsed) - } - - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CertificateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ProvisioningServiceName, ok = parsed.Parsed["provisioningServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "provisioningServiceName", *parsed) + if id.ProvisioningServiceName, ok = input.Parsed["provisioningServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "provisioningServiceName", input) } - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if id.CertificateName, ok = input.Parsed["certificateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "certificateName", input) } - return &id, nil + return nil } // ValidateCertificateID checks that 'input' can be parsed as a Certificate ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_key.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_key.go index 6a03e2b99b1e..968fce9f20e9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_key.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_key.go @@ -38,23 +38,9 @@ func ParseKeyID(input string) (*KeyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := KeyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ProvisioningServiceName, ok = parsed.Parsed["provisioningServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "provisioningServiceName", *parsed) - } - - if id.KeyName, ok = parsed.Parsed["keyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "keyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseKeyIDInsensitively(input string) (*KeyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := KeyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *KeyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ProvisioningServiceName, ok = parsed.Parsed["provisioningServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "provisioningServiceName", *parsed) + if id.ProvisioningServiceName, ok = input.Parsed["provisioningServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "provisioningServiceName", input) } - if id.KeyName, ok = parsed.Parsed["keyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "keyName", *parsed) + if id.KeyName, ok = input.Parsed["keyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "keyName", input) } - return &id, nil + return nil } // ValidateKeyID checks that 'input' can be parsed as a Key ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_privateendpointconnection.go index a485c59f97f4..38dfef06abfa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_privateendpointconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_privateendpointconnection.go @@ -38,23 +38,9 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ProvisioningServiceName, ok = parsed.Parsed["provisioningServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "provisioningServiceName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ProvisioningServiceName, ok = parsed.Parsed["provisioningServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "provisioningServiceName", *parsed) + if id.ProvisioningServiceName, ok = input.Parsed["provisioningServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "provisioningServiceName", input) } - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", input) } - return &id, nil + return nil } // ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_privatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_privatelinkresource.go index d79ead17d346..d06c05b69b21 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_privatelinkresource.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_privatelinkresource.go @@ -38,23 +38,9 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateLinkResourceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ProvisioningServiceName, ok = parsed.Parsed["provisioningServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "provisioningServiceName", *parsed) - } - - if id.GroupId, ok = parsed.Parsed["groupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "groupId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateLinkResourceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateLinkResourceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ProvisioningServiceName, ok = parsed.Parsed["provisioningServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "provisioningServiceName", *parsed) + if id.ProvisioningServiceName, ok = input.Parsed["provisioningServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "provisioningServiceName", input) } - if id.GroupId, ok = parsed.Parsed["groupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "groupId", *parsed) + if id.GroupId, ok = input.Parsed["groupId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "groupId", input) } - return &id, nil + return nil } // ValidatePrivateLinkResourceID checks that 'input' can be parsed as a Private Link Resource ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_account.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_account.go index 8645fd52b9a2..c4bd0b2f7b5e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_account.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_account.go @@ -36,19 +36,9 @@ func ParseAccountID(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - return &id, nil + return nil } // ValidateAccountID checks that 'input' can be parsed as a Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_instance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_instance.go index c19f0242c1d3..1cf80c08ff87 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_instance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_instance.go @@ -38,23 +38,9 @@ func ParseInstanceID(input string) (*InstanceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := InstanceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) - } - - if id.InstanceName, ok = parsed.Parsed["instanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "instanceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseInstanceIDInsensitively(input string) (*InstanceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := InstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *InstanceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - if id.InstanceName, ok = parsed.Parsed["instanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "instanceName", *parsed) + if id.InstanceName, ok = input.Parsed["instanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "instanceName", input) } - return &id, nil + return nil } // ValidateInstanceID checks that 'input' can be parsed as a Instance ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_privateendpointconnectionproxy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_privateendpointconnectionproxy.go index 7baef5b28d15..b5e1cb6659fb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_privateendpointconnectionproxy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_privateendpointconnectionproxy.go @@ -38,23 +38,9 @@ func ParsePrivateEndpointConnectionProxyID(input string) (*PrivateEndpointConnec return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionProxyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) - } - - if id.PrivateEndpointConnectionProxyId, ok = parsed.Parsed["privateEndpointConnectionProxyId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionProxyId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrivateEndpointConnectionProxyIDInsensitively(input string) (*PrivateE return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionProxyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointConnectionProxyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - if id.PrivateEndpointConnectionProxyId, ok = parsed.Parsed["privateEndpointConnectionProxyId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionProxyId", *parsed) + if id.PrivateEndpointConnectionProxyId, ok = input.Parsed["privateEndpointConnectionProxyId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionProxyId", input) } - return &id, nil + return nil } // ValidatePrivateEndpointConnectionProxyID checks that 'input' can be parsed as a Private Endpoint Connection Proxy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/globalschedules/id_schedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/globalschedules/id_schedule.go index 71a507fad8d7..eb0db1e60628 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/globalschedules/id_schedule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/globalschedules/id_schedule.go @@ -36,19 +36,9 @@ func ParseScheduleID(input string) (*ScheduleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScheduleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ScheduleName, ok = parsed.Parsed["scheduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseScheduleIDInsensitively(input string) (*ScheduleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScheduleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ScheduleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ScheduleName, ok = parsed.Parsed["scheduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduleName", *parsed) + if id.ScheduleName, ok = input.Parsed["scheduleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scheduleName", input) } - return &id, nil + return nil } // ValidateScheduleID checks that 'input' can be parsed as a Schedule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/labs/id_lab.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/labs/id_lab.go index 942d12834e99..76d466c56b20 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/labs/id_lab.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/labs/id_lab.go @@ -36,19 +36,9 @@ func ParseLabID(input string) (*LabId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LabId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if id.LabName, ok = input.Parsed["labName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) } - return &id, nil + return nil } // ValidateLabID checks that 'input' can be parsed as a Lab ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/policies/id_policy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/policies/id_policy.go index 2d548b94aa48..9c202d116b22 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/policies/id_policy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/policies/id_policy.go @@ -40,27 +40,9 @@ func ParsePolicyID(input string) (*PolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) - } - - if id.PolicySetName, ok = parsed.Parsed["policySetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "policySetName", *parsed) - } - - if id.PolicyName, ok = parsed.Parsed["policyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "policyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParsePolicyIDInsensitively(input string) (*PolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *PolicyId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if id.LabName, ok = input.Parsed["labName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) } - if id.PolicySetName, ok = parsed.Parsed["policySetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "policySetName", *parsed) + if id.PolicySetName, ok = input.Parsed["policySetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "policySetName", input) } - if id.PolicyName, ok = parsed.Parsed["policyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "policyName", *parsed) + if id.PolicyName, ok = input.Parsed["policyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "policyName", input) } - return &id, nil + return nil } // ValidatePolicyID checks that 'input' can be parsed as a Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/policies/id_policyset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/policies/id_policyset.go index da2e94d399b1..da11e80e1714 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/policies/id_policyset.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/policies/id_policyset.go @@ -38,23 +38,9 @@ func ParsePolicySetID(input string) (*PolicySetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PolicySetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) - } - - if id.PolicySetName, ok = parsed.Parsed["policySetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "policySetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePolicySetIDInsensitively(input string) (*PolicySetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PolicySetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PolicySetId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if id.LabName, ok = input.Parsed["labName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) } - if id.PolicySetName, ok = parsed.Parsed["policySetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "policySetName", *parsed) + if id.PolicySetName, ok = input.Parsed["policySetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "policySetName", input) } - return &id, nil + return nil } // ValidatePolicySetID checks that 'input' can be parsed as a Policy Set ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/schedules/id_lab.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/schedules/id_lab.go index e923df4e9355..94255f896b6a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/schedules/id_lab.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/schedules/id_lab.go @@ -36,19 +36,9 @@ func ParseLabID(input string) (*LabId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LabId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if id.LabName, ok = input.Parsed["labName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) } - return &id, nil + return nil } // ValidateLabID checks that 'input' can be parsed as a Lab ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/schedules/id_labschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/schedules/id_labschedule.go index b5742f0e4bc2..453d9bd2c59a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/schedules/id_labschedule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/schedules/id_labschedule.go @@ -38,23 +38,9 @@ func ParseLabScheduleID(input string) (*LabScheduleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabScheduleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) - } - - if id.ScheduleName, ok = parsed.Parsed["scheduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLabScheduleIDInsensitively(input string) (*LabScheduleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabScheduleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LabScheduleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if id.LabName, ok = input.Parsed["labName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) } - if id.ScheduleName, ok = parsed.Parsed["scheduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduleName", *parsed) + if id.ScheduleName, ok = input.Parsed["scheduleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scheduleName", input) } - return &id, nil + return nil } // ValidateLabScheduleID checks that 'input' can be parsed as a Lab Schedule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualmachines/id_lab.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualmachines/id_lab.go index e3fa6aeafa86..56c60ad05cde 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualmachines/id_lab.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualmachines/id_lab.go @@ -36,19 +36,9 @@ func ParseLabID(input string) (*LabId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LabId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if id.LabName, ok = input.Parsed["labName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) } - return &id, nil + return nil } // ValidateLabID checks that 'input' can be parsed as a Lab ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualmachines/id_virtualmachine.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualmachines/id_virtualmachine.go index e7bdcaf025d7..bc78618a129c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualmachines/id_virtualmachine.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualmachines/id_virtualmachine.go @@ -38,23 +38,9 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualMachineId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) - } - - if id.VirtualMachineName, ok = parsed.Parsed["virtualMachineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualMachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VirtualMachineId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if id.LabName, ok = input.Parsed["labName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) } - if id.VirtualMachineName, ok = parsed.Parsed["virtualMachineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", *parsed) + if id.VirtualMachineName, ok = input.Parsed["virtualMachineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", input) } - return &id, nil + return nil } // ValidateVirtualMachineID checks that 'input' can be parsed as a Virtual Machine ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualnetworks/id_lab.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualnetworks/id_lab.go index a88c8097bb75..64bcf79c4f18 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualnetworks/id_lab.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualnetworks/id_lab.go @@ -36,19 +36,9 @@ func ParseLabID(input string) (*LabId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LabId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if id.LabName, ok = input.Parsed["labName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) } - return &id, nil + return nil } // ValidateLabID checks that 'input' can be parsed as a Lab ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualnetworks/id_virtualnetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualnetworks/id_virtualnetwork.go index 614c6f171b15..977d2e578071 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualnetworks/id_virtualnetwork.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualnetworks/id_virtualnetwork.go @@ -38,23 +38,9 @@ func ParseVirtualNetworkID(input string) (*VirtualNetworkId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) - } - - if id.VirtualNetworkName, ok = parsed.Parsed["virtualNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseVirtualNetworkIDInsensitively(input string) (*VirtualNetworkId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VirtualNetworkId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if id.LabName, ok = input.Parsed["labName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) } - if id.VirtualNetworkName, ok = parsed.Parsed["virtualNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkName", *parsed) + if id.VirtualNetworkName, ok = input.Parsed["virtualNetworkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkName", input) } - return &id, nil + return nil } // ValidateVirtualNetworkID checks that 'input' can be parsed as a Virtual Network ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/id_digitaltwinsinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/id_digitaltwinsinstance.go index c31c9503ed79..8d26366babc3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/id_digitaltwinsinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/id_digitaltwinsinstance.go @@ -36,19 +36,9 @@ func ParseDigitalTwinsInstanceID(input string) (*DigitalTwinsInstanceId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DigitalTwinsInstanceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DigitalTwinsInstanceName, ok = parsed.Parsed["digitalTwinsInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "digitalTwinsInstanceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDigitalTwinsInstanceIDInsensitively(input string) (*DigitalTwinsInstan return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DigitalTwinsInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DigitalTwinsInstanceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DigitalTwinsInstanceName, ok = parsed.Parsed["digitalTwinsInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "digitalTwinsInstanceName", *parsed) + if id.DigitalTwinsInstanceName, ok = input.Parsed["digitalTwinsInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "digitalTwinsInstanceName", input) } - return &id, nil + return nil } // ValidateDigitalTwinsInstanceID checks that 'input' can be parsed as a Digital Twins Instance ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/endpoints/id_digitaltwinsinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/endpoints/id_digitaltwinsinstance.go index ebd06264c6c8..335e119d7746 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/endpoints/id_digitaltwinsinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/endpoints/id_digitaltwinsinstance.go @@ -36,19 +36,9 @@ func ParseDigitalTwinsInstanceID(input string) (*DigitalTwinsInstanceId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DigitalTwinsInstanceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DigitalTwinsInstanceName, ok = parsed.Parsed["digitalTwinsInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "digitalTwinsInstanceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDigitalTwinsInstanceIDInsensitively(input string) (*DigitalTwinsInstan return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DigitalTwinsInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DigitalTwinsInstanceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DigitalTwinsInstanceName, ok = parsed.Parsed["digitalTwinsInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "digitalTwinsInstanceName", *parsed) + if id.DigitalTwinsInstanceName, ok = input.Parsed["digitalTwinsInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "digitalTwinsInstanceName", input) } - return &id, nil + return nil } // ValidateDigitalTwinsInstanceID checks that 'input' can be parsed as a Digital Twins Instance ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/endpoints/id_endpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/endpoints/id_endpoint.go index e400d6363c1e..164a98c7ec0f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/endpoints/id_endpoint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/endpoints/id_endpoint.go @@ -38,23 +38,9 @@ func ParseEndpointID(input string) (*EndpointId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DigitalTwinsInstanceName, ok = parsed.Parsed["digitalTwinsInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "digitalTwinsInstanceName", *parsed) - } - - if id.EndpointName, ok = parsed.Parsed["endpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "endpointName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseEndpointIDInsensitively(input string) (*EndpointId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EndpointId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *EndpointId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DigitalTwinsInstanceName, ok = parsed.Parsed["digitalTwinsInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "digitalTwinsInstanceName", *parsed) + if id.DigitalTwinsInstanceName, ok = input.Parsed["digitalTwinsInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "digitalTwinsInstanceName", input) } - if id.EndpointName, ok = parsed.Parsed["endpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "endpointName", *parsed) + if id.EndpointName, ok = input.Parsed["endpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "endpointName", input) } - return &id, nil + return nil } // ValidateEndpointID checks that 'input' can be parsed as a Endpoint ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/id_digitaltwinsinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/id_digitaltwinsinstance.go index 54ce9ef2f076..4cbe50bec06d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/id_digitaltwinsinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/id_digitaltwinsinstance.go @@ -36,19 +36,9 @@ func ParseDigitalTwinsInstanceID(input string) (*DigitalTwinsInstanceId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DigitalTwinsInstanceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DigitalTwinsInstanceName, ok = parsed.Parsed["digitalTwinsInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "digitalTwinsInstanceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDigitalTwinsInstanceIDInsensitively(input string) (*DigitalTwinsInstan return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DigitalTwinsInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DigitalTwinsInstanceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DigitalTwinsInstanceName, ok = parsed.Parsed["digitalTwinsInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "digitalTwinsInstanceName", *parsed) + if id.DigitalTwinsInstanceName, ok = input.Parsed["digitalTwinsInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "digitalTwinsInstanceName", input) } - return &id, nil + return nil } // ValidateDigitalTwinsInstanceID checks that 'input' can be parsed as a Digital Twins Instance ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/id_timeseriesdatabaseconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/id_timeseriesdatabaseconnection.go index 44d963c66fe8..b94813526264 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/id_timeseriesdatabaseconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/id_timeseriesdatabaseconnection.go @@ -38,23 +38,9 @@ func ParseTimeSeriesDatabaseConnectionID(input string) (*TimeSeriesDatabaseConne return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TimeSeriesDatabaseConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DigitalTwinsInstanceName, ok = parsed.Parsed["digitalTwinsInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "digitalTwinsInstanceName", *parsed) - } - - if id.TimeSeriesDatabaseConnectionName, ok = parsed.Parsed["timeSeriesDatabaseConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "timeSeriesDatabaseConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTimeSeriesDatabaseConnectionIDInsensitively(input string) (*TimeSeries return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TimeSeriesDatabaseConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TimeSeriesDatabaseConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DigitalTwinsInstanceName, ok = parsed.Parsed["digitalTwinsInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "digitalTwinsInstanceName", *parsed) + if id.DigitalTwinsInstanceName, ok = input.Parsed["digitalTwinsInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "digitalTwinsInstanceName", input) } - if id.TimeSeriesDatabaseConnectionName, ok = parsed.Parsed["timeSeriesDatabaseConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "timeSeriesDatabaseConnectionName", *parsed) + if id.TimeSeriesDatabaseConnectionName, ok = input.Parsed["timeSeriesDatabaseConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "timeSeriesDatabaseConnectionName", input) } - return &id, nil + return nil } // ValidateTimeSeriesDatabaseConnectionID checks that 'input' can be parsed as a Time Series Database Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/recordsets/id_dnszone.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/recordsets/id_dnszone.go index cc718e896e3a..cc897d63892e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/recordsets/id_dnszone.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/recordsets/id_dnszone.go @@ -36,19 +36,9 @@ func ParseDnsZoneID(input string) (*DnsZoneId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DnsZoneId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DnsZoneName, ok = parsed.Parsed["dnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsZoneName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDnsZoneIDInsensitively(input string) (*DnsZoneId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DnsZoneId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DnsZoneId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DnsZoneName, ok = parsed.Parsed["dnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsZoneName", *parsed) + if id.DnsZoneName, ok = input.Parsed["dnsZoneName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dnsZoneName", input) } - return &id, nil + return nil } // ValidateDnsZoneID checks that 'input' can be parsed as a Dns Zone ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/recordsets/id_recordtype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/recordsets/id_recordtype.go index df4c2505ff82..402f6227b610 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/recordsets/id_recordtype.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/recordsets/id_recordtype.go @@ -40,35 +40,9 @@ func ParseRecordTypeID(input string) (*RecordTypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RecordTypeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DnsZoneName, ok = parsed.Parsed["dnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsZoneName", *parsed) - } - - if v, ok := parsed.Parsed["recordType"]; true { - if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "recordType", *parsed) - } - - recordType, err := parseRecordType(v) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) - } - id.RecordType = *recordType - } - - if id.RelativeRecordSetName, ok = parsed.Parsed["relativeRecordSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "relativeRecordSetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -83,38 +57,46 @@ func ParseRecordTypeIDInsensitively(input string) (*RecordTypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RecordTypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *RecordTypeId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DnsZoneName, ok = parsed.Parsed["dnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsZoneName", *parsed) + if id.DnsZoneName, ok = input.Parsed["dnsZoneName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dnsZoneName", input) } - if v, ok := parsed.Parsed["recordType"]; true { + if v, ok := input.Parsed["recordType"]; true { if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "recordType", *parsed) + return resourceids.NewSegmentNotSpecifiedError(id, "recordType", input) } recordType, err := parseRecordType(v) if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) + return fmt.Errorf("parsing %q: %+v", v, err) } id.RecordType = *recordType } - if id.RelativeRecordSetName, ok = parsed.Parsed["relativeRecordSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "relativeRecordSetName", *parsed) + if id.RelativeRecordSetName, ok = input.Parsed["relativeRecordSetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "relativeRecordSetName", input) } - return &id, nil + return nil } // ValidateRecordTypeID checks that 'input' can be parsed as a Record Type ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/recordsets/id_zone.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/recordsets/id_zone.go index 1bae4d3bcd72..cc8cd58e42b3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/recordsets/id_zone.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/recordsets/id_zone.go @@ -38,31 +38,9 @@ func ParseZoneID(input string) (*ZoneId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ZoneId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DnsZoneName, ok = parsed.Parsed["dnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsZoneName", *parsed) - } - - if v, ok := parsed.Parsed["recordType"]; true { - if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "recordType", *parsed) - } - - recordType, err := parseRecordType(v) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) - } - id.RecordType = *recordType + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -77,34 +55,42 @@ func ParseZoneIDInsensitively(input string) (*ZoneId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ZoneId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ZoneId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DnsZoneName, ok = parsed.Parsed["dnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsZoneName", *parsed) + if id.DnsZoneName, ok = input.Parsed["dnsZoneName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dnsZoneName", input) } - if v, ok := parsed.Parsed["recordType"]; true { + if v, ok := input.Parsed["recordType"]; true { if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "recordType", *parsed) + return resourceids.NewSegmentNotSpecifiedError(id, "recordType", input) } recordType, err := parseRecordType(v) if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) + return fmt.Errorf("parsing %q: %+v", v, err) } id.RecordType = *recordType } - return &id, nil + return nil } // ValidateZoneID checks that 'input' can be parsed as a Zone ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/zones/id_dnszone.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/zones/id_dnszone.go index a77b87a0da69..08066365b613 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/zones/id_dnszone.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/zones/id_dnszone.go @@ -36,19 +36,9 @@ func ParseDnsZoneID(input string) (*DnsZoneId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DnsZoneId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DnsZoneName, ok = parsed.Parsed["dnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsZoneName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDnsZoneIDInsensitively(input string) (*DnsZoneId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DnsZoneId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DnsZoneId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DnsZoneName, ok = parsed.Parsed["dnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsZoneName", *parsed) + if id.DnsZoneName, ok = input.Parsed["dnsZoneName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dnsZoneName", input) } - return &id, nil + return nil } // ValidateDnsZoneID checks that 'input' can be parsed as a Dns Zone ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/id_dnsforwardingruleset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/id_dnsforwardingruleset.go index b1ccd9cb966a..c4d9e81a8ed3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/id_dnsforwardingruleset.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/id_dnsforwardingruleset.go @@ -36,19 +36,9 @@ func ParseDnsForwardingRulesetID(input string) (*DnsForwardingRulesetId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DnsForwardingRulesetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DnsForwardingRulesetName, ok = parsed.Parsed["dnsForwardingRulesetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsForwardingRulesetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDnsForwardingRulesetIDInsensitively(input string) (*DnsForwardingRules return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DnsForwardingRulesetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DnsForwardingRulesetId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DnsForwardingRulesetName, ok = parsed.Parsed["dnsForwardingRulesetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsForwardingRulesetName", *parsed) + if id.DnsForwardingRulesetName, ok = input.Parsed["dnsForwardingRulesetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dnsForwardingRulesetName", input) } - return &id, nil + return nil } // ValidateDnsForwardingRulesetID checks that 'input' can be parsed as a Dns Forwarding Ruleset ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/dnsresolvers/id_dnsresolver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/dnsresolvers/id_dnsresolver.go index 3391ba327baf..3ecc06ccb975 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/dnsresolvers/id_dnsresolver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/dnsresolvers/id_dnsresolver.go @@ -36,19 +36,9 @@ func ParseDnsResolverID(input string) (*DnsResolverId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DnsResolverId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DnsResolverName, ok = parsed.Parsed["dnsResolverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsResolverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDnsResolverIDInsensitively(input string) (*DnsResolverId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DnsResolverId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DnsResolverId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DnsResolverName, ok = parsed.Parsed["dnsResolverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsResolverName", *parsed) + if id.DnsResolverName, ok = input.Parsed["dnsResolverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dnsResolverName", input) } - return &id, nil + return nil } // ValidateDnsResolverID checks that 'input' can be parsed as a Dns Resolver ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/forwardingrules/id_dnsforwardingruleset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/forwardingrules/id_dnsforwardingruleset.go index 90d16dd07fe6..e477672bcf5f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/forwardingrules/id_dnsforwardingruleset.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/forwardingrules/id_dnsforwardingruleset.go @@ -36,19 +36,9 @@ func ParseDnsForwardingRulesetID(input string) (*DnsForwardingRulesetId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DnsForwardingRulesetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DnsForwardingRulesetName, ok = parsed.Parsed["dnsForwardingRulesetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsForwardingRulesetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDnsForwardingRulesetIDInsensitively(input string) (*DnsForwardingRules return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DnsForwardingRulesetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DnsForwardingRulesetId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DnsForwardingRulesetName, ok = parsed.Parsed["dnsForwardingRulesetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsForwardingRulesetName", *parsed) + if id.DnsForwardingRulesetName, ok = input.Parsed["dnsForwardingRulesetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dnsForwardingRulesetName", input) } - return &id, nil + return nil } // ValidateDnsForwardingRulesetID checks that 'input' can be parsed as a Dns Forwarding Ruleset ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/forwardingrules/id_forwardingrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/forwardingrules/id_forwardingrule.go index 27544725a528..ef6fecc29bda 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/forwardingrules/id_forwardingrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/forwardingrules/id_forwardingrule.go @@ -38,23 +38,9 @@ func ParseForwardingRuleID(input string) (*ForwardingRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ForwardingRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DnsForwardingRulesetName, ok = parsed.Parsed["dnsForwardingRulesetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsForwardingRulesetName", *parsed) - } - - if id.ForwardingRuleName, ok = parsed.Parsed["forwardingRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "forwardingRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseForwardingRuleIDInsensitively(input string) (*ForwardingRuleId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ForwardingRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ForwardingRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DnsForwardingRulesetName, ok = parsed.Parsed["dnsForwardingRulesetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsForwardingRulesetName", *parsed) + if id.DnsForwardingRulesetName, ok = input.Parsed["dnsForwardingRulesetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dnsForwardingRulesetName", input) } - if id.ForwardingRuleName, ok = parsed.Parsed["forwardingRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "forwardingRuleName", *parsed) + if id.ForwardingRuleName, ok = input.Parsed["forwardingRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "forwardingRuleName", input) } - return &id, nil + return nil } // ValidateForwardingRuleID checks that 'input' can be parsed as a Forwarding Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/inboundendpoints/id_dnsresolver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/inboundendpoints/id_dnsresolver.go index 039bd670103f..dd1926ef5739 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/inboundendpoints/id_dnsresolver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/inboundendpoints/id_dnsresolver.go @@ -36,19 +36,9 @@ func ParseDnsResolverID(input string) (*DnsResolverId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DnsResolverId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DnsResolverName, ok = parsed.Parsed["dnsResolverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsResolverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDnsResolverIDInsensitively(input string) (*DnsResolverId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DnsResolverId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DnsResolverId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DnsResolverName, ok = parsed.Parsed["dnsResolverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsResolverName", *parsed) + if id.DnsResolverName, ok = input.Parsed["dnsResolverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dnsResolverName", input) } - return &id, nil + return nil } // ValidateDnsResolverID checks that 'input' can be parsed as a Dns Resolver ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/inboundendpoints/id_inboundendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/inboundendpoints/id_inboundendpoint.go index 27009d9b9ab1..4c8c604cd004 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/inboundendpoints/id_inboundendpoint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/inboundendpoints/id_inboundendpoint.go @@ -38,23 +38,9 @@ func ParseInboundEndpointID(input string) (*InboundEndpointId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := InboundEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DnsResolverName, ok = parsed.Parsed["dnsResolverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsResolverName", *parsed) - } - - if id.InboundEndpointName, ok = parsed.Parsed["inboundEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "inboundEndpointName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseInboundEndpointIDInsensitively(input string) (*InboundEndpointId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := InboundEndpointId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *InboundEndpointId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DnsResolverName, ok = parsed.Parsed["dnsResolverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsResolverName", *parsed) + if id.DnsResolverName, ok = input.Parsed["dnsResolverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dnsResolverName", input) } - if id.InboundEndpointName, ok = parsed.Parsed["inboundEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "inboundEndpointName", *parsed) + if id.InboundEndpointName, ok = input.Parsed["inboundEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "inboundEndpointName", input) } - return &id, nil + return nil } // ValidateInboundEndpointID checks that 'input' can be parsed as a Inbound Endpoint ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/outboundendpoints/id_dnsresolver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/outboundendpoints/id_dnsresolver.go index fe96231aeba2..f0dc40cb09a0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/outboundendpoints/id_dnsresolver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/outboundendpoints/id_dnsresolver.go @@ -36,19 +36,9 @@ func ParseDnsResolverID(input string) (*DnsResolverId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DnsResolverId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DnsResolverName, ok = parsed.Parsed["dnsResolverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsResolverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDnsResolverIDInsensitively(input string) (*DnsResolverId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DnsResolverId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DnsResolverId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DnsResolverName, ok = parsed.Parsed["dnsResolverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsResolverName", *parsed) + if id.DnsResolverName, ok = input.Parsed["dnsResolverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dnsResolverName", input) } - return &id, nil + return nil } // ValidateDnsResolverID checks that 'input' can be parsed as a Dns Resolver ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/outboundendpoints/id_outboundendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/outboundendpoints/id_outboundendpoint.go index 77cbcf275296..c26d61b1ca27 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/outboundendpoints/id_outboundendpoint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/outboundendpoints/id_outboundendpoint.go @@ -38,23 +38,9 @@ func ParseOutboundEndpointID(input string) (*OutboundEndpointId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OutboundEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DnsResolverName, ok = parsed.Parsed["dnsResolverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsResolverName", *parsed) - } - - if id.OutboundEndpointName, ok = parsed.Parsed["outboundEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "outboundEndpointName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseOutboundEndpointIDInsensitively(input string) (*OutboundEndpointId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OutboundEndpointId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *OutboundEndpointId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DnsResolverName, ok = parsed.Parsed["dnsResolverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsResolverName", *parsed) + if id.DnsResolverName, ok = input.Parsed["dnsResolverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dnsResolverName", input) } - if id.OutboundEndpointName, ok = parsed.Parsed["outboundEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "outboundEndpointName", *parsed) + if id.OutboundEndpointName, ok = input.Parsed["outboundEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "outboundEndpointName", input) } - return &id, nil + return nil } // ValidateOutboundEndpointID checks that 'input' can be parsed as a Outbound Endpoint ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/id_dnsforwardingruleset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/id_dnsforwardingruleset.go index 45587ad8d279..da9e7d9b720b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/id_dnsforwardingruleset.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/id_dnsforwardingruleset.go @@ -36,19 +36,9 @@ func ParseDnsForwardingRulesetID(input string) (*DnsForwardingRulesetId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DnsForwardingRulesetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DnsForwardingRulesetName, ok = parsed.Parsed["dnsForwardingRulesetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsForwardingRulesetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDnsForwardingRulesetIDInsensitively(input string) (*DnsForwardingRules return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DnsForwardingRulesetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DnsForwardingRulesetId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DnsForwardingRulesetName, ok = parsed.Parsed["dnsForwardingRulesetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsForwardingRulesetName", *parsed) + if id.DnsForwardingRulesetName, ok = input.Parsed["dnsForwardingRulesetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dnsForwardingRulesetName", input) } - return &id, nil + return nil } // ValidateDnsForwardingRulesetID checks that 'input' can be parsed as a Dns Forwarding Ruleset ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/id_virtualnetworklink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/id_virtualnetworklink.go index 09819b7f7b6a..bf1a390b5b8d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/id_virtualnetworklink.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/id_virtualnetworklink.go @@ -38,23 +38,9 @@ func ParseVirtualNetworkLinkID(input string) (*VirtualNetworkLinkId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkLinkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DnsForwardingRulesetName, ok = parsed.Parsed["dnsForwardingRulesetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsForwardingRulesetName", *parsed) - } - - if id.VirtualNetworkLinkName, ok = parsed.Parsed["virtualNetworkLinkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkLinkName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseVirtualNetworkLinkIDInsensitively(input string) (*VirtualNetworkLinkId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkLinkId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VirtualNetworkLinkId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DnsForwardingRulesetName, ok = parsed.Parsed["dnsForwardingRulesetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dnsForwardingRulesetName", *parsed) + if id.DnsForwardingRulesetName, ok = input.Parsed["dnsForwardingRulesetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dnsForwardingRulesetName", input) } - if id.VirtualNetworkLinkName, ok = parsed.Parsed["virtualNetworkLinkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkLinkName", *parsed) + if id.VirtualNetworkLinkName, ok = input.Parsed["virtualNetworkLinkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkLinkName", input) } - return &id, nil + return nil } // ValidateVirtualNetworkLinkID checks that 'input' can be parsed as a Virtual Network Link ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/monitorsresource/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/monitorsresource/id_monitor.go index 58326bc320f2..f67b26f9847f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/monitorsresource/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/monitorsresource/id_monitor.go @@ -36,19 +36,9 @@ func ParseMonitorID(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MonitorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - return &id, nil + return nil } // ValidateMonitorID checks that 'input' can be parsed as a Monitor ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/rules/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/rules/id_monitor.go index 208708f17e8f..b67ae298da5a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/rules/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/rules/id_monitor.go @@ -36,19 +36,9 @@ func ParseMonitorID(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MonitorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - return &id, nil + return nil } // ValidateMonitorID checks that 'input' can be parsed as a Monitor ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/rules/id_tagrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/rules/id_tagrule.go index 9ab8251afc6c..57e670f42517 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/rules/id_tagrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/rules/id_tagrule.go @@ -38,23 +38,9 @@ func ParseTagRuleID(input string) (*TagRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TagRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) - } - - if id.TagRuleName, ok = parsed.Parsed["tagRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTagRuleIDInsensitively(input string) (*TagRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TagRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TagRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - if id.TagRuleName, ok = parsed.Parsed["tagRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagRuleName", *parsed) + if id.TagRuleName, ok = input.Parsed["tagRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "tagRuleName", input) } - return &id, nil + return nil } // ValidateTagRuleID checks that 'input' can be parsed as a Tag Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/channels/id_channel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/channels/id_channel.go index 00257b5be5ab..b8b9316013bb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/channels/id_channel.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/channels/id_channel.go @@ -38,23 +38,9 @@ func ParseChannelID(input string) (*ChannelId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ChannelId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PartnerNamespaceName, ok = parsed.Parsed["partnerNamespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partnerNamespaceName", *parsed) - } - - if id.ChannelName, ok = parsed.Parsed["channelName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "channelName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseChannelIDInsensitively(input string) (*ChannelId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ChannelId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ChannelId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PartnerNamespaceName, ok = parsed.Parsed["partnerNamespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partnerNamespaceName", *parsed) + if id.PartnerNamespaceName, ok = input.Parsed["partnerNamespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "partnerNamespaceName", input) } - if id.ChannelName, ok = parsed.Parsed["channelName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "channelName", *parsed) + if id.ChannelName, ok = input.Parsed["channelName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "channelName", input) } - return &id, nil + return nil } // ValidateChannelID checks that 'input' can be parsed as a Channel ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/channels/id_partnernamespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/channels/id_partnernamespace.go index 734df4dc5955..d5d9be59ad3c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/channels/id_partnernamespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/channels/id_partnernamespace.go @@ -36,19 +36,9 @@ func ParsePartnerNamespaceID(input string) (*PartnerNamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartnerNamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PartnerNamespaceName, ok = parsed.Parsed["partnerNamespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partnerNamespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePartnerNamespaceIDInsensitively(input string) (*PartnerNamespaceId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartnerNamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PartnerNamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PartnerNamespaceName, ok = parsed.Parsed["partnerNamespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partnerNamespaceName", *parsed) + if id.PartnerNamespaceName, ok = input.Parsed["partnerNamespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "partnerNamespaceName", input) } - return &id, nil + return nil } // ValidatePartnerNamespaceID checks that 'input' can be parsed as a Partner Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/domains/id_domain.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/domains/id_domain.go index 479442c4263c..8e13e818e0ab 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/domains/id_domain.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/domains/id_domain.go @@ -36,19 +36,9 @@ func ParseDomainID(input string) (*DomainId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DomainId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DomainId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DomainId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) + if id.DomainName, ok = input.Parsed["domainName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "domainName", input) } - return &id, nil + return nil } // ValidateDomainID checks that 'input' can be parsed as a Domain ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/domaintopics/id_domain.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/domaintopics/id_domain.go index 530d28219859..3330f808ff5a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/domaintopics/id_domain.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/domaintopics/id_domain.go @@ -36,19 +36,9 @@ func ParseDomainID(input string) (*DomainId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DomainId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DomainId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DomainId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) + if id.DomainName, ok = input.Parsed["domainName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "domainName", input) } - return &id, nil + return nil } // ValidateDomainID checks that 'input' can be parsed as a Domain ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/domaintopics/id_domaintopic.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/domaintopics/id_domaintopic.go index 342275df8008..24ba87635a55 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/domaintopics/id_domaintopic.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/domaintopics/id_domaintopic.go @@ -38,23 +38,9 @@ func ParseDomainTopicID(input string) (*DomainTopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DomainTopicId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) - } - - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDomainTopicIDInsensitively(input string) (*DomainTopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DomainTopicId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DomainTopicId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) + if id.DomainName, ok = input.Parsed["domainName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "domainName", input) } - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if id.TopicName, ok = input.Parsed["topicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicName", input) } - return &id, nil + return nil } // ValidateDomainTopicID checks that 'input' can be parsed as a Domain Topic ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domain.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domain.go index 9101afb05668..6e147c90b3f3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domain.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domain.go @@ -36,19 +36,9 @@ func ParseDomainID(input string) (*DomainId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DomainId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DomainId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DomainId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) + if id.DomainName, ok = input.Parsed["domainName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "domainName", input) } - return &id, nil + return nil } // ValidateDomainID checks that 'input' can be parsed as a Domain ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domaineventsubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domaineventsubscription.go index dbbd48022f00..86c10dc206c3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domaineventsubscription.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domaineventsubscription.go @@ -38,23 +38,9 @@ func ParseDomainEventSubscriptionID(input string) (*DomainEventSubscriptionId, e return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DomainEventSubscriptionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) - } - - if id.EventSubscriptionName, ok = parsed.Parsed["eventSubscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDomainEventSubscriptionIDInsensitively(input string) (*DomainEventSubs return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DomainEventSubscriptionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DomainEventSubscriptionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) + if id.DomainName, ok = input.Parsed["domainName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "domainName", input) } - if id.EventSubscriptionName, ok = parsed.Parsed["eventSubscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", *parsed) + if id.EventSubscriptionName, ok = input.Parsed["eventSubscriptionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", input) } - return &id, nil + return nil } // ValidateDomainEventSubscriptionID checks that 'input' can be parsed as a Domain Event Subscription ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domaintopic.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domaintopic.go index 4a253237abd1..c2e3ed873e88 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domaintopic.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domaintopic.go @@ -38,23 +38,9 @@ func ParseDomainTopicID(input string) (*DomainTopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DomainTopicId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) - } - - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDomainTopicIDInsensitively(input string) (*DomainTopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DomainTopicId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DomainTopicId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) + if id.DomainName, ok = input.Parsed["domainName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "domainName", input) } - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if id.TopicName, ok = input.Parsed["topicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicName", input) } - return &id, nil + return nil } // ValidateDomainTopicID checks that 'input' can be parsed as a Domain Topic ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_eventsubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_eventsubscription.go index 6d20ee9587c5..caa085bf59e2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_eventsubscription.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_eventsubscription.go @@ -38,23 +38,9 @@ func ParseEventSubscriptionID(input string) (*EventSubscriptionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EventSubscriptionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) - } - - if id.EventSubscriptionName, ok = parsed.Parsed["eventSubscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseEventSubscriptionIDInsensitively(input string) (*EventSubscriptionId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EventSubscriptionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *EventSubscriptionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if id.TopicName, ok = input.Parsed["topicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicName", input) } - if id.EventSubscriptionName, ok = parsed.Parsed["eventSubscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", *parsed) + if id.EventSubscriptionName, ok = input.Parsed["eventSubscriptionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", input) } - return &id, nil + return nil } // ValidateEventSubscriptionID checks that 'input' can be parsed as a Event Subscription ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_location.go index 1c1d775c8704..1c3e5d7847a6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_locationtopictype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_locationtopictype.go index 55e41e978700..c50714598639 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_locationtopictype.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_locationtopictype.go @@ -36,19 +36,9 @@ func ParseLocationTopicTypeID(input string) (*LocationTopicTypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationTopicTypeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - if id.TopicTypeName, ok = parsed.Parsed["topicTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicTypeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLocationTopicTypeIDInsensitively(input string) (*LocationTopicTypeId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationTopicTypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LocationTopicTypeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - if id.TopicTypeName, ok = parsed.Parsed["topicTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicTypeName", *parsed) + if id.TopicTypeName, ok = input.Parsed["topicTypeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicTypeName", input) } - return &id, nil + return nil } // ValidateLocationTopicTypeID checks that 'input' can be parsed as a Location Topic Type ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_partnertopic.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_partnertopic.go index 4f656d50fb78..2f5ae915a953 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_partnertopic.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_partnertopic.go @@ -36,19 +36,9 @@ func ParsePartnerTopicID(input string) (*PartnerTopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartnerTopicId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PartnerTopicName, ok = parsed.Parsed["partnerTopicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partnerTopicName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePartnerTopicIDInsensitively(input string) (*PartnerTopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartnerTopicId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PartnerTopicId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PartnerTopicName, ok = parsed.Parsed["partnerTopicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partnerTopicName", *parsed) + if id.PartnerTopicName, ok = input.Parsed["partnerTopicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "partnerTopicName", input) } - return &id, nil + return nil } // ValidatePartnerTopicID checks that 'input' can be parsed as a Partner Topic ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_partnertopiceventsubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_partnertopiceventsubscription.go index 3b39a9bc4e9d..d45e465c3245 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_partnertopiceventsubscription.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_partnertopiceventsubscription.go @@ -38,23 +38,9 @@ func ParsePartnerTopicEventSubscriptionID(input string) (*PartnerTopicEventSubsc return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartnerTopicEventSubscriptionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PartnerTopicName, ok = parsed.Parsed["partnerTopicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partnerTopicName", *parsed) - } - - if id.EventSubscriptionName, ok = parsed.Parsed["eventSubscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePartnerTopicEventSubscriptionIDInsensitively(input string) (*PartnerTo return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartnerTopicEventSubscriptionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PartnerTopicEventSubscriptionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PartnerTopicName, ok = parsed.Parsed["partnerTopicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partnerTopicName", *parsed) + if id.PartnerTopicName, ok = input.Parsed["partnerTopicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "partnerTopicName", input) } - if id.EventSubscriptionName, ok = parsed.Parsed["eventSubscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", *parsed) + if id.EventSubscriptionName, ok = input.Parsed["eventSubscriptionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", input) } - return &id, nil + return nil } // ValidatePartnerTopicEventSubscriptionID checks that 'input' can be parsed as a Partner Topic Event Subscription ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providerlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providerlocation.go index 26162d081cbf..94ad6876d404 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providerlocation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providerlocation.go @@ -36,19 +36,9 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProviderLocationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providerlocationtopictype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providerlocationtopictype.go index dc8bdee8b6d8..0a9c1a06a7fb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providerlocationtopictype.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providerlocationtopictype.go @@ -38,23 +38,9 @@ func ParseProviderLocationTopicTypeID(input string) (*ProviderLocationTopicTypeI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLocationTopicTypeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - if id.TopicTypeName, ok = parsed.Parsed["topicTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicTypeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseProviderLocationTopicTypeIDInsensitively(input string) (*ProviderLocat return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLocationTopicTypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProviderLocationTopicTypeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - if id.TopicTypeName, ok = parsed.Parsed["topicTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicTypeName", *parsed) + if id.TopicTypeName, ok = input.Parsed["topicTypeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicTypeName", input) } - return &id, nil + return nil } // ValidateProviderLocationTopicTypeID checks that 'input' can be parsed as a Provider Location Topic Type ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providertopictype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providertopictype.go index eb55d88c1085..5a1d8b2610e8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providertopictype.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providertopictype.go @@ -34,15 +34,9 @@ func ParseProviderTopicTypeID(input string) (*ProviderTopicTypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderTopicTypeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.TopicTypeName, ok = parsed.Parsed["topicTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicTypeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseProviderTopicTypeIDInsensitively(input string) (*ProviderTopicTypeId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderTopicTypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ProviderTopicTypeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.TopicTypeName, ok = parsed.Parsed["topicTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicTypeName", *parsed) + if id.TopicTypeName, ok = input.Parsed["topicTypeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicTypeName", input) } - return &id, nil + return nil } // ValidateProviderTopicTypeID checks that 'input' can be parsed as a Provider Topic Type ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_resourcegroupprovidertopictype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_resourcegroupprovidertopictype.go index 038de7ab4be2..c16ca0ed4c97 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_resourcegroupprovidertopictype.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_resourcegroupprovidertopictype.go @@ -36,19 +36,9 @@ func ParseResourceGroupProviderTopicTypeID(input string) (*ResourceGroupProvider return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ResourceGroupProviderTopicTypeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.TopicTypeName, ok = parsed.Parsed["topicTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicTypeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseResourceGroupProviderTopicTypeIDInsensitively(input string) (*Resource return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ResourceGroupProviderTopicTypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ResourceGroupProviderTopicTypeId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.TopicTypeName, ok = parsed.Parsed["topicTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicTypeName", *parsed) + if id.TopicTypeName, ok = input.Parsed["topicTypeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicTypeName", input) } - return &id, nil + return nil } // ValidateResourceGroupProviderTopicTypeID checks that 'input' can be parsed as a Resource Group Provider Topic Type ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_scopedeventsubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_scopedeventsubscription.go index a0bb0783cb98..01d8902b7c2e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_scopedeventsubscription.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_scopedeventsubscription.go @@ -34,15 +34,9 @@ func ParseScopedEventSubscriptionID(input string) (*ScopedEventSubscriptionId, e return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedEventSubscriptionId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.EventSubscriptionName, ok = parsed.Parsed["eventSubscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedEventSubscriptionIDInsensitively(input string) (*ScopedEventSubs return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedEventSubscriptionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedEventSubscriptionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.EventSubscriptionName, ok = parsed.Parsed["eventSubscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", *parsed) + if id.EventSubscriptionName, ok = input.Parsed["eventSubscriptionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", input) } - return &id, nil + return nil } // ValidateScopedEventSubscriptionID checks that 'input' can be parsed as a Scoped Event Subscription ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_systemtopic.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_systemtopic.go index 3dfdf3b9f4c0..6a4b7d2018ed 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_systemtopic.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_systemtopic.go @@ -36,19 +36,9 @@ func ParseSystemTopicID(input string) (*SystemTopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SystemTopicId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SystemTopicName, ok = parsed.Parsed["systemTopicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "systemTopicName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSystemTopicIDInsensitively(input string) (*SystemTopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SystemTopicId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SystemTopicId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SystemTopicName, ok = parsed.Parsed["systemTopicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "systemTopicName", *parsed) + if id.SystemTopicName, ok = input.Parsed["systemTopicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "systemTopicName", input) } - return &id, nil + return nil } // ValidateSystemTopicID checks that 'input' can be parsed as a System Topic ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_systemtopiceventsubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_systemtopiceventsubscription.go index 49dc55336395..0dfc5bec7704 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_systemtopiceventsubscription.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_systemtopiceventsubscription.go @@ -38,23 +38,9 @@ func ParseSystemTopicEventSubscriptionID(input string) (*SystemTopicEventSubscri return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SystemTopicEventSubscriptionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SystemTopicName, ok = parsed.Parsed["systemTopicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "systemTopicName", *parsed) - } - - if id.EventSubscriptionName, ok = parsed.Parsed["eventSubscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSystemTopicEventSubscriptionIDInsensitively(input string) (*SystemTopi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SystemTopicEventSubscriptionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SystemTopicEventSubscriptionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SystemTopicName, ok = parsed.Parsed["systemTopicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "systemTopicName", *parsed) + if id.SystemTopicName, ok = input.Parsed["systemTopicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "systemTopicName", input) } - if id.EventSubscriptionName, ok = parsed.Parsed["eventSubscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", *parsed) + if id.EventSubscriptionName, ok = input.Parsed["eventSubscriptionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", input) } - return &id, nil + return nil } // ValidateSystemTopicEventSubscriptionID checks that 'input' can be parsed as a System Topic Event Subscription ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_topic.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_topic.go index 538d5fbd3b71..7248d3725c99 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_topic.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_topic.go @@ -36,19 +36,9 @@ func ParseTopicID(input string) (*TopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TopicId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TopicId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *TopicId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if id.TopicName, ok = input.Parsed["topicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicName", input) } - return &id, nil + return nil } // ValidateTopicID checks that 'input' can be parsed as a Topic ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_topiceventsubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_topiceventsubscription.go index c359710990b2..0c61117f600c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_topiceventsubscription.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_topiceventsubscription.go @@ -40,27 +40,9 @@ func ParseTopicEventSubscriptionID(input string) (*TopicEventSubscriptionId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TopicEventSubscriptionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) - } - - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) - } - - if id.EventSubscriptionName, ok = parsed.Parsed["eventSubscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseTopicEventSubscriptionIDInsensitively(input string) (*TopicEventSubscr return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TopicEventSubscriptionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *TopicEventSubscriptionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DomainName, ok = parsed.Parsed["domainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "domainName", *parsed) + if id.DomainName, ok = input.Parsed["domainName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "domainName", input) } - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if id.TopicName, ok = input.Parsed["topicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicName", input) } - if id.EventSubscriptionName, ok = parsed.Parsed["eventSubscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", *parsed) + if id.EventSubscriptionName, ok = input.Parsed["eventSubscriptionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "eventSubscriptionName", input) } - return &id, nil + return nil } // ValidateTopicEventSubscriptionID checks that 'input' can be parsed as a Topic Event Subscription ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/partnernamespaces/id_partnernamespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/partnernamespaces/id_partnernamespace.go index 90e7e99bdb18..f18cc7021c96 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/partnernamespaces/id_partnernamespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/partnernamespaces/id_partnernamespace.go @@ -36,19 +36,9 @@ func ParsePartnerNamespaceID(input string) (*PartnerNamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartnerNamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PartnerNamespaceName, ok = parsed.Parsed["partnerNamespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partnerNamespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePartnerNamespaceIDInsensitively(input string) (*PartnerNamespaceId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartnerNamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PartnerNamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PartnerNamespaceName, ok = parsed.Parsed["partnerNamespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partnerNamespaceName", *parsed) + if id.PartnerNamespaceName, ok = input.Parsed["partnerNamespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "partnerNamespaceName", input) } - return &id, nil + return nil } // ValidatePartnerNamespaceID checks that 'input' can be parsed as a Partner Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/partnerregistrations/id_partnerregistration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/partnerregistrations/id_partnerregistration.go index 066798760579..5f992ef6d96b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/partnerregistrations/id_partnerregistration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/partnerregistrations/id_partnerregistration.go @@ -36,19 +36,9 @@ func ParsePartnerRegistrationID(input string) (*PartnerRegistrationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartnerRegistrationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PartnerRegistrationName, ok = parsed.Parsed["partnerRegistrationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partnerRegistrationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePartnerRegistrationIDInsensitively(input string) (*PartnerRegistration return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartnerRegistrationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PartnerRegistrationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PartnerRegistrationName, ok = parsed.Parsed["partnerRegistrationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partnerRegistrationName", *parsed) + if id.PartnerRegistrationName, ok = input.Parsed["partnerRegistrationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "partnerRegistrationName", input) } - return &id, nil + return nil } // ValidatePartnerRegistrationID checks that 'input' can be parsed as a Partner Registration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/partnertopics/id_partnertopic.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/partnertopics/id_partnertopic.go index 9d71aeb2365d..d672383a008a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/partnertopics/id_partnertopic.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/partnertopics/id_partnertopic.go @@ -36,19 +36,9 @@ func ParsePartnerTopicID(input string) (*PartnerTopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartnerTopicId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PartnerTopicName, ok = parsed.Parsed["partnerTopicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partnerTopicName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePartnerTopicIDInsensitively(input string) (*PartnerTopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartnerTopicId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PartnerTopicId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PartnerTopicName, ok = parsed.Parsed["partnerTopicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partnerTopicName", *parsed) + if id.PartnerTopicName, ok = input.Parsed["partnerTopicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "partnerTopicName", input) } - return &id, nil + return nil } // ValidatePartnerTopicID checks that 'input' can be parsed as a Partner Topic ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/privateendpointconnections/id_scopedprivateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/privateendpointconnections/id_scopedprivateendpointconnection.go index 6c16064c7b1b..8036012d1426 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/privateendpointconnections/id_scopedprivateendpointconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/privateendpointconnections/id_scopedprivateendpointconnection.go @@ -34,15 +34,9 @@ func ParseScopedPrivateEndpointConnectionID(input string) (*ScopedPrivateEndpoin return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedPrivateEndpointConnectionId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedPrivateEndpointConnectionIDInsensitively(input string) (*ScopedP return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedPrivateEndpointConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedPrivateEndpointConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", input) } - return &id, nil + return nil } // ValidateScopedPrivateEndpointConnectionID checks that 'input' can be parsed as a Scoped Private Endpoint Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/privatelinkresources/id_scopedprivatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/privatelinkresources/id_scopedprivatelinkresource.go index c809d2d6b3da..86529bb821fa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/privatelinkresources/id_scopedprivatelinkresource.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/privatelinkresources/id_scopedprivatelinkresource.go @@ -34,15 +34,9 @@ func ParseScopedPrivateLinkResourceID(input string) (*ScopedPrivateLinkResourceI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedPrivateLinkResourceId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.PrivateLinkResourceName, ok = parsed.Parsed["privateLinkResourceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkResourceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedPrivateLinkResourceIDInsensitively(input string) (*ScopedPrivate return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedPrivateLinkResourceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedPrivateLinkResourceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.PrivateLinkResourceName, ok = parsed.Parsed["privateLinkResourceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkResourceName", *parsed) + if id.PrivateLinkResourceName, ok = input.Parsed["privateLinkResourceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkResourceName", input) } - return &id, nil + return nil } // ValidateScopedPrivateLinkResourceID checks that 'input' can be parsed as a Scoped Private Link Resource ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/systemtopics/id_systemtopic.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/systemtopics/id_systemtopic.go index 3914a0dcc8f1..1bc7c1711538 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/systemtopics/id_systemtopic.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/systemtopics/id_systemtopic.go @@ -36,19 +36,9 @@ func ParseSystemTopicID(input string) (*SystemTopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SystemTopicId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SystemTopicName, ok = parsed.Parsed["systemTopicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "systemTopicName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSystemTopicIDInsensitively(input string) (*SystemTopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SystemTopicId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SystemTopicId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SystemTopicName, ok = parsed.Parsed["systemTopicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "systemTopicName", *parsed) + if id.SystemTopicName, ok = input.Parsed["systemTopicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "systemTopicName", input) } - return &id, nil + return nil } // ValidateSystemTopicID checks that 'input' can be parsed as a System Topic ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/topics/id_topic.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/topics/id_topic.go index c96a1709d14f..ab42447c30d3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/topics/id_topic.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/topics/id_topic.go @@ -36,19 +36,9 @@ func ParseTopicID(input string) (*TopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TopicId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TopicId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *TopicId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if id.TopicName, ok = input.Parsed["topicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicName", input) } - return &id, nil + return nil } // ValidateTopicID checks that 'input' can be parsed as a Topic ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/topictypes/id_topictype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/topictypes/id_topictype.go index 9c918c265e5a..012c87f33bbe 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/topictypes/id_topictype.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/topictypes/id_topictype.go @@ -32,11 +32,9 @@ func ParseTopicTypeID(input string) (*TopicTypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TopicTypeId{} - - if id.TopicTypeName, ok = parsed.Parsed["topicTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicTypeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseTopicTypeIDInsensitively(input string) (*TopicTypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TopicTypeId{} - - if id.TopicTypeName, ok = parsed.Parsed["topicTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicTypeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *TopicTypeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.TopicTypeName, ok = input.Parsed["topicTypeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicTypeName", input) + } + + return nil +} + // ValidateTopicTypeID checks that 'input' can be parsed as a Topic Type ID func ValidateTopicTypeID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/verifiedpartners/id_verifiedpartner.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/verifiedpartners/id_verifiedpartner.go index 23d4ffb5d385..e5ef44ae43cd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/verifiedpartners/id_verifiedpartner.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/verifiedpartners/id_verifiedpartner.go @@ -32,11 +32,9 @@ func ParseVerifiedPartnerID(input string) (*VerifiedPartnerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VerifiedPartnerId{} - - if id.VerifiedPartnerName, ok = parsed.Parsed["verifiedPartnerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "verifiedPartnerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseVerifiedPartnerIDInsensitively(input string) (*VerifiedPartnerId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VerifiedPartnerId{} - - if id.VerifiedPartnerName, ok = parsed.Parsed["verifiedPartnerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "verifiedPartnerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *VerifiedPartnerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.VerifiedPartnerName, ok = input.Parsed["verifiedPartnerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "verifiedPartnerName", input) + } + + return nil +} + // ValidateVerifiedPartnerID checks that 'input' can be parsed as a Verified Partner ID func ValidateVerifiedPartnerID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/id_eventhub.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/id_eventhub.go index f072d713be1d..47cedfc5a463 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/id_eventhub.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/id_eventhub.go @@ -38,23 +38,9 @@ func ParseEventhubID(input string) (*EventhubId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EventhubId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.EventhubName, ok = parsed.Parsed["eventhubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseEventhubIDInsensitively(input string) (*EventhubId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EventhubId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *EventhubId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.EventhubName, ok = parsed.Parsed["eventhubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", *parsed) + if id.EventhubName, ok = input.Parsed["eventhubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", input) } - return &id, nil + return nil } // ValidateEventhubID checks that 'input' can be parsed as a Eventhub ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/id_eventhubauthorizationrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/id_eventhubauthorizationrule.go index d38788bea011..1f3be091de41 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/id_eventhubauthorizationrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/id_eventhubauthorizationrule.go @@ -40,27 +40,9 @@ func ParseEventhubAuthorizationRuleID(input string) (*EventhubAuthorizationRuleI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EventhubAuthorizationRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.EventhubName, ok = parsed.Parsed["eventhubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", *parsed) - } - - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseEventhubAuthorizationRuleIDInsensitively(input string) (*EventhubAutho return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EventhubAuthorizationRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *EventhubAuthorizationRuleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.EventhubName, ok = parsed.Parsed["eventhubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", *parsed) + if id.EventhubName, ok = input.Parsed["eventhubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", input) } - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if id.AuthorizationRuleName, ok = input.Parsed["authorizationRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", input) } - return &id, nil + return nil } // ValidateEventhubAuthorizationRuleID checks that 'input' can be parsed as a Eventhub Authorization Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/id_authorizationrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/id_authorizationrule.go index 277084e54c51..96fd5e6fdb3c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/id_authorizationrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/id_authorizationrule.go @@ -38,23 +38,9 @@ func ParseAuthorizationRuleID(input string) (*AuthorizationRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AuthorizationRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAuthorizationRuleIDInsensitively(input string) (*AuthorizationRuleId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AuthorizationRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AuthorizationRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if id.AuthorizationRuleName, ok = input.Parsed["authorizationRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", input) } - return &id, nil + return nil } // ValidateAuthorizationRuleID checks that 'input' can be parsed as a Authorization Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/id_namespace.go index c25fab2c4c3a..77265f814462 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/id_namespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/id_namespace.go @@ -36,19 +36,9 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - return &id, nil + return nil } // ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/id_namespace.go index c4342835ab64..b9e232fdd337 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/id_namespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/id_namespace.go @@ -36,19 +36,9 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - return &id, nil + return nil } // ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/id_consumergroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/id_consumergroup.go index 80964528f8b4..9547ccf10642 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/id_consumergroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/id_consumergroup.go @@ -40,27 +40,9 @@ func ParseConsumerGroupID(input string) (*ConsumerGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConsumerGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.EventhubName, ok = parsed.Parsed["eventhubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", *parsed) - } - - if id.ConsumerGroupName, ok = parsed.Parsed["consumerGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "consumerGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseConsumerGroupIDInsensitively(input string) (*ConsumerGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConsumerGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ConsumerGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.EventhubName, ok = parsed.Parsed["eventhubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", *parsed) + if id.EventhubName, ok = input.Parsed["eventhubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", input) } - if id.ConsumerGroupName, ok = parsed.Parsed["consumerGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "consumerGroupName", *parsed) + if id.ConsumerGroupName, ok = input.Parsed["consumerGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "consumerGroupName", input) } - return &id, nil + return nil } // ValidateConsumerGroupID checks that 'input' can be parsed as a Consumer Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/id_eventhub.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/id_eventhub.go index 87c280e948f0..1c825ae0d77f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/id_eventhub.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups/id_eventhub.go @@ -38,23 +38,9 @@ func ParseEventhubID(input string) (*EventhubId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EventhubId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.EventhubName, ok = parsed.Parsed["eventhubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseEventhubIDInsensitively(input string) (*EventhubId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EventhubId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *EventhubId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.EventhubName, ok = parsed.Parsed["eventhubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", *parsed) + if id.EventhubName, ok = input.Parsed["eventhubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", input) } - return &id, nil + return nil } // ValidateEventhubID checks that 'input' can be parsed as a Eventhub ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/id_disasterrecoveryconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/id_disasterrecoveryconfig.go index 82f3690b1913..50f9ca1cf556 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/id_disasterrecoveryconfig.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/id_disasterrecoveryconfig.go @@ -38,23 +38,9 @@ func ParseDisasterRecoveryConfigID(input string) (*DisasterRecoveryConfigId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DisasterRecoveryConfigId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.DisasterRecoveryConfigName, ok = parsed.Parsed["disasterRecoveryConfigName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "disasterRecoveryConfigName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDisasterRecoveryConfigIDInsensitively(input string) (*DisasterRecovery return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DisasterRecoveryConfigId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DisasterRecoveryConfigId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.DisasterRecoveryConfigName, ok = parsed.Parsed["disasterRecoveryConfigName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "disasterRecoveryConfigName", *parsed) + if id.DisasterRecoveryConfigName, ok = input.Parsed["disasterRecoveryConfigName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "disasterRecoveryConfigName", input) } - return &id, nil + return nil } // ValidateDisasterRecoveryConfigID checks that 'input' can be parsed as a Disaster Recovery Config ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/id_namespace.go index 624229f8afdd..c643d34bf488 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/id_namespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/id_namespace.go @@ -36,19 +36,9 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - return &id, nil + return nil } // ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/id_eventhub.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/id_eventhub.go index a425f74cb568..7aa190d29e67 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/id_eventhub.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/id_eventhub.go @@ -38,23 +38,9 @@ func ParseEventhubID(input string) (*EventhubId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EventhubId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.EventhubName, ok = parsed.Parsed["eventhubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseEventhubIDInsensitively(input string) (*EventhubId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EventhubId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *EventhubId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.EventhubName, ok = parsed.Parsed["eventhubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", *parsed) + if id.EventhubName, ok = input.Parsed["eventhubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", input) } - return &id, nil + return nil } // ValidateEventhubID checks that 'input' can be parsed as a Eventhub ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/id_eventhubauthorizationrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/id_eventhubauthorizationrule.go index 84adb4e02325..5541bfcb0c15 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/id_eventhubauthorizationrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/id_eventhubauthorizationrule.go @@ -40,27 +40,9 @@ func ParseEventhubAuthorizationRuleID(input string) (*EventhubAuthorizationRuleI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EventhubAuthorizationRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.EventhubName, ok = parsed.Parsed["eventhubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", *parsed) - } - - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseEventhubAuthorizationRuleIDInsensitively(input string) (*EventhubAutho return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EventhubAuthorizationRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *EventhubAuthorizationRuleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.EventhubName, ok = parsed.Parsed["eventhubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", *parsed) + if id.EventhubName, ok = input.Parsed["eventhubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "eventhubName", input) } - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if id.AuthorizationRuleName, ok = input.Parsed["authorizationRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", input) } - return &id, nil + return nil } // ValidateEventhubAuthorizationRuleID checks that 'input' can be parsed as a Eventhub Authorization Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/id_namespace.go index 9265501203e0..280cec811635 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/id_namespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs/id_namespace.go @@ -36,19 +36,9 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - return &id, nil + return nil } // ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters/id_cluster.go index a3c42a2827c4..a363558836ed 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters/id_cluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters/id_cluster.go @@ -36,19 +36,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/id_namespace.go index db2055c3c046..31a5246b3927 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/id_namespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces/id_namespace.go @@ -36,19 +36,9 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - return &id, nil + return nil } // ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets/id_namespace.go index 3026464070c7..348ce69dc224 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets/id_namespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets/id_namespace.go @@ -36,19 +36,9 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - return &id, nil + return nil } // ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/schemaregistry/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/schemaregistry/id_namespace.go index eeeb927afd99..0b22ea3ba729 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/schemaregistry/id_namespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/schemaregistry/id_namespace.go @@ -36,19 +36,9 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - return &id, nil + return nil } // ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/schemaregistry/id_schemagroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/schemaregistry/id_schemagroup.go index 28a768fa9358..da5ac1692963 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/schemaregistry/id_schemagroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/schemaregistry/id_schemagroup.go @@ -38,23 +38,9 @@ func ParseSchemaGroupID(input string) (*SchemaGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SchemaGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.SchemaGroupName, ok = parsed.Parsed["schemaGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "schemaGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSchemaGroupIDInsensitively(input string) (*SchemaGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SchemaGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SchemaGroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.SchemaGroupName, ok = parsed.Parsed["schemaGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "schemaGroupName", *parsed) + if id.SchemaGroupName, ok = input.Parsed["schemaGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "schemaGroupName", input) } - return &id, nil + return nil } // ValidateSchemaGroupID checks that 'input' can be parsed as a Schema Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/id_namespace.go index db2055c3c046..31a5246b3927 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/id_namespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces/id_namespace.go @@ -36,19 +36,9 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - return &id, nil + return nil } // ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/id_fluidrelaycontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/id_fluidrelaycontainer.go index 731eb3beeb1d..f8aa591c8b1d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/id_fluidrelaycontainer.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/id_fluidrelaycontainer.go @@ -38,23 +38,9 @@ func ParseFluidRelayContainerID(input string) (*FluidRelayContainerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FluidRelayContainerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroup, ok = parsed.Parsed["resourceGroup"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroup", *parsed) - } - - if id.FluidRelayServerName, ok = parsed.Parsed["fluidRelayServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fluidRelayServerName", *parsed) - } - - if id.FluidRelayContainerName, ok = parsed.Parsed["fluidRelayContainerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fluidRelayContainerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseFluidRelayContainerIDInsensitively(input string) (*FluidRelayContainer return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FluidRelayContainerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FluidRelayContainerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroup, ok = parsed.Parsed["resourceGroup"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroup", *parsed) + if id.ResourceGroup, ok = input.Parsed["resourceGroup"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroup", input) } - if id.FluidRelayServerName, ok = parsed.Parsed["fluidRelayServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fluidRelayServerName", *parsed) + if id.FluidRelayServerName, ok = input.Parsed["fluidRelayServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "fluidRelayServerName", input) } - if id.FluidRelayContainerName, ok = parsed.Parsed["fluidRelayContainerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fluidRelayContainerName", *parsed) + if id.FluidRelayContainerName, ok = input.Parsed["fluidRelayContainerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "fluidRelayContainerName", input) } - return &id, nil + return nil } // ValidateFluidRelayContainerID checks that 'input' can be parsed as a Fluid Relay Container ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/id_fluidrelayserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/id_fluidrelayserver.go index f2209c1c0145..8d4d5d97b8bb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/id_fluidrelayserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/id_fluidrelayserver.go @@ -36,19 +36,9 @@ func ParseFluidRelayServerID(input string) (*FluidRelayServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FluidRelayServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroup, ok = parsed.Parsed["resourceGroup"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroup", *parsed) - } - - if id.FluidRelayServerName, ok = parsed.Parsed["fluidRelayServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fluidRelayServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFluidRelayServerIDInsensitively(input string) (*FluidRelayServerId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FluidRelayServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FluidRelayServerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroup, ok = parsed.Parsed["resourceGroup"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroup", *parsed) + if id.ResourceGroup, ok = input.Parsed["resourceGroup"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroup", input) } - if id.FluidRelayServerName, ok = parsed.Parsed["fluidRelayServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fluidRelayServerName", *parsed) + if id.FluidRelayServerName, ok = input.Parsed["fluidRelayServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "fluidRelayServerName", input) } - return &id, nil + return nil } // ValidateFluidRelayServerID checks that 'input' can be parsed as a Fluid Relay Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/id_fluidrelayserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/id_fluidrelayserver.go index f1aebf1c1c68..b509c486cd4e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/id_fluidrelayserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/id_fluidrelayserver.go @@ -36,19 +36,9 @@ func ParseFluidRelayServerID(input string) (*FluidRelayServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FluidRelayServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroup, ok = parsed.Parsed["resourceGroup"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroup", *parsed) - } - - if id.FluidRelayServerName, ok = parsed.Parsed["fluidRelayServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fluidRelayServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFluidRelayServerIDInsensitively(input string) (*FluidRelayServerId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FluidRelayServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FluidRelayServerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroup, ok = parsed.Parsed["resourceGroup"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroup", *parsed) + if id.ResourceGroup, ok = input.Parsed["resourceGroup"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroup", input) } - if id.FluidRelayServerName, ok = parsed.Parsed["fluidRelayServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fluidRelayServerName", *parsed) + if id.FluidRelayServerName, ok = input.Parsed["fluidRelayServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "fluidRelayServerName", input) } - return &id, nil + return nil } // ValidateFluidRelayServerID checks that 'input' can be parsed as a Fluid Relay Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/id_frontdoorwebapplicationfirewallpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/id_frontdoorwebapplicationfirewallpolicy.go index c414dd18c289..648278de38b2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/id_frontdoorwebapplicationfirewallpolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/id_frontdoorwebapplicationfirewallpolicy.go @@ -36,19 +36,9 @@ func ParseFrontDoorWebApplicationFirewallPolicyID(input string) (*FrontDoorWebAp return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FrontDoorWebApplicationFirewallPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FrontDoorWebApplicationFirewallPolicyName, ok = parsed.Parsed["frontDoorWebApplicationFirewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontDoorWebApplicationFirewallPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFrontDoorWebApplicationFirewallPolicyIDInsensitively(input string) (*F return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FrontDoorWebApplicationFirewallPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FrontDoorWebApplicationFirewallPolicyId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FrontDoorWebApplicationFirewallPolicyName, ok = parsed.Parsed["frontDoorWebApplicationFirewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontDoorWebApplicationFirewallPolicyName", *parsed) + if id.FrontDoorWebApplicationFirewallPolicyName, ok = input.Parsed["frontDoorWebApplicationFirewallPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "frontDoorWebApplicationFirewallPolicyName", input) } - return &id, nil + return nil } // ValidateFrontDoorWebApplicationFirewallPolicyID checks that 'input' can be parsed as a Front Door Web Application Firewall Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-05-01/frontdoors/id_frontdoor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-05-01/frontdoors/id_frontdoor.go index f00b1b8baba6..fc20354bcc79 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-05-01/frontdoors/id_frontdoor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-05-01/frontdoors/id_frontdoor.go @@ -36,19 +36,9 @@ func ParseFrontDoorID(input string) (*FrontDoorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FrontDoorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FrontDoorName, ok = parsed.Parsed["frontDoorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontDoorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFrontDoorIDInsensitively(input string) (*FrontDoorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FrontDoorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FrontDoorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FrontDoorName, ok = parsed.Parsed["frontDoorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontDoorName", *parsed) + if id.FrontDoorName, ok = input.Parsed["frontDoorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "frontDoorName", input) } - return &id, nil + return nil } // ValidateFrontDoorID checks that 'input' can be parsed as a Front Door ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-05-01/frontdoors/id_frontendendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-05-01/frontdoors/id_frontendendpoint.go index 20992365b765..2bb3c01732de 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-05-01/frontdoors/id_frontendendpoint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-05-01/frontdoors/id_frontendendpoint.go @@ -38,23 +38,9 @@ func ParseFrontendEndpointID(input string) (*FrontendEndpointId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FrontendEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FrontDoorName, ok = parsed.Parsed["frontDoorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontDoorName", *parsed) - } - - if id.FrontendEndpointName, ok = parsed.Parsed["frontendEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontendEndpointName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseFrontendEndpointIDInsensitively(input string) (*FrontendEndpointId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FrontendEndpointId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FrontendEndpointId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FrontDoorName, ok = parsed.Parsed["frontDoorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontDoorName", *parsed) + if id.FrontDoorName, ok = input.Parsed["frontDoorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "frontDoorName", input) } - if id.FrontendEndpointName, ok = parsed.Parsed["frontendEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontendEndpointName", *parsed) + if id.FrontendEndpointName, ok = input.Parsed["frontendEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "frontendEndpointName", input) } - return &id, nil + return nil } // ValidateFrontendEndpointID checks that 'input' can be parsed as a Frontend Endpoint ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-05-01/frontdoors/id_rulesengine.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-05-01/frontdoors/id_rulesengine.go index dfcbab4a75c1..d0c437e01efb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-05-01/frontdoors/id_rulesengine.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-05-01/frontdoors/id_rulesengine.go @@ -38,23 +38,9 @@ func ParseRulesEngineID(input string) (*RulesEngineId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RulesEngineId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FrontDoorName, ok = parsed.Parsed["frontDoorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontDoorName", *parsed) - } - - if id.RulesEngineName, ok = parsed.Parsed["rulesEngineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "rulesEngineName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRulesEngineIDInsensitively(input string) (*RulesEngineId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RulesEngineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RulesEngineId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FrontDoorName, ok = parsed.Parsed["frontDoorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontDoorName", *parsed) + if id.FrontDoorName, ok = input.Parsed["frontDoorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "frontDoorName", input) } - if id.RulesEngineName, ok = parsed.Parsed["rulesEngineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "rulesEngineName", *parsed) + if id.RulesEngineName, ok = input.Parsed["rulesEngineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "rulesEngineName", input) } - return &id, nil + return nil } // ValidateRulesEngineID checks that 'input' can be parsed as a Rules Engine ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/graphservices/2023-04-13/graphservicesprods/id_account.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/graphservices/2023-04-13/graphservicesprods/id_account.go index 0987727c2d1e..22a570623f28 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/graphservices/2023-04-13/graphservicesprods/id_account.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/graphservices/2023-04-13/graphservicesprods/id_account.go @@ -36,19 +36,9 @@ func ParseAccountID(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - return &id, nil + return nil } // ValidateAccountID checks that 'input' can be parsed as a Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/id_providers2guestconfigurationassignment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/id_providers2guestconfigurationassignment.go index a7c5aeee3550..ef073b7f85ef 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/id_providers2guestconfigurationassignment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/id_providers2guestconfigurationassignment.go @@ -38,23 +38,9 @@ func ParseProviders2GuestConfigurationAssignmentID(input string) (*Providers2Gue return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Providers2GuestConfigurationAssignmentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineName, ok = parsed.Parsed["virtualMachineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", *parsed) - } - - if id.GuestConfigurationAssignmentName, ok = parsed.Parsed["guestConfigurationAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "guestConfigurationAssignmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseProviders2GuestConfigurationAssignmentIDInsensitively(input string) (* return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Providers2GuestConfigurationAssignmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *Providers2GuestConfigurationAssignmentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualMachineName, ok = parsed.Parsed["virtualMachineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", *parsed) + if id.VirtualMachineName, ok = input.Parsed["virtualMachineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", input) } - if id.GuestConfigurationAssignmentName, ok = parsed.Parsed["guestConfigurationAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "guestConfigurationAssignmentName", *parsed) + if id.GuestConfigurationAssignmentName, ok = input.Parsed["guestConfigurationAssignmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "guestConfigurationAssignmentName", input) } - return &id, nil + return nil } // ValidateProviders2GuestConfigurationAssignmentID checks that 'input' can be parsed as a Providers 2 Guest Configuration Assignment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/id_virtualmachine.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/id_virtualmachine.go index 22608a73d066..cc55c092b185 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/id_virtualmachine.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/id_virtualmachine.go @@ -36,19 +36,9 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualMachineId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineName, ok = parsed.Parsed["virtualMachineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualMachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VirtualMachineId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualMachineName, ok = parsed.Parsed["virtualMachineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", *parsed) + if id.VirtualMachineName, ok = input.Parsed["virtualMachineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", input) } - return &id, nil + return nil } // ValidateVirtualMachineID checks that 'input' can be parsed as a Virtual Machine ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/id_dedicatedhsm.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/id_dedicatedhsm.go index ef15c9327fc0..dc1f1a9f0721 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/id_dedicatedhsm.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/id_dedicatedhsm.go @@ -36,19 +36,9 @@ func ParseDedicatedHSMID(input string) (*DedicatedHSMId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DedicatedHSMId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DedicatedHSMName, ok = parsed.Parsed["dedicatedHSMName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dedicatedHSMName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDedicatedHSMIDInsensitively(input string) (*DedicatedHSMId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DedicatedHSMId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DedicatedHSMId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DedicatedHSMName, ok = parsed.Parsed["dedicatedHSMName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dedicatedHSMName", *parsed) + if id.DedicatedHSMName, ok = input.Parsed["dedicatedHSMName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dedicatedHSMName", input) } - return &id, nil + return nil } // ValidateDedicatedHSMID checks that 'input' can be parsed as a Dedicated H S M ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthbot/2022-08-08/healthbots/id_healthbot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthbot/2022-08-08/healthbots/id_healthbot.go index 4360367f2a2c..ee10c9218683 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthbot/2022-08-08/healthbots/id_healthbot.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthbot/2022-08-08/healthbots/id_healthbot.go @@ -36,19 +36,9 @@ func ParseHealthBotID(input string) (*HealthBotId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HealthBotId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.HealthBotName, ok = parsed.Parsed["healthBotName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "healthBotName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseHealthBotIDInsensitively(input string) (*HealthBotId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HealthBotId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *HealthBotId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.HealthBotName, ok = parsed.Parsed["healthBotName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "healthBotName", *parsed) + if id.HealthBotName, ok = input.Parsed["healthBotName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "healthBotName", input) } - return &id, nil + return nil } // ValidateHealthBotID checks that 'input' can be parsed as a Health Bot ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/dicomservices/id_dicomservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/dicomservices/id_dicomservice.go index 3f7ddb9b049d..4e8cc3aef4ff 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/dicomservices/id_dicomservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/dicomservices/id_dicomservice.go @@ -38,23 +38,9 @@ func ParseDicomServiceID(input string) (*DicomServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DicomServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.DicomServiceName, ok = parsed.Parsed["dicomServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dicomServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDicomServiceIDInsensitively(input string) (*DicomServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DicomServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DicomServiceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.DicomServiceName, ok = parsed.Parsed["dicomServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dicomServiceName", *parsed) + if id.DicomServiceName, ok = input.Parsed["dicomServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dicomServiceName", input) } - return &id, nil + return nil } // ValidateDicomServiceID checks that 'input' can be parsed as a Dicom Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/dicomservices/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/dicomservices/id_workspace.go index 82bd996d34f8..818b0450e92a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/dicomservices/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/dicomservices/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/fhirservices/id_fhirservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/fhirservices/id_fhirservice.go index 113cb4a507a5..7641b0cecfb1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/fhirservices/id_fhirservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/fhirservices/id_fhirservice.go @@ -38,23 +38,9 @@ func ParseFhirServiceID(input string) (*FhirServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FhirServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.FhirServiceName, ok = parsed.Parsed["fhirServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fhirServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseFhirServiceIDInsensitively(input string) (*FhirServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FhirServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FhirServiceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.FhirServiceName, ok = parsed.Parsed["fhirServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fhirServiceName", *parsed) + if id.FhirServiceName, ok = input.Parsed["fhirServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "fhirServiceName", input) } - return &id, nil + return nil } // ValidateFhirServiceID checks that 'input' can be parsed as a Fhir Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/fhirservices/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/fhirservices/id_workspace.go index 6ba414db3ef8..cf5fed722cd8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/fhirservices/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/fhirservices/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_fhirdestination.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_fhirdestination.go index 7d3204a110d4..f685bf2d3e27 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_fhirdestination.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_fhirdestination.go @@ -40,27 +40,9 @@ func ParseFhirDestinationID(input string) (*FhirDestinationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FhirDestinationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.IotConnectorName, ok = parsed.Parsed["iotConnectorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "iotConnectorName", *parsed) - } - - if id.FhirDestinationName, ok = parsed.Parsed["fhirDestinationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fhirDestinationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseFhirDestinationIDInsensitively(input string) (*FhirDestinationId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FhirDestinationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *FhirDestinationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.IotConnectorName, ok = parsed.Parsed["iotConnectorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "iotConnectorName", *parsed) + if id.IotConnectorName, ok = input.Parsed["iotConnectorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "iotConnectorName", input) } - if id.FhirDestinationName, ok = parsed.Parsed["fhirDestinationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fhirDestinationName", *parsed) + if id.FhirDestinationName, ok = input.Parsed["fhirDestinationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "fhirDestinationName", input) } - return &id, nil + return nil } // ValidateFhirDestinationID checks that 'input' can be parsed as a Fhir Destination ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_iotconnector.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_iotconnector.go index dc2006cba87c..dcaefdf53a62 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_iotconnector.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_iotconnector.go @@ -38,23 +38,9 @@ func ParseIotConnectorID(input string) (*IotConnectorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IotConnectorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.IotConnectorName, ok = parsed.Parsed["iotConnectorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "iotConnectorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseIotConnectorIDInsensitively(input string) (*IotConnectorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IotConnectorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *IotConnectorId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.IotConnectorName, ok = parsed.Parsed["iotConnectorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "iotConnectorName", *parsed) + if id.IotConnectorName, ok = input.Parsed["iotConnectorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "iotConnectorName", input) } - return &id, nil + return nil } // ValidateIotConnectorID checks that 'input' can be parsed as a Iot Connector ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_workspace.go index 0e1f9192b0f6..185e4c5162bd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/resource/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/resource/id_service.go index c79197753493..22127333d8d6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/resource/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/resource/id_service.go @@ -36,19 +36,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/workspaces/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/workspaces/id_workspace.go index cf847244f20f..66d089175308 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/workspaces/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/workspaces/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machineextensions/id_extension.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machineextensions/id_extension.go index bdcaaf011a14..a9921c71713d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machineextensions/id_extension.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machineextensions/id_extension.go @@ -38,23 +38,9 @@ func ParseExtensionID(input string) (*ExtensionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExtensionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MachineName, ok = parsed.Parsed["machineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "machineName", *parsed) - } - - if id.ExtensionName, ok = parsed.Parsed["extensionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "extensionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExtensionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ExtensionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MachineName, ok = parsed.Parsed["machineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "machineName", *parsed) + if id.MachineName, ok = input.Parsed["machineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "machineName", input) } - if id.ExtensionName, ok = parsed.Parsed["extensionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "extensionName", *parsed) + if id.ExtensionName, ok = input.Parsed["extensionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "extensionName", input) } - return &id, nil + return nil } // ValidateExtensionID checks that 'input' can be parsed as a Extension ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machineextensions/id_machine.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machineextensions/id_machine.go index c0b9021b9343..4799cd5e0971 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machineextensions/id_machine.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machineextensions/id_machine.go @@ -36,19 +36,9 @@ func ParseMachineID(input string) (*MachineId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MachineId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MachineName, ok = parsed.Parsed["machineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "machineName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MachineId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MachineName, ok = parsed.Parsed["machineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "machineName", *parsed) + if id.MachineName, ok = input.Parsed["machineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "machineName", input) } - return &id, nil + return nil } // ValidateMachineID checks that 'input' can be parsed as a Machine ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machines/id_machine.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machines/id_machine.go index add72d0ad9ad..49cabf0d05d1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machines/id_machine.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machines/id_machine.go @@ -36,19 +36,9 @@ func ParseMachineID(input string) (*MachineId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MachineId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MachineName, ok = parsed.Parsed["machineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "machineName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MachineId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MachineName, ok = parsed.Parsed["machineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "machineName", *parsed) + if id.MachineName, ok = input.Parsed["machineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "machineName", input) } - return &id, nil + return nil } // ValidateMachineID checks that 'input' can be parsed as a Machine ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/id_privateendpointconnection.go index 11d1e8ee2a60..cc795c503aef 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/id_privateendpointconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/id_privateendpointconnection.go @@ -38,23 +38,9 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkScopeName, ok = parsed.Parsed["privateLinkScopeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateLinkScopeName, ok = parsed.Parsed["privateLinkScopeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", *parsed) + if id.PrivateLinkScopeName, ok = input.Parsed["privateLinkScopeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", input) } - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", input) } - return &id, nil + return nil } // ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/id_providerprivatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/id_providerprivatelinkscope.go index 282da81e836f..3f5a1d4213d7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/id_providerprivatelinkscope.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/id_providerprivatelinkscope.go @@ -36,19 +36,9 @@ func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderPrivateLinkScopeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkScopeName, ok = parsed.Parsed["privateLinkScopeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivat return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderPrivateLinkScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProviderPrivateLinkScopeId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateLinkScopeName, ok = parsed.Parsed["privateLinkScopeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", *parsed) + if id.PrivateLinkScopeName, ok = input.Parsed["privateLinkScopeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", input) } - return &id, nil + return nil } // ValidateProviderPrivateLinkScopeID checks that 'input' can be parsed as a Provider Private Link Scope ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_machine.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_machine.go index 7951d8dac257..f3cba6e107ab 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_machine.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_machine.go @@ -36,19 +36,9 @@ func ParseMachineID(input string) (*MachineId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MachineId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MachineName, ok = parsed.Parsed["machineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "machineName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MachineId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MachineName, ok = parsed.Parsed["machineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "machineName", *parsed) + if id.MachineName, ok = input.Parsed["machineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "machineName", input) } - return &id, nil + return nil } // ValidateMachineID checks that 'input' can be parsed as a Machine ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_privatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_privatelinkscope.go index 3b203dc4b293..5f650bf2ddba 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_privatelinkscope.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_privatelinkscope.go @@ -36,19 +36,9 @@ func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateLinkScopeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - if id.PrivateLinkScopeId, ok = parsed.Parsed["privateLinkScopeId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateLinkScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PrivateLinkScopeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - if id.PrivateLinkScopeId, ok = parsed.Parsed["privateLinkScopeId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeId", *parsed) + if id.PrivateLinkScopeId, ok = input.Parsed["privateLinkScopeId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeId", input) } - return &id, nil + return nil } // ValidatePrivateLinkScopeID checks that 'input' can be parsed as a Private Link Scope ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_providerprivatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_providerprivatelinkscope.go index 6e9d5c41743b..ae6ffd8daf7f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_providerprivatelinkscope.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_providerprivatelinkscope.go @@ -36,19 +36,9 @@ func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderPrivateLinkScopeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkScopeName, ok = parsed.Parsed["privateLinkScopeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivat return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderPrivateLinkScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProviderPrivateLinkScopeId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateLinkScopeName, ok = parsed.Parsed["privateLinkScopeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", *parsed) + if id.PrivateLinkScopeName, ok = input.Parsed["privateLinkScopeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", input) } - return &id, nil + return nil } // ValidateProviderPrivateLinkScopeID checks that 'input' can be parsed as a Provider Private Link Scope ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/id_connectedcluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/id_connectedcluster.go index d12260a303be..5d31ea4b9ef8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/id_connectedcluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/id_connectedcluster.go @@ -36,19 +36,9 @@ func ParseConnectedClusterID(input string) (*ConnectedClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectedClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConnectedClusterName, ok = parsed.Parsed["connectedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectedClusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseConnectedClusterIDInsensitively(input string) (*ConnectedClusterId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectedClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ConnectedClusterId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ConnectedClusterName, ok = parsed.Parsed["connectedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectedClusterName", *parsed) + if id.ConnectedClusterName, ok = input.Parsed["connectedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "connectedClusterName", input) } - return &id, nil + return nil } // ValidateConnectedClusterID checks that 'input' can be parsed as a Connected Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/id_logprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/id_logprofile.go index 03469edde3a0..988f98418f47 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/id_logprofile.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles/id_logprofile.go @@ -34,15 +34,9 @@ func ParseLogProfileID(input string) (*LogProfileId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LogProfileId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LogProfileName, ok = parsed.Parsed["logProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "logProfileName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLogProfileIDInsensitively(input string) (*LogProfileId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LogProfileId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LogProfileId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LogProfileName, ok = parsed.Parsed["logProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "logProfileName", *parsed) + if id.LogProfileName, ok = input.Parsed["logProfileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "logProfileName", input) } - return &id, nil + return nil } // ValidateLogProfileID checks that 'input' can be parsed as a Log Profile ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-03-01/metricalerts/id_metricalert.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-03-01/metricalerts/id_metricalert.go index f524bc1649ef..41c8cad9632b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-03-01/metricalerts/id_metricalert.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-03-01/metricalerts/id_metricalert.go @@ -36,19 +36,9 @@ func ParseMetricAlertID(input string) (*MetricAlertId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MetricAlertId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MetricAlertName, ok = parsed.Parsed["metricAlertName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "metricAlertName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMetricAlertIDInsensitively(input string) (*MetricAlertId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MetricAlertId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MetricAlertId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MetricAlertName, ok = parsed.Parsed["metricAlertName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "metricAlertName", *parsed) + if id.MetricAlertName, ok = input.Parsed["metricAlertName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "metricAlertName", input) } - return &id, nil + return nil } // ValidateMetricAlertID checks that 'input' can be parsed as a Metric Alert ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-04-16/scheduledqueryrules/id_scheduledqueryrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-04-16/scheduledqueryrules/id_scheduledqueryrule.go index 207457784c9d..0ecc11dd1526 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-04-16/scheduledqueryrules/id_scheduledqueryrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-04-16/scheduledqueryrules/id_scheduledqueryrule.go @@ -36,19 +36,9 @@ func ParseScheduledQueryRuleID(input string) (*ScheduledQueryRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScheduledQueryRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ScheduledQueryRuleName, ok = parsed.Parsed["scheduledQueryRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduledQueryRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseScheduledQueryRuleIDInsensitively(input string) (*ScheduledQueryRuleId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScheduledQueryRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ScheduledQueryRuleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ScheduledQueryRuleName, ok = parsed.Parsed["scheduledQueryRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduledQueryRuleName", *parsed) + if id.ScheduledQueryRuleName, ok = input.Parsed["scheduledQueryRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scheduledQueryRuleName", input) } - return &id, nil + return nil } // ValidateScheduledQueryRuleID checks that 'input' can be parsed as a Scheduled Query Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/id_privatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/id_privatelinkscope.go index 14c15134e8f4..38ea52f134f5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/id_privatelinkscope.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/id_privatelinkscope.go @@ -36,19 +36,9 @@ func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateLinkScopeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkScopeName, ok = parsed.Parsed["privateLinkScopeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateLinkScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PrivateLinkScopeId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateLinkScopeName, ok = parsed.Parsed["privateLinkScopeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", *parsed) + if id.PrivateLinkScopeName, ok = input.Parsed["privateLinkScopeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", input) } - return &id, nil + return nil } // ValidatePrivateLinkScopeID checks that 'input' can be parsed as a Private Link Scope ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/id_scopedresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/id_scopedresource.go index 92aed9436dae..488dfa3d4d45 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/id_scopedresource.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/id_scopedresource.go @@ -38,23 +38,9 @@ func ParseScopedResourceID(input string) (*ScopedResourceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedResourceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkScopeName, ok = parsed.Parsed["privateLinkScopeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", *parsed) - } - - if id.ScopedResourceName, ok = parsed.Parsed["scopedResourceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scopedResourceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseScopedResourceIDInsensitively(input string) (*ScopedResourceId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedResourceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ScopedResourceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateLinkScopeName, ok = parsed.Parsed["privateLinkScopeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", *parsed) + if id.PrivateLinkScopeName, ok = input.Parsed["privateLinkScopeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", input) } - if id.ScopedResourceName, ok = parsed.Parsed["scopedResourceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scopedResourceName", *parsed) + if id.ScopedResourceName, ok = input.Parsed["scopedResourceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scopedResourceName", input) } - return &id, nil + return nil } // ValidateScopedResourceID checks that 'input' can be parsed as a Scoped Resource ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/id_privatelinkscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/id_privatelinkscope.go index 416ee1ca9512..6b304bc4c130 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/id_privatelinkscope.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/id_privatelinkscope.go @@ -36,19 +36,9 @@ func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateLinkScopeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkScopeName, ok = parsed.Parsed["privateLinkScopeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateLinkScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PrivateLinkScopeId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateLinkScopeName, ok = parsed.Parsed["privateLinkScopeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", *parsed) + if id.PrivateLinkScopeName, ok = input.Parsed["privateLinkScopeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkScopeName", input) } - return &id, nil + return nil } // ValidatePrivateLinkScopeID checks that 'input' can be parsed as a Private Link Scope ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2020-10-01/activitylogalertsapis/id_activitylogalert.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2020-10-01/activitylogalertsapis/id_activitylogalert.go index 88860ef3b816..1e5094f9203b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2020-10-01/activitylogalertsapis/id_activitylogalert.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2020-10-01/activitylogalertsapis/id_activitylogalert.go @@ -36,19 +36,9 @@ func ParseActivityLogAlertID(input string) (*ActivityLogAlertId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ActivityLogAlertId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ActivityLogAlertName, ok = parsed.Parsed["activityLogAlertName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "activityLogAlertName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseActivityLogAlertIDInsensitively(input string) (*ActivityLogAlertId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ActivityLogAlertId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ActivityLogAlertId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ActivityLogAlertName, ok = parsed.Parsed["activityLogAlertName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "activityLogAlertName", *parsed) + if id.ActivityLogAlertName, ok = input.Parsed["activityLogAlertName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "activityLogAlertName", input) } - return &id, nil + return nil } // ValidateActivityLogAlertID checks that 'input' can be parsed as a Activity Log Alert ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettings/id_scopeddiagnosticsetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettings/id_scopeddiagnosticsetting.go index 05d06a04c157..64c775d76f27 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettings/id_scopeddiagnosticsetting.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettings/id_scopeddiagnosticsetting.go @@ -34,15 +34,9 @@ func ParseScopedDiagnosticSettingID(input string) (*ScopedDiagnosticSettingId, e return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedDiagnosticSettingId{} - - if id.ResourceUri, ok = parsed.Parsed["resourceUri"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", *parsed) - } - - if id.DiagnosticSettingName, ok = parsed.Parsed["diagnosticSettingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diagnosticSettingName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedDiagnosticSettingIDInsensitively(input string) (*ScopedDiagnosti return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedDiagnosticSettingId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.ResourceUri, ok = parsed.Parsed["resourceUri"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", *parsed) + return &id, nil +} + +func (id *ScopedDiagnosticSettingId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ResourceUri, ok = input.Parsed["resourceUri"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", input) } - if id.DiagnosticSettingName, ok = parsed.Parsed["diagnosticSettingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diagnosticSettingName", *parsed) + if id.DiagnosticSettingName, ok = input.Parsed["diagnosticSettingName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "diagnosticSettingName", input) } - return &id, nil + return nil } // ValidateScopedDiagnosticSettingID checks that 'input' can be parsed as a Scoped Diagnostic Setting ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/id_scopeddiagnosticsettingscategory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/id_scopeddiagnosticsettingscategory.go index 8abdefa4c004..9418bd0ded7a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/id_scopeddiagnosticsettingscategory.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/id_scopeddiagnosticsettingscategory.go @@ -34,15 +34,9 @@ func ParseScopedDiagnosticSettingsCategoryID(input string) (*ScopedDiagnosticSet return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedDiagnosticSettingsCategoryId{} - - if id.ResourceUri, ok = parsed.Parsed["resourceUri"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", *parsed) - } - - if id.DiagnosticSettingsCategoryName, ok = parsed.Parsed["diagnosticSettingsCategoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diagnosticSettingsCategoryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedDiagnosticSettingsCategoryIDInsensitively(input string) (*Scoped return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedDiagnosticSettingsCategoryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.ResourceUri, ok = parsed.Parsed["resourceUri"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", *parsed) + return &id, nil +} + +func (id *ScopedDiagnosticSettingsCategoryId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ResourceUri, ok = input.Parsed["resourceUri"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", input) } - if id.DiagnosticSettingsCategoryName, ok = parsed.Parsed["diagnosticSettingsCategoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diagnosticSettingsCategoryName", *parsed) + if id.DiagnosticSettingsCategoryName, ok = input.Parsed["diagnosticSettingsCategoryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "diagnosticSettingsCategoryName", input) } - return &id, nil + return nil } // ValidateScopedDiagnosticSettingsCategoryID checks that 'input' can be parsed as a Scoped Diagnostic Settings Category ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-08-01/scheduledqueryrules/id_scheduledqueryrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-08-01/scheduledqueryrules/id_scheduledqueryrule.go index 207457784c9d..0ecc11dd1526 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-08-01/scheduledqueryrules/id_scheduledqueryrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-08-01/scheduledqueryrules/id_scheduledqueryrule.go @@ -36,19 +36,9 @@ func ParseScheduledQueryRuleID(input string) (*ScheduledQueryRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScheduledQueryRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ScheduledQueryRuleName, ok = parsed.Parsed["scheduledQueryRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduledQueryRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseScheduledQueryRuleIDInsensitively(input string) (*ScheduledQueryRuleId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScheduledQueryRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ScheduledQueryRuleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ScheduledQueryRuleName, ok = parsed.Parsed["scheduledQueryRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduledQueryRuleName", *parsed) + if id.ScheduledQueryRuleName, ok = input.Parsed["scheduledQueryRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scheduledQueryRuleName", input) } - return &id, nil + return nil } // ValidateScheduledQueryRuleID checks that 'input' can be parsed as a Scheduled Query Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionendpoints/id_datacollectionendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionendpoints/id_datacollectionendpoint.go index e7424e56fc6e..5d237fc686b2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionendpoints/id_datacollectionendpoint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionendpoints/id_datacollectionendpoint.go @@ -36,19 +36,9 @@ func ParseDataCollectionEndpointID(input string) (*DataCollectionEndpointId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataCollectionEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DataCollectionEndpointName, ok = parsed.Parsed["dataCollectionEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataCollectionEndpointName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDataCollectionEndpointIDInsensitively(input string) (*DataCollectionEn return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataCollectionEndpointId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DataCollectionEndpointId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DataCollectionEndpointName, ok = parsed.Parsed["dataCollectionEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataCollectionEndpointName", *parsed) + if id.DataCollectionEndpointName, ok = input.Parsed["dataCollectionEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dataCollectionEndpointName", input) } - return &id, nil + return nil } // ValidateDataCollectionEndpointID checks that 'input' can be parsed as a Data Collection Endpoint ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_datacollectionendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_datacollectionendpoint.go index 783eb29bd5ce..cc7f1cb165d7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_datacollectionendpoint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_datacollectionendpoint.go @@ -36,19 +36,9 @@ func ParseDataCollectionEndpointID(input string) (*DataCollectionEndpointId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataCollectionEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DataCollectionEndpointName, ok = parsed.Parsed["dataCollectionEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataCollectionEndpointName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDataCollectionEndpointIDInsensitively(input string) (*DataCollectionEn return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataCollectionEndpointId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DataCollectionEndpointId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DataCollectionEndpointName, ok = parsed.Parsed["dataCollectionEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataCollectionEndpointName", *parsed) + if id.DataCollectionEndpointName, ok = input.Parsed["dataCollectionEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dataCollectionEndpointName", input) } - return &id, nil + return nil } // ValidateDataCollectionEndpointID checks that 'input' can be parsed as a Data Collection Endpoint ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_datacollectionrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_datacollectionrule.go index e2e0bc59334d..f388ed1069a0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_datacollectionrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_datacollectionrule.go @@ -36,19 +36,9 @@ func ParseDataCollectionRuleID(input string) (*DataCollectionRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataCollectionRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DataCollectionRuleName, ok = parsed.Parsed["dataCollectionRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataCollectionRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDataCollectionRuleIDInsensitively(input string) (*DataCollectionRuleId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataCollectionRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DataCollectionRuleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DataCollectionRuleName, ok = parsed.Parsed["dataCollectionRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataCollectionRuleName", *parsed) + if id.DataCollectionRuleName, ok = input.Parsed["dataCollectionRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dataCollectionRuleName", input) } - return &id, nil + return nil } // ValidateDataCollectionRuleID checks that 'input' can be parsed as a Data Collection Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_scopeddatacollectionruleassociation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_scopeddatacollectionruleassociation.go index 182e95d4d711..562d6b0fcc42 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_scopeddatacollectionruleassociation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_scopeddatacollectionruleassociation.go @@ -34,15 +34,9 @@ func ParseScopedDataCollectionRuleAssociationID(input string) (*ScopedDataCollec return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedDataCollectionRuleAssociationId{} - - if id.ResourceUri, ok = parsed.Parsed["resourceUri"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", *parsed) - } - - if id.DataCollectionRuleAssociationName, ok = parsed.Parsed["dataCollectionRuleAssociationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataCollectionRuleAssociationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedDataCollectionRuleAssociationIDInsensitively(input string) (*Sco return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedDataCollectionRuleAssociationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.ResourceUri, ok = parsed.Parsed["resourceUri"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", *parsed) + return &id, nil +} + +func (id *ScopedDataCollectionRuleAssociationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ResourceUri, ok = input.Parsed["resourceUri"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", input) } - if id.DataCollectionRuleAssociationName, ok = parsed.Parsed["dataCollectionRuleAssociationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataCollectionRuleAssociationName", *parsed) + if id.DataCollectionRuleAssociationName, ok = input.Parsed["dataCollectionRuleAssociationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dataCollectionRuleAssociationName", input) } - return &id, nil + return nil } // ValidateScopedDataCollectionRuleAssociationID checks that 'input' can be parsed as a Scoped Data Collection Rule Association ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionrules/id_datacollectionrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionrules/id_datacollectionrule.go index e48332f71015..3205675d8c79 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionrules/id_datacollectionrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionrules/id_datacollectionrule.go @@ -36,19 +36,9 @@ func ParseDataCollectionRuleID(input string) (*DataCollectionRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataCollectionRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DataCollectionRuleName, ok = parsed.Parsed["dataCollectionRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataCollectionRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDataCollectionRuleIDInsensitively(input string) (*DataCollectionRuleId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataCollectionRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DataCollectionRuleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DataCollectionRuleName, ok = parsed.Parsed["dataCollectionRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataCollectionRuleName", *parsed) + if id.DataCollectionRuleName, ok = input.Parsed["dataCollectionRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dataCollectionRuleName", input) } - return &id, nil + return nil } // ValidateDataCollectionRuleID checks that 'input' can be parsed as a Data Collection Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-10-01/autoscalesettings/id_autoscalesetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-10-01/autoscalesettings/id_autoscalesetting.go index 644f83c6ddae..77f59d611b12 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-10-01/autoscalesettings/id_autoscalesetting.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-10-01/autoscalesettings/id_autoscalesetting.go @@ -36,19 +36,9 @@ func ParseAutoScaleSettingID(input string) (*AutoScaleSettingId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutoScaleSettingId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AutoScaleSettingName, ok = parsed.Parsed["autoScaleSettingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "autoScaleSettingName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAutoScaleSettingIDInsensitively(input string) (*AutoScaleSettingId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutoScaleSettingId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AutoScaleSettingId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AutoScaleSettingName, ok = parsed.Parsed["autoScaleSettingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "autoScaleSettingName", *parsed) + if id.AutoScaleSettingName, ok = input.Parsed["autoScaleSettingName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "autoScaleSettingName", input) } - return &id, nil + return nil } // ValidateAutoScaleSettingID checks that 'input' can be parsed as a Auto Scale Setting ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-01-01/actiongroupsapis/id_actiongroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-01-01/actiongroupsapis/id_actiongroup.go index f2ba4317c8f4..32ec4c27e3d9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-01-01/actiongroupsapis/id_actiongroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-01-01/actiongroupsapis/id_actiongroup.go @@ -36,19 +36,9 @@ func ParseActionGroupID(input string) (*ActionGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ActionGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ActionGroupName, ok = parsed.Parsed["actionGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "actionGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseActionGroupIDInsensitively(input string) (*ActionGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ActionGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ActionGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ActionGroupName, ok = parsed.Parsed["actionGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "actionGroupName", *parsed) + if id.ActionGroupName, ok = input.Parsed["actionGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "actionGroupName", input) } - return &id, nil + return nil } // ValidateActionGroupID checks that 'input' can be parsed as a Action Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-01-01/actiongroupsapis/id_notificationstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-01-01/actiongroupsapis/id_notificationstatus.go index b7820569c83f..fd9789c549d2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-01-01/actiongroupsapis/id_notificationstatus.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-01-01/actiongroupsapis/id_notificationstatus.go @@ -38,23 +38,9 @@ func ParseNotificationStatusID(input string) (*NotificationStatusId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NotificationStatusId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ActionGroupName, ok = parsed.Parsed["actionGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "actionGroupName", *parsed) - } - - if id.NotificationId, ok = parsed.Parsed["notificationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "notificationId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseNotificationStatusIDInsensitively(input string) (*NotificationStatusId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NotificationStatusId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *NotificationStatusId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ActionGroupName, ok = parsed.Parsed["actionGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "actionGroupName", *parsed) + if id.ActionGroupName, ok = input.Parsed["actionGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "actionGroupName", input) } - if id.NotificationId, ok = parsed.Parsed["notificationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "notificationId", *parsed) + if id.NotificationId, ok = input.Parsed["notificationId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "notificationId", input) } - return &id, nil + return nil } // ValidateNotificationStatusID checks that 'input' can be parsed as a Notification Status ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-04-03/azuremonitorworkspaces/id_account.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-04-03/azuremonitorworkspaces/id_account.go index d15a048c6abc..08874f052da2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-04-03/azuremonitorworkspaces/id_account.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-04-03/azuremonitorworkspaces/id_account.go @@ -36,19 +36,9 @@ func ParseAccountID(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - return &id, nil + return nil } // ValidateAccountID checks that 'input' can be parsed as a Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/id_iotapp.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/id_iotapp.go index 2a379b762530..1ca6c34e1243 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/id_iotapp.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps/id_iotapp.go @@ -36,19 +36,9 @@ func ParseIotAppID(input string) (*IotAppId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IotAppId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IotAppName, ok = parsed.Parsed["iotAppName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "iotAppName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseIotAppIDInsensitively(input string) (*IotAppId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IotAppId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *IotAppId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IotAppName, ok = parsed.Parsed["iotAppName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "iotAppName", *parsed) + if id.IotAppName, ok = input.Parsed["iotAppName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "iotAppName", input) } - return &id, nil + return nil } // ValidateIotAppID checks that 'input' can be parsed as a Iot App ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/managedhsms/id_deletedmanagedhsm.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/managedhsms/id_deletedmanagedhsm.go index c3862fe02063..4b2ac8a24ccb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/managedhsms/id_deletedmanagedhsm.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/managedhsms/id_deletedmanagedhsm.go @@ -36,19 +36,9 @@ func ParseDeletedManagedHSMID(input string) (*DeletedManagedHSMId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeletedManagedHSMId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - if id.DeletedManagedHSMName, ok = parsed.Parsed["deletedManagedHSMName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deletedManagedHSMName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDeletedManagedHSMIDInsensitively(input string) (*DeletedManagedHSMId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeletedManagedHSMId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DeletedManagedHSMId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - if id.DeletedManagedHSMName, ok = parsed.Parsed["deletedManagedHSMName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deletedManagedHSMName", *parsed) + if id.DeletedManagedHSMName, ok = input.Parsed["deletedManagedHSMName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "deletedManagedHSMName", input) } - return &id, nil + return nil } // ValidateDeletedManagedHSMID checks that 'input' can be parsed as a Deleted Managed H S M ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/managedhsms/id_managedhsm.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/managedhsms/id_managedhsm.go index d77a6f896c85..f10f4c498994 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/managedhsms/id_managedhsm.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/managedhsms/id_managedhsm.go @@ -36,19 +36,9 @@ func ParseManagedHSMID(input string) (*ManagedHSMId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedHSMId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedHSMName, ok = parsed.Parsed["managedHSMName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedHSMName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseManagedHSMIDInsensitively(input string) (*ManagedHSMId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedHSMId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ManagedHSMId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedHSMName, ok = parsed.Parsed["managedHSMName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedHSMName", *parsed) + if id.ManagedHSMName, ok = input.Parsed["managedHSMName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedHSMName", input) } - return &id, nil + return nil } // ValidateManagedHSMID checks that 'input' can be parsed as a Managed H S M ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/vaults/id_deletedvault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/vaults/id_deletedvault.go index 302dfecbaef3..0c4d26d40d23 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/vaults/id_deletedvault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/vaults/id_deletedvault.go @@ -36,19 +36,9 @@ func ParseDeletedVaultID(input string) (*DeletedVaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeletedVaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - if id.DeletedVaultName, ok = parsed.Parsed["deletedVaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deletedVaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDeletedVaultIDInsensitively(input string) (*DeletedVaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeletedVaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DeletedVaultId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - if id.DeletedVaultName, ok = parsed.Parsed["deletedVaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deletedVaultName", *parsed) + if id.DeletedVaultName, ok = input.Parsed["deletedVaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "deletedVaultName", input) } - return &id, nil + return nil } // ValidateDeletedVaultID checks that 'input' can be parsed as a Deleted Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/vaults/id_operationkind.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/vaults/id_operationkind.go index 0392b20df3ac..043f7bcd2399 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/vaults/id_operationkind.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/vaults/id_operationkind.go @@ -38,31 +38,9 @@ func ParseOperationKindID(input string) (*OperationKindId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OperationKindId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if v, ok := parsed.Parsed["operationKind"]; true { - if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationKind", *parsed) - } - - operationKind, err := parseAccessPolicyUpdateKind(v) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) - } - id.OperationKind = *operationKind + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -77,34 +55,42 @@ func ParseOperationKindIDInsensitively(input string) (*OperationKindId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OperationKindId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *OperationKindId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if v, ok := parsed.Parsed["operationKind"]; true { + if v, ok := input.Parsed["operationKind"]; true { if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationKind", *parsed) + return resourceids.NewSegmentNotSpecifiedError(id, "operationKind", input) } operationKind, err := parseAccessPolicyUpdateKind(v) if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) + return fmt.Errorf("parsing %q: %+v", v, err) } id.OperationKind = *operationKind } - return &id, nil + return nil } // ValidateOperationKindID checks that 'input' can be parsed as a Operation Kind ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2022-11-01/extensions/id_scopedextension.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2022-11-01/extensions/id_scopedextension.go index 71e88f4cb0bc..fc7323238131 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2022-11-01/extensions/id_scopedextension.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2022-11-01/extensions/id_scopedextension.go @@ -34,15 +34,9 @@ func ParseScopedExtensionID(input string) (*ScopedExtensionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedExtensionId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.ExtensionName, ok = parsed.Parsed["extensionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "extensionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedExtensionIDInsensitively(input string) (*ScopedExtensionId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedExtensionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedExtensionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.ExtensionName, ok = parsed.Parsed["extensionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "extensionName", *parsed) + if id.ExtensionName, ok = input.Parsed["extensionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "extensionName", input) } - return &id, nil + return nil } // ValidateScopedExtensionID checks that 'input' can be parsed as a Scoped Extension ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/id_scopedfluxconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/id_scopedfluxconfiguration.go index c757272429c6..8be37f512e6d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/id_scopedfluxconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/id_scopedfluxconfiguration.go @@ -34,15 +34,9 @@ func ParseScopedFluxConfigurationID(input string) (*ScopedFluxConfigurationId, e return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedFluxConfigurationId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.FluxConfigurationName, ok = parsed.Parsed["fluxConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fluxConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedFluxConfigurationIDInsensitively(input string) (*ScopedFluxConfi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedFluxConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedFluxConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.FluxConfigurationName, ok = parsed.Parsed["fluxConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fluxConfigurationName", *parsed) + if id.FluxConfigurationName, ok = input.Parsed["fluxConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "fluxConfigurationName", input) } - return &id, nil + return nil } // ValidateScopedFluxConfigurationID checks that 'input' can be parsed as a Scoped Flux Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/id_attacheddatabaseconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/id_attacheddatabaseconfiguration.go index 1ef55042b117..d9251b45b617 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/id_attacheddatabaseconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/id_attacheddatabaseconfiguration.go @@ -38,23 +38,9 @@ func ParseAttachedDatabaseConfigurationID(input string) (*AttachedDatabaseConfig return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AttachedDatabaseConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.AttachedDatabaseConfigurationName, ok = parsed.Parsed["attachedDatabaseConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "attachedDatabaseConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAttachedDatabaseConfigurationIDInsensitively(input string) (*AttachedD return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AttachedDatabaseConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AttachedDatabaseConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.AttachedDatabaseConfigurationName, ok = parsed.Parsed["attachedDatabaseConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "attachedDatabaseConfigurationName", *parsed) + if id.AttachedDatabaseConfigurationName, ok = input.Parsed["attachedDatabaseConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "attachedDatabaseConfigurationName", input) } - return &id, nil + return nil } // ValidateAttachedDatabaseConfigurationID checks that 'input' can be parsed as a Attached Database Configuration ID 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 index 6444a544abfd..bc9f3f862b5a 100644 --- 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 @@ -36,19 +36,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID 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 index 0d9220412792..d00fd75eab6e 100644 --- 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 @@ -36,19 +36,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/id_principalassignment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/id_principalassignment.go index cef7c3121ef6..87c47d4a4082 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/id_principalassignment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments/id_principalassignment.go @@ -38,23 +38,9 @@ func ParsePrincipalAssignmentID(input string) (*PrincipalAssignmentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrincipalAssignmentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.PrincipalAssignmentName, ok = parsed.Parsed["principalAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "principalAssignmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrincipalAssignmentIDInsensitively(input string) (*PrincipalAssignment return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrincipalAssignmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrincipalAssignmentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.PrincipalAssignmentName, ok = parsed.Parsed["principalAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "principalAssignmentName", *parsed) + if id.PrincipalAssignmentName, ok = input.Parsed["principalAssignmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "principalAssignmentName", input) } - return &id, nil + return nil } // ValidatePrincipalAssignmentID checks that 'input' can be parsed as a Principal Assignment ID 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 index 9046ca67bcd6..5acf72e1ab8b 100644 --- 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 @@ -36,19 +36,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/id_location.go index 2d6b8e58eb94..2a569e197855 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID 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 index 7ba0895461d0..285829a20a30 100644 --- 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 @@ -38,23 +38,9 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool 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 = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - return &id, nil + return nil } // ValidateDatabaseID checks that 'input' can be parsed as a Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/id_databaseprincipalassignment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/id_databaseprincipalassignment.go index 47802699b758..a35c71bbbe68 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/id_databaseprincipalassignment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments/id_databaseprincipalassignment.go @@ -40,27 +40,9 @@ func ParseDatabasePrincipalAssignmentID(input string) (*DatabasePrincipalAssignm return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabasePrincipalAssignmentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) - } - - if id.PrincipalAssignmentName, ok = parsed.Parsed["principalAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "principalAssignmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseDatabasePrincipalAssignmentIDInsensitively(input string) (*DatabasePri return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabasePrincipalAssignmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *DatabasePrincipalAssignmentId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - if id.PrincipalAssignmentName, ok = parsed.Parsed["principalAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "principalAssignmentName", *parsed) + if id.PrincipalAssignmentName, ok = input.Parsed["principalAssignmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "principalAssignmentName", input) } - return &id, nil + return nil } // ValidateDatabasePrincipalAssignmentID checks that 'input' can be parsed as a Database Principal Assignment ID 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 index c001f3addd72..06e37de14e91 100644 --- 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 @@ -36,19 +36,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID 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 index 5b3a47755ab3..6bfdd684edc0 100644 --- 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 @@ -38,23 +38,9 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool 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 = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - return &id, nil + return nil } // ValidateDatabaseID checks that 'input' can be parsed as a Database ID 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 index 209be26d18a5..4f95c1b1e44e 100644 --- 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 @@ -38,23 +38,9 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool 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 = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - return &id, nil + return nil } // ValidateDatabaseID checks that 'input' can be parsed as a Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/id_dataconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/id_dataconnection.go index dac1faf183d9..ac2333340c6d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/id_dataconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections/id_dataconnection.go @@ -40,27 +40,9 @@ func ParseDataConnectionID(input string) (*DataConnectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) - } - - if id.DataConnectionName, ok = parsed.Parsed["dataConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseDataConnectionIDInsensitively(input string) (*DataConnectionId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *DataConnectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - if id.DataConnectionName, ok = parsed.Parsed["dataConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataConnectionName", *parsed) + if id.DataConnectionName, ok = input.Parsed["dataConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dataConnectionName", input) } - return &id, nil + return nil } // ValidateDataConnectionID checks that 'input' can be parsed as a Data Connection ID 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 index 180a05beaf58..520080b78111 100644 --- 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 @@ -36,19 +36,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/id_managedprivateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/id_managedprivateendpoint.go index f1c3fcd8335f..5f1262dda077 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/id_managedprivateendpoint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints/id_managedprivateendpoint.go @@ -38,23 +38,9 @@ func ParseManagedPrivateEndpointID(input string) (*ManagedPrivateEndpointId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedPrivateEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.ManagedPrivateEndpointName, ok = parsed.Parsed["managedPrivateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedPrivateEndpointName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseManagedPrivateEndpointIDInsensitively(input string) (*ManagedPrivateEn return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedPrivateEndpointId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ManagedPrivateEndpointId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.ManagedPrivateEndpointName, ok = parsed.Parsed["managedPrivateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedPrivateEndpointName", *parsed) + if id.ManagedPrivateEndpointName, ok = input.Parsed["managedPrivateEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedPrivateEndpointName", input) } - return &id, nil + return nil } // ValidateManagedPrivateEndpointID checks that 'input' can be parsed as a Managed Private Endpoint ID 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 index e52f80843cb0..8c3b1a579655 100644 --- 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 @@ -38,23 +38,9 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool 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 = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - return &id, nil + return nil } // ValidateDatabaseID checks that 'input' can be parsed as a Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/id_script.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/id_script.go index a23b42902ec7..aa9cc3bbb573 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/id_script.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts/id_script.go @@ -40,27 +40,9 @@ func ParseScriptID(input string) (*ScriptId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScriptId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) - } - - if id.ScriptName, ok = parsed.Parsed["scriptName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scriptName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseScriptIDInsensitively(input string) (*ScriptId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScriptId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ScriptId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - if id.ScriptName, ok = parsed.Parsed["scriptName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scriptName", *parsed) + if id.ScriptName, ok = input.Parsed["scriptName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scriptName", input) } - return &id, nil + return nil } // ValidateScriptID checks that 'input' can be parsed as a Script ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/id_lab.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/id_lab.go index fb259e500222..95f989599afa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/id_lab.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab/id_lab.go @@ -36,19 +36,9 @@ func ParseLabID(input string) (*LabId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LabId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if id.LabName, ok = input.Parsed["labName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) } - return &id, nil + return nil } // ValidateLabID checks that 'input' can be parsed as a Lab ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/id_labplan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/id_labplan.go index 67b7282f6779..5d9ef6f14fb0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/id_labplan.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan/id_labplan.go @@ -36,19 +36,9 @@ func ParseLabPlanID(input string) (*LabPlanId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabPlanId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LabPlanName, ok = parsed.Parsed["labPlanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labPlanName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLabPlanIDInsensitively(input string) (*LabPlanId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabPlanId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LabPlanId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LabPlanName, ok = parsed.Parsed["labPlanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labPlanName", *parsed) + if id.LabPlanName, ok = input.Parsed["labPlanName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "labPlanName", input) } - return &id, nil + return nil } // ValidateLabPlanID checks that 'input' can be parsed as a Lab Plan ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/id_lab.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/id_lab.go index d346be0c1cab..5a1446e3405a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/id_lab.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/id_lab.go @@ -36,19 +36,9 @@ func ParseLabID(input string) (*LabId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LabId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if id.LabName, ok = input.Parsed["labName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) } - return &id, nil + return nil } // ValidateLabID checks that 'input' can be parsed as a Lab ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/id_schedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/id_schedule.go index e13b87fab1ad..7da1be7633ab 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/id_schedule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule/id_schedule.go @@ -38,23 +38,9 @@ func ParseScheduleID(input string) (*ScheduleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScheduleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) - } - - if id.ScheduleName, ok = parsed.Parsed["scheduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseScheduleIDInsensitively(input string) (*ScheduleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScheduleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ScheduleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if id.LabName, ok = input.Parsed["labName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) } - if id.ScheduleName, ok = parsed.Parsed["scheduleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scheduleName", *parsed) + if id.ScheduleName, ok = input.Parsed["scheduleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scheduleName", input) } - return &id, nil + return nil } // ValidateScheduleID checks that 'input' can be parsed as a Schedule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/id_lab.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/id_lab.go index 072edef3eaaf..3a1117bd14a4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/id_lab.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/id_lab.go @@ -36,19 +36,9 @@ func ParseLabID(input string) (*LabId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LabId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LabId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if id.LabName, ok = input.Parsed["labName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) } - return &id, nil + return nil } // ValidateLabID checks that 'input' can be parsed as a Lab ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/id_user.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/id_user.go index 0997c5513075..ce75d900d7ac 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/id_user.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user/id_user.go @@ -38,23 +38,9 @@ func ParseUserID(input string) (*UserId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UserId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) - } - - if id.UserName, ok = parsed.Parsed["userName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "userName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UserId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *UserId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LabName, ok = parsed.Parsed["labName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "labName", *parsed) + if id.LabName, ok = input.Parsed["labName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "labName", input) } - if id.UserName, ok = parsed.Parsed["userName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "userName", *parsed) + if id.UserName, ok = input.Parsed["userName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "userName", input) } - return &id, nil + return nil } // ValidateUserID checks that 'input' can be parsed as a User ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/loadtest/id_loadtest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/loadtest/id_loadtest.go index 43ec8cda588a..b520506ff1d7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/loadtest/id_loadtest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/loadtest/id_loadtest.go @@ -36,19 +36,9 @@ func ParseLoadTestID(input string) (*LoadTestId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LoadTestId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadTestName, ok = parsed.Parsed["loadTestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadTestName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLoadTestIDInsensitively(input string) (*LoadTestId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LoadTestId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LoadTestId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LoadTestName, ok = parsed.Parsed["loadTestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadTestName", *parsed) + if id.LoadTestName, ok = input.Parsed["loadTestName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "loadTestName", input) } - return &id, nil + return nil } // ValidateLoadTestID checks that 'input' can be parsed as a Load Test ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/loadtests/id_loadtest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/loadtests/id_loadtest.go index daf867852d98..84d7a455fb61 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/loadtests/id_loadtest.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/loadtests/id_loadtest.go @@ -36,19 +36,9 @@ func ParseLoadTestID(input string) (*LoadTestId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LoadTestId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadTestName, ok = parsed.Parsed["loadTestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadTestName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLoadTestIDInsensitively(input string) (*LoadTestId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LoadTestId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LoadTestId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LoadTestName, ok = parsed.Parsed["loadTestName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadTestName", *parsed) + if id.LoadTestName, ok = input.Parsed["loadTestName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "loadTestName", input) } - return &id, nil + return nil } // ValidateLoadTestID checks that 'input' can be parsed as a Load Test ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/quotas/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/quotas/id_location.go index 946cb3ef120f..654279e6c669 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/quotas/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/quotas/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/quotas/id_quota.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/quotas/id_quota.go index 41cfdcb2ae85..09436927fbc9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/quotas/id_quota.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/quotas/id_quota.go @@ -36,19 +36,9 @@ func ParseQuotaID(input string) (*QuotaId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := QuotaId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - if id.QuotaName, ok = parsed.Parsed["quotaName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "quotaName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseQuotaIDInsensitively(input string) (*QuotaId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := QuotaId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *QuotaId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - if id.QuotaName, ok = parsed.Parsed["quotaName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "quotaName", *parsed) + if id.QuotaName, ok = input.Parsed["quotaName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "quotaName", input) } - return &id, nil + return nil } // ValidateQuotaID checks that 'input' can be parsed as a Quota ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/id_agreement.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/id_agreement.go index d8befd068cec..41c330b7e159 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/id_agreement.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/id_agreement.go @@ -38,23 +38,9 @@ func ParseAgreementID(input string) (*AgreementId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AgreementId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) - } - - if id.AgreementName, ok = parsed.Parsed["agreementName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "agreementName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAgreementIDInsensitively(input string) (*AgreementId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AgreementId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AgreementId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if id.IntegrationAccountName, ok = input.Parsed["integrationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", input) } - if id.AgreementName, ok = parsed.Parsed["agreementName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "agreementName", *parsed) + if id.AgreementName, ok = input.Parsed["agreementName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "agreementName", input) } - return &id, nil + return nil } // ValidateAgreementID checks that 'input' can be parsed as a Agreement ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/id_integrationaccount.go index 2623fcb677dd..c6262f85d575 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/id_integrationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/id_integrationaccount.go @@ -36,19 +36,9 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *IntegrationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if id.IntegrationAccountName, ok = input.Parsed["integrationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", input) } - return &id, nil + return nil } // ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_assembly.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_assembly.go index 248934cfc0a6..3dc051a67fdb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_assembly.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_assembly.go @@ -38,23 +38,9 @@ func ParseAssemblyID(input string) (*AssemblyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AssemblyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) - } - - if id.AssemblyName, ok = parsed.Parsed["assemblyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assemblyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAssemblyIDInsensitively(input string) (*AssemblyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AssemblyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AssemblyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if id.IntegrationAccountName, ok = input.Parsed["integrationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", input) } - if id.AssemblyName, ok = parsed.Parsed["assemblyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assemblyName", *parsed) + if id.AssemblyName, ok = input.Parsed["assemblyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "assemblyName", input) } - return &id, nil + return nil } // ValidateAssemblyID checks that 'input' can be parsed as a Assembly ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_integrationaccount.go index eeca89502401..33d9eb27d2e4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_integrationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_integrationaccount.go @@ -36,19 +36,9 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *IntegrationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if id.IntegrationAccountName, ok = input.Parsed["integrationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", input) } - return &id, nil + return nil } // ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_batchconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_batchconfiguration.go index 6a1ebdef7dbd..5c61ab2f12de 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_batchconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_batchconfiguration.go @@ -38,23 +38,9 @@ func ParseBatchConfigurationID(input string) (*BatchConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BatchConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) - } - - if id.BatchConfigurationName, ok = parsed.Parsed["batchConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "batchConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseBatchConfigurationIDInsensitively(input string) (*BatchConfigurationId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BatchConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BatchConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if id.IntegrationAccountName, ok = input.Parsed["integrationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", input) } - if id.BatchConfigurationName, ok = parsed.Parsed["batchConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "batchConfigurationName", *parsed) + if id.BatchConfigurationName, ok = input.Parsed["batchConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "batchConfigurationName", input) } - return &id, nil + return nil } // ValidateBatchConfigurationID checks that 'input' can be parsed as a Batch Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_integrationaccount.go index e0402e01b061..6864e0df85ae 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_integrationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_integrationaccount.go @@ -36,19 +36,9 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *IntegrationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if id.IntegrationAccountName, ok = input.Parsed["integrationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", input) } - return &id, nil + return nil } // ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_certificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_certificate.go index 65f51a1b5890..b106099252f3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_certificate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_certificate.go @@ -38,23 +38,9 @@ func ParseCertificateID(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) - } - - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CertificateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if id.IntegrationAccountName, ok = input.Parsed["integrationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", input) } - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if id.CertificateName, ok = input.Parsed["certificateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "certificateName", input) } - return &id, nil + return nil } // ValidateCertificateID checks that 'input' can be parsed as a Certificate ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_integrationaccount.go index 48a9e0be12b8..eff965122d4d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_integrationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_integrationaccount.go @@ -36,19 +36,9 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *IntegrationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if id.IntegrationAccountName, ok = input.Parsed["integrationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", input) } - return &id, nil + return nil } // ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/id_integrationaccount.go index bad2e827c2b0..8b8292f66401 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/id_integrationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/id_integrationaccount.go @@ -36,19 +36,9 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *IntegrationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if id.IntegrationAccountName, ok = input.Parsed["integrationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", input) } - return &id, nil + return nil } // ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/id_map.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/id_map.go index e9daa1d3e3ea..893b5d011cb7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/id_map.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/id_map.go @@ -38,23 +38,9 @@ func ParseMapID(input string) (*MapId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MapId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) - } - - if id.MapName, ok = parsed.Parsed["mapName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mapName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseMapIDInsensitively(input string) (*MapId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MapId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MapId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if id.IntegrationAccountName, ok = input.Parsed["integrationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", input) } - if id.MapName, ok = parsed.Parsed["mapName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mapName", *parsed) + if id.MapName, ok = input.Parsed["mapName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mapName", input) } - return &id, nil + return nil } // ValidateMapID checks that 'input' can be parsed as a Map ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/id_integrationaccount.go index 705ad1f643cc..30ee409ab6c8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/id_integrationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/id_integrationaccount.go @@ -36,19 +36,9 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *IntegrationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if id.IntegrationAccountName, ok = input.Parsed["integrationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", input) } - return &id, nil + return nil } // ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/id_partner.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/id_partner.go index 0c9ab77be7df..0733f0d49a35 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/id_partner.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/id_partner.go @@ -38,23 +38,9 @@ func ParsePartnerID(input string) (*PartnerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartnerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) - } - - if id.PartnerName, ok = parsed.Parsed["partnerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partnerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePartnerIDInsensitively(input string) (*PartnerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PartnerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PartnerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if id.IntegrationAccountName, ok = input.Parsed["integrationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", input) } - if id.PartnerName, ok = parsed.Parsed["partnerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "partnerName", *parsed) + if id.PartnerName, ok = input.Parsed["partnerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "partnerName", input) } - return &id, nil + return nil } // ValidatePartnerID checks that 'input' can be parsed as a Partner ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/id_integrationaccount.go index 46b18fd59c75..4cc6584c2c29 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/id_integrationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/id_integrationaccount.go @@ -36,19 +36,9 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *IntegrationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if id.IntegrationAccountName, ok = input.Parsed["integrationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", input) } - return &id, nil + return nil } // ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/id_integrationaccount.go index fcc7a369ce3d..31cfd700920c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/id_integrationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/id_integrationaccount.go @@ -36,19 +36,9 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *IntegrationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if id.IntegrationAccountName, ok = input.Parsed["integrationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", input) } - return &id, nil + return nil } // ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/id_schema.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/id_schema.go index dd3ec83c4698..8f13f733a976 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/id_schema.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/id_schema.go @@ -38,23 +38,9 @@ func ParseSchemaID(input string) (*SchemaId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SchemaId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) - } - - if id.SchemaName, ok = parsed.Parsed["schemaName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "schemaName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSchemaIDInsensitively(input string) (*SchemaId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SchemaId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SchemaId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if id.IntegrationAccountName, ok = input.Parsed["integrationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", input) } - if id.SchemaName, ok = parsed.Parsed["schemaName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "schemaName", *parsed) + if id.SchemaName, ok = input.Parsed["schemaName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "schemaName", input) } - return &id, nil + return nil } // ValidateSchemaID checks that 'input' can be parsed as a Schema ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/id_integrationaccount.go index d4e0d688ca01..83c7af4b09b6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/id_integrationaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/id_integrationaccount.go @@ -36,19 +36,9 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *IntegrationAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if id.IntegrationAccountName, ok = input.Parsed["integrationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", input) } - return &id, nil + return nil } // ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/id_session.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/id_session.go index dac0c7bd0413..f4f52f36e81d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/id_session.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/id_session.go @@ -38,23 +38,9 @@ func ParseSessionID(input string) (*SessionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SessionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) - } - - if id.SessionName, ok = parsed.Parsed["sessionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sessionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSessionIDInsensitively(input string) (*SessionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SessionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SessionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", *parsed) + if id.IntegrationAccountName, ok = input.Parsed["integrationAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationAccountName", input) } - if id.SessionName, ok = parsed.Parsed["sessionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sessionName", *parsed) + if id.SessionName, ok = input.Parsed["sessionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sessionName", input) } - return &id, nil + return nil } // ValidateSessionID checks that 'input' can be parsed as a Session ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/id_integrationserviceenvironment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/id_integrationserviceenvironment.go index fd5369e60994..27f0256c8947 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/id_integrationserviceenvironment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/id_integrationserviceenvironment.go @@ -36,19 +36,9 @@ func ParseIntegrationServiceEnvironmentID(input string) (*IntegrationServiceEnvi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationServiceEnvironmentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroup, ok = parsed.Parsed["resourceGroup"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroup", *parsed) - } - - if id.IntegrationServiceEnvironmentName, ok = parsed.Parsed["integrationServiceEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationServiceEnvironmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseIntegrationServiceEnvironmentIDInsensitively(input string) (*Integrati return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntegrationServiceEnvironmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *IntegrationServiceEnvironmentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroup, ok = parsed.Parsed["resourceGroup"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroup", *parsed) + if id.ResourceGroup, ok = input.Parsed["resourceGroup"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroup", input) } - if id.IntegrationServiceEnvironmentName, ok = parsed.Parsed["integrationServiceEnvironmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "integrationServiceEnvironmentName", *parsed) + if id.IntegrationServiceEnvironmentName, ok = input.Parsed["integrationServiceEnvironmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "integrationServiceEnvironmentName", input) } - return &id, nil + return nil } // ValidateIntegrationServiceEnvironmentID checks that 'input' can be parsed as a Integration Service Environment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_action.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_action.go index 79604b86961f..52ee81de0c5c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_action.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_action.go @@ -40,27 +40,9 @@ func ParseActionID(input string) (*ActionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ActionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) - } - - if id.RunName, ok = parsed.Parsed["runName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runName", *parsed) - } - - if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "actionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseActionIDInsensitively(input string) (*ActionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ActionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ActionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) + if id.WorkflowName, ok = input.Parsed["workflowName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workflowName", input) } - if id.RunName, ok = parsed.Parsed["runName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runName", *parsed) + if id.RunName, ok = input.Parsed["runName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "runName", input) } - if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "actionName", *parsed) + if id.ActionName, ok = input.Parsed["actionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "actionName", input) } - return &id, nil + return nil } // ValidateActionID checks that 'input' can be parsed as a Action ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_repetition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_repetition.go index b95d1ef14980..d0c34fa9072b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_repetition.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_repetition.go @@ -42,31 +42,9 @@ func ParseRepetitionID(input string) (*RepetitionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RepetitionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) - } - - if id.RunName, ok = parsed.Parsed["runName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runName", *parsed) - } - - if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "actionName", *parsed) - } - - if id.RepetitionName, ok = parsed.Parsed["repetitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "repetitionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseRepetitionIDInsensitively(input string) (*RepetitionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RepetitionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RepetitionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) + if id.WorkflowName, ok = input.Parsed["workflowName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workflowName", input) } - if id.RunName, ok = parsed.Parsed["runName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runName", *parsed) + if id.RunName, ok = input.Parsed["runName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "runName", input) } - if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "actionName", *parsed) + if id.ActionName, ok = input.Parsed["actionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "actionName", input) } - if id.RepetitionName, ok = parsed.Parsed["repetitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "repetitionName", *parsed) + if id.RepetitionName, ok = input.Parsed["repetitionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "repetitionName", input) } - return &id, nil + return nil } // ValidateRepetitionID checks that 'input' can be parsed as a Repetition ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_repetitionrequesthistory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_repetitionrequesthistory.go index 901d59169bdd..f0f902199148 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_repetitionrequesthistory.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_repetitionrequesthistory.go @@ -44,35 +44,9 @@ func ParseRepetitionRequestHistoryID(input string) (*RepetitionRequestHistoryId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RepetitionRequestHistoryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) - } - - if id.RunName, ok = parsed.Parsed["runName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runName", *parsed) - } - - if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "actionName", *parsed) - } - - if id.RepetitionName, ok = parsed.Parsed["repetitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "repetitionName", *parsed) - } - - if id.RequestHistoryName, ok = parsed.Parsed["requestHistoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "requestHistoryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -87,38 +61,46 @@ func ParseRepetitionRequestHistoryIDInsensitively(input string) (*RepetitionRequ return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RepetitionRequestHistoryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *RepetitionRequestHistoryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) + if id.WorkflowName, ok = input.Parsed["workflowName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workflowName", input) } - if id.RunName, ok = parsed.Parsed["runName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runName", *parsed) + if id.RunName, ok = input.Parsed["runName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "runName", input) } - if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "actionName", *parsed) + if id.ActionName, ok = input.Parsed["actionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "actionName", input) } - if id.RepetitionName, ok = parsed.Parsed["repetitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "repetitionName", *parsed) + if id.RepetitionName, ok = input.Parsed["repetitionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "repetitionName", input) } - if id.RequestHistoryName, ok = parsed.Parsed["requestHistoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "requestHistoryName", *parsed) + if id.RequestHistoryName, ok = input.Parsed["requestHistoryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "requestHistoryName", input) } - return &id, nil + return nil } // ValidateRepetitionRequestHistoryID checks that 'input' can be parsed as a Repetition Request History ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_requesthistory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_requesthistory.go index da3fb4c3875c..cafa5a6b3a94 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_requesthistory.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_requesthistory.go @@ -42,31 +42,9 @@ func ParseRequestHistoryID(input string) (*RequestHistoryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RequestHistoryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) - } - - if id.RunName, ok = parsed.Parsed["runName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runName", *parsed) - } - - if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "actionName", *parsed) - } - - if id.RequestHistoryName, ok = parsed.Parsed["requestHistoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "requestHistoryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseRequestHistoryIDInsensitively(input string) (*RequestHistoryId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RequestHistoryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RequestHistoryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) + if id.WorkflowName, ok = input.Parsed["workflowName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workflowName", input) } - if id.RunName, ok = parsed.Parsed["runName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runName", *parsed) + if id.RunName, ok = input.Parsed["runName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "runName", input) } - if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "actionName", *parsed) + if id.ActionName, ok = input.Parsed["actionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "actionName", input) } - if id.RequestHistoryName, ok = parsed.Parsed["requestHistoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "requestHistoryName", *parsed) + if id.RequestHistoryName, ok = input.Parsed["requestHistoryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "requestHistoryName", input) } - return &id, nil + return nil } // ValidateRequestHistoryID checks that 'input' can be parsed as a Request History ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_run.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_run.go index 1c853ba5d570..be780b1854f3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_run.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_run.go @@ -38,23 +38,9 @@ func ParseRunID(input string) (*RunId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RunId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) - } - - if id.RunName, ok = parsed.Parsed["runName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRunIDInsensitively(input string) (*RunId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RunId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RunId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) + if id.WorkflowName, ok = input.Parsed["workflowName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workflowName", input) } - if id.RunName, ok = parsed.Parsed["runName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runName", *parsed) + if id.RunName, ok = input.Parsed["runName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "runName", input) } - return &id, nil + return nil } // ValidateRunID checks that 'input' can be parsed as a Run ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_scoperepetition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_scoperepetition.go index 249f238585ae..c9a16203c4c6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_scoperepetition.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_scoperepetition.go @@ -42,31 +42,9 @@ func ParseScopeRepetitionID(input string) (*ScopeRepetitionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopeRepetitionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) - } - - if id.RunName, ok = parsed.Parsed["runName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runName", *parsed) - } - - if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "actionName", *parsed) - } - - if id.ScopeRepetitionName, ok = parsed.Parsed["scopeRepetitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scopeRepetitionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseScopeRepetitionIDInsensitively(input string) (*ScopeRepetitionId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopeRepetitionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ScopeRepetitionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) + if id.WorkflowName, ok = input.Parsed["workflowName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workflowName", input) } - if id.RunName, ok = parsed.Parsed["runName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "runName", *parsed) + if id.RunName, ok = input.Parsed["runName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "runName", input) } - if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "actionName", *parsed) + if id.ActionName, ok = input.Parsed["actionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "actionName", input) } - if id.ScopeRepetitionName, ok = parsed.Parsed["scopeRepetitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scopeRepetitionName", *parsed) + if id.ScopeRepetitionName, ok = input.Parsed["scopeRepetitionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scopeRepetitionName", input) } - return &id, nil + return nil } // ValidateScopeRepetitionID checks that 'input' can be parsed as a Scope Repetition ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/id_locationworkflow.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/id_locationworkflow.go index cfc0c7805567..05ee9d1773d6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/id_locationworkflow.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/id_locationworkflow.go @@ -38,23 +38,9 @@ func ParseLocationWorkflowID(input string) (*LocationWorkflowId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationWorkflowId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLocationWorkflowIDInsensitively(input string) (*LocationWorkflowId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationWorkflowId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LocationWorkflowId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) + if id.WorkflowName, ok = input.Parsed["workflowName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workflowName", input) } - return &id, nil + return nil } // ValidateLocationWorkflowID checks that 'input' can be parsed as a Location Workflow ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/id_workflow.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/id_workflow.go index bee34582ad00..fa95e6a4a576 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/id_workflow.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/id_workflow.go @@ -36,19 +36,9 @@ func ParseWorkflowID(input string) (*WorkflowId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkflowId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkflowIDInsensitively(input string) (*WorkflowId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkflowId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkflowId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) + if id.WorkflowName, ok = input.Parsed["workflowName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workflowName", input) } - return &id, nil + return nil } // ValidateWorkflowID checks that 'input' can be parsed as a Workflow ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_trigger.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_trigger.go index 40db8daf9757..6ce028b50876 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_trigger.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_trigger.go @@ -38,23 +38,9 @@ func ParseTriggerID(input string) (*TriggerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TriggerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) - } - - if id.TriggerName, ok = parsed.Parsed["triggerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "triggerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TriggerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TriggerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) + if id.WorkflowName, ok = input.Parsed["workflowName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workflowName", input) } - if id.TriggerName, ok = parsed.Parsed["triggerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "triggerName", *parsed) + if id.TriggerName, ok = input.Parsed["triggerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "triggerName", input) } - return &id, nil + return nil } // ValidateTriggerID checks that 'input' can be parsed as a Trigger ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_versiontrigger.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_versiontrigger.go index d7e62385cc9a..1d50afeaacf8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_versiontrigger.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_versiontrigger.go @@ -40,27 +40,9 @@ func ParseVersionTriggerID(input string) (*VersionTriggerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VersionTriggerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) - } - - if id.VersionId, ok = parsed.Parsed["versionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "versionId", *parsed) - } - - if id.TriggerName, ok = parsed.Parsed["triggerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "triggerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseVersionTriggerIDInsensitively(input string) (*VersionTriggerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VersionTriggerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *VersionTriggerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) + if id.WorkflowName, ok = input.Parsed["workflowName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workflowName", input) } - if id.VersionId, ok = parsed.Parsed["versionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "versionId", *parsed) + if id.VersionId, ok = input.Parsed["versionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "versionId", input) } - if id.TriggerName, ok = parsed.Parsed["triggerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "triggerName", *parsed) + if id.TriggerName, ok = input.Parsed["triggerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "triggerName", input) } - return &id, nil + return nil } // ValidateVersionTriggerID checks that 'input' can be parsed as a Version Trigger ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_workflow.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_workflow.go index 4f83296b43af..14d14f7f8a2a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_workflow.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_workflow.go @@ -36,19 +36,9 @@ func ParseWorkflowID(input string) (*WorkflowId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkflowId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkflowIDInsensitively(input string) (*WorkflowId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkflowId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkflowId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workflowName", *parsed) + if id.WorkflowName, ok = input.Parsed["workflowName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workflowName", input) } - return &id, nil + return nil } // ValidateWorkflowID checks that 'input' can be parsed as a Workflow ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/id_monitor.go index f33a6d052c83..5969c63ecbab 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors/id_monitor.go @@ -36,19 +36,9 @@ func ParseMonitorID(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MonitorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - return &id, nil + return nil } // ValidateMonitorID checks that 'input' can be parsed as a Monitor ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/id_account.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/id_account.go index f4ddccf4db49..99fd4c046cc2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/id_account.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/id_account.go @@ -38,23 +38,9 @@ func ParseAccountID(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AccountId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - return &id, nil + return nil } // ValidateAccountID checks that 'input' can be parsed as a Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/id_monitor.go index 997f40bfc64e..7f13a57dc80f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount/id_monitor.go @@ -36,19 +36,9 @@ func ParseMonitorID(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MonitorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - return &id, nil + return nil } // ValidateMonitorID checks that 'input' can be parsed as a Monitor ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_account.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_account.go index de7a225a01e9..37ffbd7d7fdd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_account.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_account.go @@ -38,23 +38,9 @@ func ParseAccountID(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AccountId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - return &id, nil + return nil } // ValidateAccountID checks that 'input' can be parsed as a Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_accounttagrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_accounttagrule.go index 943ea2481e91..d1c1eb68e5ca 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_accounttagrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_accounttagrule.go @@ -40,27 +40,9 @@ func ParseAccountTagRuleID(input string) (*AccountTagRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountTagRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) - } - - if id.TagRuleName, ok = parsed.Parsed["tagRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseAccountTagRuleIDInsensitively(input string) (*AccountTagRuleId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountTagRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *AccountTagRuleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - if id.TagRuleName, ok = parsed.Parsed["tagRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagRuleName", *parsed) + if id.TagRuleName, ok = input.Parsed["tagRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "tagRuleName", input) } - return &id, nil + return nil } // ValidateAccountTagRuleID checks that 'input' can be parsed as a Account Tag Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_monitor.go index dd7f0f6b170f..09d0294ccb82 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_monitor.go @@ -36,19 +36,9 @@ func ParseMonitorID(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MonitorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - return &id, nil + return nil } // ValidateMonitorID checks that 'input' can be parsed as a Monitor ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_tagrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_tagrule.go index c81c8f37d12d..6b16843c8a6a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_tagrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules/id_tagrule.go @@ -38,23 +38,9 @@ func ParseTagRuleID(input string) (*TagRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TagRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) - } - - if id.TagRuleName, ok = parsed.Parsed["tagRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTagRuleIDInsensitively(input string) (*TagRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TagRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TagRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - if id.TagRuleName, ok = parsed.Parsed["tagRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagRuleName", *parsed) + if id.TagRuleName, ok = input.Parsed["tagRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "tagRuleName", input) } - return &id, nil + return nil } // ValidateTagRuleID checks that 'input' can be parsed as a Tag Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/datastore/id_datastore.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/datastore/id_datastore.go index ee2428b42353..58fc7a105427 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/datastore/id_datastore.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/datastore/id_datastore.go @@ -38,23 +38,9 @@ func ParseDataStoreID(input string) (*DataStoreId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataStoreId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.DataStoreName, ok = parsed.Parsed["dataStoreName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataStoreName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDataStoreIDInsensitively(input string) (*DataStoreId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataStoreId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DataStoreId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.DataStoreName, ok = parsed.Parsed["dataStoreName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataStoreName", *parsed) + if id.DataStoreName, ok = input.Parsed["dataStoreName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dataStoreName", input) } - return &id, nil + return nil } // ValidateDataStoreID checks that 'input' can be parsed as a Data Store ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/datastore/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/datastore/id_workspace.go index b4cddf6dc623..008f9fac5fe4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/datastore/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/datastore/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/machinelearningcomputes/id_compute.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/machinelearningcomputes/id_compute.go index 18a81277e2a5..0a5c48c2b75c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/machinelearningcomputes/id_compute.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/machinelearningcomputes/id_compute.go @@ -38,23 +38,9 @@ func ParseComputeID(input string) (*ComputeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ComputeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.ComputeName, ok = parsed.Parsed["computeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "computeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseComputeIDInsensitively(input string) (*ComputeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ComputeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ComputeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.ComputeName, ok = parsed.Parsed["computeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "computeName", *parsed) + if id.ComputeName, ok = input.Parsed["computeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "computeName", input) } - return &id, nil + return nil } // ValidateComputeID checks that 'input' can be parsed as a Compute ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/machinelearningcomputes/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/machinelearningcomputes/id_workspace.go index 433fbb7591ce..97b8f1ce4422 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/machinelearningcomputes/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/machinelearningcomputes/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/workspaces/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/workspaces/id_workspace.go index c37f08503e26..42b6e9c9d8ac 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/workspaces/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/workspaces/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/id_scopedconfigurationassignment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/id_scopedconfigurationassignment.go index 9f95acbccce5..38308f6c50cc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/id_scopedconfigurationassignment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/configurationassignments/id_scopedconfigurationassignment.go @@ -34,15 +34,9 @@ func ParseScopedConfigurationAssignmentID(input string) (*ScopedConfigurationAss return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedConfigurationAssignmentId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.ConfigurationAssignmentName, ok = parsed.Parsed["configurationAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationAssignmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedConfigurationAssignmentIDInsensitively(input string) (*ScopedCon return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedConfigurationAssignmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedConfigurationAssignmentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.ConfigurationAssignmentName, ok = parsed.Parsed["configurationAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationAssignmentName", *parsed) + if id.ConfigurationAssignmentName, ok = input.Parsed["configurationAssignmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "configurationAssignmentName", input) } - return &id, nil + return nil } // ValidateScopedConfigurationAssignmentID checks that 'input' can be parsed as a Scoped Configuration Assignment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/id_maintenanceconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/id_maintenanceconfiguration.go index 243e35bb5ca2..51e5deca6671 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/id_maintenanceconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/maintenanceconfigurations/id_maintenanceconfiguration.go @@ -36,19 +36,9 @@ func ParseMaintenanceConfigurationID(input string) (*MaintenanceConfigurationId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MaintenanceConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MaintenanceConfigurationName, ok = parsed.Parsed["maintenanceConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "maintenanceConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMaintenanceConfigurationIDInsensitively(input string) (*MaintenanceCon return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MaintenanceConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MaintenanceConfigurationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MaintenanceConfigurationName, ok = parsed.Parsed["maintenanceConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "maintenanceConfigurationName", *parsed) + if id.MaintenanceConfigurationName, ok = input.Parsed["maintenanceConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "maintenanceConfigurationName", input) } - return &id, nil + return nil } // ValidateMaintenanceConfigurationID checks that 'input' can be parsed as a Maintenance Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/id_publicmaintenanceconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/id_publicmaintenanceconfiguration.go index d8e3c20a03c1..5f65e496d30c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/id_publicmaintenanceconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2022-07-01-preview/publicmaintenanceconfigurations/id_publicmaintenanceconfiguration.go @@ -34,15 +34,9 @@ func ParsePublicMaintenanceConfigurationID(input string) (*PublicMaintenanceConf return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PublicMaintenanceConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.PublicMaintenanceConfigurationName, ok = parsed.Parsed["publicMaintenanceConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publicMaintenanceConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParsePublicMaintenanceConfigurationIDInsensitively(input string) (*PublicMa return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PublicMaintenanceConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *PublicMaintenanceConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.PublicMaintenanceConfigurationName, ok = parsed.Parsed["publicMaintenanceConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publicMaintenanceConfigurationName", *parsed) + if id.PublicMaintenanceConfigurationName, ok = input.Parsed["publicMaintenanceConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "publicMaintenanceConfigurationName", input) } - return &id, nil + return nil } // ValidatePublicMaintenanceConfigurationID checks that 'input' can be parsed as a Public Maintenance Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/applicationdefinitions/id_applicationdefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/applicationdefinitions/id_applicationdefinition.go index 833c66e0683a..9871b0ac2a66 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/applicationdefinitions/id_applicationdefinition.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/applicationdefinitions/id_applicationdefinition.go @@ -36,19 +36,9 @@ func ParseApplicationDefinitionID(input string) (*ApplicationDefinitionId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationDefinitionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationDefinitionName, ok = parsed.Parsed["applicationDefinitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationDefinitionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseApplicationDefinitionIDInsensitively(input string) (*ApplicationDefini return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationDefinitionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ApplicationDefinitionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ApplicationDefinitionName, ok = parsed.Parsed["applicationDefinitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationDefinitionName", *parsed) + if id.ApplicationDefinitionName, ok = input.Parsed["applicationDefinitionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationDefinitionName", input) } - return &id, nil + return nil } // ValidateApplicationDefinitionID checks that 'input' can be parsed as a Application Definition ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/applications/id_application.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/applications/id_application.go index 45d20c2e8946..5a3a4e4e2796 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/applications/id_application.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/applications/id_application.go @@ -36,19 +36,9 @@ func ParseApplicationID(input string) (*ApplicationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationName, ok = parsed.Parsed["applicationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ApplicationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ApplicationName, ok = parsed.Parsed["applicationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationName", *parsed) + if id.ApplicationName, ok = input.Parsed["applicationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationName", input) } - return &id, nil + return nil } // ValidateApplicationID checks that 'input' can be parsed as a Application ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/applications/id_applicationid.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/applications/id_applicationid.go index 2960c4ce29b1..814441d13f6e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/applications/id_applicationid.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/applications/id_applicationid.go @@ -32,11 +32,9 @@ func ParseApplicationIdID(input string) (*ApplicationIdId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationIdId{} - - if id.ApplicationId, ok = parsed.Parsed["applicationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseApplicationIdIDInsensitively(input string) (*ApplicationIdId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationIdId{} - - if id.ApplicationId, ok = parsed.Parsed["applicationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *ApplicationIdId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ApplicationId, ok = input.Parsed["applicationId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationId", input) + } + + return nil +} + // ValidateApplicationIdID checks that 'input' can be parsed as a Application Id ID func ValidateApplicationIdID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2023-01-31/managedidentities/id_federatedidentitycredential.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2023-01-31/managedidentities/id_federatedidentitycredential.go index 66f4b9d03138..89f0189be53a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2023-01-31/managedidentities/id_federatedidentitycredential.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2023-01-31/managedidentities/id_federatedidentitycredential.go @@ -38,23 +38,9 @@ func ParseFederatedIdentityCredentialID(input string) (*FederatedIdentityCredent return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FederatedIdentityCredentialId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.UserAssignedIdentityName, ok = parsed.Parsed["userAssignedIdentityName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "userAssignedIdentityName", *parsed) - } - - if id.FederatedIdentityCredentialName, ok = parsed.Parsed["federatedIdentityCredentialName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "federatedIdentityCredentialName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseFederatedIdentityCredentialIDInsensitively(input string) (*FederatedId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FederatedIdentityCredentialId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FederatedIdentityCredentialId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.UserAssignedIdentityName, ok = parsed.Parsed["userAssignedIdentityName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "userAssignedIdentityName", *parsed) + if id.UserAssignedIdentityName, ok = input.Parsed["userAssignedIdentityName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "userAssignedIdentityName", input) } - if id.FederatedIdentityCredentialName, ok = parsed.Parsed["federatedIdentityCredentialName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "federatedIdentityCredentialName", *parsed) + if id.FederatedIdentityCredentialName, ok = input.Parsed["federatedIdentityCredentialName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "federatedIdentityCredentialName", input) } - return &id, nil + return nil } // ValidateFederatedIdentityCredentialID checks that 'input' can be parsed as a Federated Identity Credential ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationassignments/id_scopedregistrationassignment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationassignments/id_scopedregistrationassignment.go index 890cb0e8375d..07354542e4a6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationassignments/id_scopedregistrationassignment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationassignments/id_scopedregistrationassignment.go @@ -34,15 +34,9 @@ func ParseScopedRegistrationAssignmentID(input string) (*ScopedRegistrationAssig return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRegistrationAssignmentId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.RegistrationAssignmentId, ok = parsed.Parsed["registrationAssignmentId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registrationAssignmentId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedRegistrationAssignmentIDInsensitively(input string) (*ScopedRegi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRegistrationAssignmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedRegistrationAssignmentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.RegistrationAssignmentId, ok = parsed.Parsed["registrationAssignmentId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registrationAssignmentId", *parsed) + if id.RegistrationAssignmentId, ok = input.Parsed["registrationAssignmentId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registrationAssignmentId", input) } - return &id, nil + return nil } // ValidateScopedRegistrationAssignmentID checks that 'input' can be parsed as a Scoped Registration Assignment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2022-10-01/registrationdefinitions/id_scopedregistrationdefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2022-10-01/registrationdefinitions/id_scopedregistrationdefinition.go index 43622d6c56f0..fda278523263 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2022-10-01/registrationdefinitions/id_scopedregistrationdefinition.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2022-10-01/registrationdefinitions/id_scopedregistrationdefinition.go @@ -34,15 +34,9 @@ func ParseScopedRegistrationDefinitionID(input string) (*ScopedRegistrationDefin return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRegistrationDefinitionId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.RegistrationDefinitionId, ok = parsed.Parsed["registrationDefinitionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registrationDefinitionId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedRegistrationDefinitionIDInsensitively(input string) (*ScopedRegi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRegistrationDefinitionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedRegistrationDefinitionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.RegistrationDefinitionId, ok = parsed.Parsed["registrationDefinitionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "registrationDefinitionId", *parsed) + if id.RegistrationDefinitionId, ok = input.Parsed["registrationDefinitionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "registrationDefinitionId", input) } - return &id, nil + return nil } // ValidateScopedRegistrationDefinitionID checks that 'input' can be parsed as a Scoped Registration Definition ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/id_account.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/id_account.go index 08385f15f8e0..45a52d08f0bb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/id_account.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts/id_account.go @@ -36,19 +36,9 @@ func ParseAccountID(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - return &id, nil + return nil } // ValidateAccountID checks that 'input' can be parsed as a Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/id_account.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/id_account.go index 4d069b36b070..6f136b9a08e0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/id_account.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/id_account.go @@ -36,19 +36,9 @@ func ParseAccountID(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - return &id, nil + return nil } // ValidateAccountID checks that 'input' can be parsed as a Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/id_creator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/id_creator.go index cded00e95ef6..233238ce01d2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/id_creator.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators/id_creator.go @@ -38,23 +38,9 @@ func ParseCreatorID(input string) (*CreatorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CreatorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) - } - - if id.CreatorName, ok = parsed.Parsed["creatorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "creatorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCreatorIDInsensitively(input string) (*CreatorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CreatorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CreatorId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - if id.CreatorName, ok = parsed.Parsed["creatorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "creatorName", *parsed) + if id.CreatorName, ok = input.Parsed["creatorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "creatorName", input) } - return &id, nil + return nil } // ValidateCreatorID checks that 'input' can be parsed as a Creator ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_configuration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_configuration.go index 52d9a37c587b..de590df40d9b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_configuration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_configuration.go @@ -38,23 +38,9 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) - } - - if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + if id.ConfigurationName, ok = input.Parsed["configurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "configurationName", input) } - return &id, nil + return nil } // ValidateConfigurationID checks that 'input' can be parsed as a Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_server.go index 5535ba69e0ef..39b4985e026d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_database.go index de5b435be389..a991b41809e7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_database.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_database.go @@ -38,23 +38,9 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool 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 = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - return &id, nil + return nil } // ValidateDatabaseID checks that 'input' can be parsed as a Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_server.go index ed80580f2be1..6f498c89c093 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_firewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_firewallrule.go index 3c08343ab5b4..3184f1cac526 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_firewallrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_firewallrule.go @@ -38,23 +38,9 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) - } - - if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FirewallRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", *parsed) + if id.FirewallRuleName, ok = input.Parsed["firewallRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", input) } - return &id, nil + return nil } // ValidateFirewallRuleID checks that 'input' can be parsed as a Firewall Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_server.go index 8b41503799c4..ef21ad5326af 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/id_server.go index a178ad9ffd0a..c887e84299ea 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_server.go index feb296326b96..50cbfedec110 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_virtualnetworkrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_virtualnetworkrule.go index 7832b404ca19..2ead8a105fc0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_virtualnetworkrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_virtualnetworkrule.go @@ -38,23 +38,9 @@ func ParseVirtualNetworkRuleID(input string) (*VirtualNetworkRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) - } - - if id.VirtualNetworkRuleName, ok = parsed.Parsed["virtualNetworkRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseVirtualNetworkRuleIDInsensitively(input string) (*VirtualNetworkRuleId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VirtualNetworkRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - if id.VirtualNetworkRuleName, ok = parsed.Parsed["virtualNetworkRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkRuleName", *parsed) + if id.VirtualNetworkRuleName, ok = input.Parsed["virtualNetworkRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkRuleName", input) } - return &id, nil + return nil } // ValidateVirtualNetworkRuleID checks that 'input' can be parsed as a Virtual Network Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/marketplaceordering/2015-06-01/agreements/id_offerplan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/marketplaceordering/2015-06-01/agreements/id_offerplan.go index cf08432ab6d2..bd6fa00f4ea0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/marketplaceordering/2015-06-01/agreements/id_offerplan.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/marketplaceordering/2015-06-01/agreements/id_offerplan.go @@ -38,23 +38,9 @@ func ParseOfferPlanID(input string) (*OfferPlanId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OfferPlanId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.PublisherId, ok = parsed.Parsed["publisherId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publisherId", *parsed) - } - - if id.OfferId, ok = parsed.Parsed["offerId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "offerId", *parsed) - } - - if id.PlanId, ok = parsed.Parsed["planId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "planId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseOfferPlanIDInsensitively(input string) (*OfferPlanId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OfferPlanId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *OfferPlanId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.PublisherId, ok = parsed.Parsed["publisherId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publisherId", *parsed) + if id.PublisherId, ok = input.Parsed["publisherId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "publisherId", input) } - if id.OfferId, ok = parsed.Parsed["offerId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "offerId", *parsed) + if id.OfferId, ok = input.Parsed["offerId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "offerId", input) } - if id.PlanId, ok = parsed.Parsed["planId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "planId", *parsed) + if id.PlanId, ok = input.Parsed["planId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "planId", input) } - return &id, nil + return nil } // ValidateOfferPlanID checks that 'input' can be parsed as a Offer Plan ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/marketplaceordering/2015-06-01/agreements/id_plan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/marketplaceordering/2015-06-01/agreements/id_plan.go index 855bb5854088..93f0547a335e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/marketplaceordering/2015-06-01/agreements/id_plan.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/marketplaceordering/2015-06-01/agreements/id_plan.go @@ -38,23 +38,9 @@ func ParsePlanID(input string) (*PlanId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PlanId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.PublisherId, ok = parsed.Parsed["publisherId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publisherId", *parsed) - } - - if id.OfferId, ok = parsed.Parsed["offerId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "offerId", *parsed) - } - - if id.PlanId, ok = parsed.Parsed["planId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "planId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePlanIDInsensitively(input string) (*PlanId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PlanId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PlanId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.PublisherId, ok = parsed.Parsed["publisherId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publisherId", *parsed) + if id.PublisherId, ok = input.Parsed["publisherId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "publisherId", input) } - if id.OfferId, ok = parsed.Parsed["offerId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "offerId", *parsed) + if id.OfferId, ok = input.Parsed["offerId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "offerId", input) } - if id.PlanId, ok = parsed.Parsed["planId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "planId", *parsed) + if id.PlanId, ok = input.Parsed["planId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "planId", input) } - return &id, nil + return nil } // ValidatePlanID checks that 'input' can be parsed as a Plan ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/id_accountfilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/id_accountfilter.go index 09bebc83a96b..1e2781ba04d1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/id_accountfilter.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/id_accountfilter.go @@ -38,23 +38,9 @@ func ParseAccountFilterID(input string) (*AccountFilterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.AccountFilterName, ok = parsed.Parsed["accountFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountFilterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAccountFilterIDInsensitively(input string) (*AccountFilterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountFilterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AccountFilterId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.AccountFilterName, ok = parsed.Parsed["accountFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountFilterName", *parsed) + if id.AccountFilterName, ok = input.Parsed["accountFilterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountFilterName", input) } - return &id, nil + return nil } // ValidateAccountFilterID checks that 'input' can be parsed as a Account Filter ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/id_mediaservice.go index fdc7ca2a0c58..aa414f3938bd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/id_mediaservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters/id_mediaservice.go @@ -36,19 +36,9 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MediaServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - return &id, nil + return nil } // ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_location.go index 09d6433cf7f4..07bd0ab76a19 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_mediaservice.go index b87c1167ac02..6b30ea8bace8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_mediaservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_mediaservice.go @@ -36,19 +36,9 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MediaServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - return &id, nil + return nil } // ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_privateendpointconnection.go index 4bf408f58044..500f951c1570 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_privateendpointconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_privateendpointconnection.go @@ -38,23 +38,9 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", input) } - return &id, nil + return nil } // ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_privatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_privatelinkresource.go index 0ece273e4421..8f4df28715bd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_privatelinkresource.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts/id_privatelinkresource.go @@ -38,23 +38,9 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateLinkResourceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.PrivateLinkResourceName, ok = parsed.Parsed["privateLinkResourceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkResourceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateLinkResourceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateLinkResourceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.PrivateLinkResourceName, ok = parsed.Parsed["privateLinkResourceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkResourceName", *parsed) + if id.PrivateLinkResourceName, ok = input.Parsed["privateLinkResourceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkResourceName", input) } - return &id, nil + return nil } // ValidatePrivateLinkResourceID checks that 'input' can be parsed as a Private Link Resource ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_asset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_asset.go index 388aedc8f818..d81235d8dfe0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_asset.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_asset.go @@ -38,23 +38,9 @@ func ParseAssetID(input string) (*AssetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AssetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.AssetName, ok = parsed.Parsed["assetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAssetIDInsensitively(input string) (*AssetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AssetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AssetId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.AssetName, ok = parsed.Parsed["assetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assetName", *parsed) + if id.AssetName, ok = input.Parsed["assetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "assetName", input) } - return &id, nil + return nil } // ValidateAssetID checks that 'input' can be parsed as a Asset ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_assetfilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_assetfilter.go index 9c7367af6b4c..641b06dede90 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_assetfilter.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_assetfilter.go @@ -40,27 +40,9 @@ func ParseAssetFilterID(input string) (*AssetFilterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AssetFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.AssetName, ok = parsed.Parsed["assetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assetName", *parsed) - } - - if id.AssetFilterName, ok = parsed.Parsed["assetFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assetFilterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseAssetFilterIDInsensitively(input string) (*AssetFilterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AssetFilterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *AssetFilterId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.AssetName, ok = parsed.Parsed["assetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assetName", *parsed) + if id.AssetName, ok = input.Parsed["assetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "assetName", input) } - if id.AssetFilterName, ok = parsed.Parsed["assetFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assetFilterName", *parsed) + if id.AssetFilterName, ok = input.Parsed["assetFilterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "assetFilterName", input) } - return &id, nil + return nil } // ValidateAssetFilterID checks that 'input' can be parsed as a Asset Filter ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_mediaservice.go index 98df2e0ff2b4..04814d7bcae0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_mediaservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_mediaservice.go @@ -36,19 +36,9 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MediaServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - return &id, nil + return nil } // ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_track.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_track.go index 7b0956f24298..411058d73def 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_track.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters/id_track.go @@ -40,27 +40,9 @@ func ParseTrackID(input string) (*TrackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TrackId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.AssetName, ok = parsed.Parsed["assetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assetName", *parsed) - } - - if id.TrackName, ok = parsed.Parsed["trackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseTrackIDInsensitively(input string) (*TrackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TrackId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *TrackId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.AssetName, ok = parsed.Parsed["assetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assetName", *parsed) + if id.AssetName, ok = input.Parsed["assetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "assetName", input) } - if id.TrackName, ok = parsed.Parsed["trackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trackName", *parsed) + if id.TrackName, ok = input.Parsed["trackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "trackName", input) } - return &id, nil + return nil } // ValidateTrackID checks that 'input' can be parsed as a Track ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/id_contentkeypolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/id_contentkeypolicy.go index a639f299f7d9..c6d19670d29d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/id_contentkeypolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/id_contentkeypolicy.go @@ -38,23 +38,9 @@ func ParseContentKeyPolicyID(input string) (*ContentKeyPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContentKeyPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.ContentKeyPolicyName, ok = parsed.Parsed["contentKeyPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "contentKeyPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseContentKeyPolicyIDInsensitively(input string) (*ContentKeyPolicyId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContentKeyPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ContentKeyPolicyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.ContentKeyPolicyName, ok = parsed.Parsed["contentKeyPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "contentKeyPolicyName", *parsed) + if id.ContentKeyPolicyName, ok = input.Parsed["contentKeyPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "contentKeyPolicyName", input) } - return &id, nil + return nil } // ValidateContentKeyPolicyID checks that 'input' can be parsed as a Content Key Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/id_mediaservice.go index 0530b48da908..4b966221c63d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/id_mediaservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies/id_mediaservice.go @@ -36,19 +36,9 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MediaServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - return &id, nil + return nil } // ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_job.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_job.go index 2815b6b89fc0..74fcdc7af725 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_job.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_job.go @@ -40,27 +40,9 @@ func ParseJobID(input string) (*JobId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := JobId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.TransformName, ok = parsed.Parsed["transformName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "transformName", *parsed) - } - - if id.JobName, ok = parsed.Parsed["jobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := JobId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *JobId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.TransformName, ok = parsed.Parsed["transformName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "transformName", *parsed) + if id.TransformName, ok = input.Parsed["transformName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "transformName", input) } - if id.JobName, ok = parsed.Parsed["jobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobName", *parsed) + if id.JobName, ok = input.Parsed["jobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobName", input) } - return &id, nil + return nil } // ValidateJobID checks that 'input' can be parsed as a Job ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_mediaservice.go index 132ac54ae213..4700fb1369d6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_mediaservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_mediaservice.go @@ -36,19 +36,9 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MediaServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - return &id, nil + return nil } // ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_transform.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_transform.go index edbadbb57c03..5bd09bf2f20d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_transform.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings/id_transform.go @@ -38,23 +38,9 @@ func ParseTransformID(input string) (*TransformId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TransformId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.TransformName, ok = parsed.Parsed["transformName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "transformName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTransformIDInsensitively(input string) (*TransformId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TransformId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TransformId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.TransformName, ok = parsed.Parsed["transformName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "transformName", *parsed) + if id.TransformName, ok = input.Parsed["transformName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "transformName", input) } - return &id, nil + return nil } // ValidateTransformID checks that 'input' can be parsed as a Transform ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/id_liveevent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/id_liveevent.go index 54f722e0dc18..293562206751 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/id_liveevent.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/id_liveevent.go @@ -38,23 +38,9 @@ func ParseLiveEventID(input string) (*LiveEventId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LiveEventId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLiveEventIDInsensitively(input string) (*LiveEventId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LiveEventId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LiveEventId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", *parsed) + if id.LiveEventName, ok = input.Parsed["liveEventName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", input) } - return &id, nil + return nil } // ValidateLiveEventID checks that 'input' can be parsed as a Live Event ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/id_mediaservice.go index 354f5f9e6e9e..a5c9eedcee00 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/id_mediaservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents/id_mediaservice.go @@ -36,19 +36,9 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MediaServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - return &id, nil + return nil } // ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/id_liveevent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/id_liveevent.go index daf535f56d42..2a294bb2a871 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/id_liveevent.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/id_liveevent.go @@ -38,23 +38,9 @@ func ParseLiveEventID(input string) (*LiveEventId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LiveEventId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLiveEventIDInsensitively(input string) (*LiveEventId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LiveEventId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LiveEventId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", *parsed) + if id.LiveEventName, ok = input.Parsed["liveEventName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", input) } - return &id, nil + return nil } // ValidateLiveEventID checks that 'input' can be parsed as a Live Event ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/id_liveoutput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/id_liveoutput.go index 8d9aa43084ac..dea2b65f673b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/id_liveoutput.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs/id_liveoutput.go @@ -40,27 +40,9 @@ func ParseLiveOutputID(input string) (*LiveOutputId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LiveOutputId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", *parsed) - } - - if id.LiveOutputName, ok = parsed.Parsed["liveOutputName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "liveOutputName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseLiveOutputIDInsensitively(input string) (*LiveOutputId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LiveOutputId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LiveOutputId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", *parsed) + if id.LiveEventName, ok = input.Parsed["liveEventName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", input) } - if id.LiveOutputName, ok = parsed.Parsed["liveOutputName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "liveOutputName", *parsed) + if id.LiveOutputName, ok = input.Parsed["liveOutputName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "liveOutputName", input) } - return &id, nil + return nil } // ValidateLiveOutputID checks that 'input' can be parsed as a Live Output ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/id_mediaservice.go index 4e906722e849..9396721536c9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/id_mediaservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/id_mediaservice.go @@ -36,19 +36,9 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MediaServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - return &id, nil + return nil } // ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/id_streamingendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/id_streamingendpoint.go index e49e92304ff6..3cb564769bc4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/id_streamingendpoint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints/id_streamingendpoint.go @@ -38,23 +38,9 @@ func ParseStreamingEndpointID(input string) (*StreamingEndpointId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.StreamingEndpointName, ok = parsed.Parsed["streamingEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingEndpointName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseStreamingEndpointIDInsensitively(input string) (*StreamingEndpointId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingEndpointId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *StreamingEndpointId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.StreamingEndpointName, ok = parsed.Parsed["streamingEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingEndpointName", *parsed) + if id.StreamingEndpointName, ok = input.Parsed["streamingEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "streamingEndpointName", input) } - return &id, nil + return nil } // ValidateStreamingEndpointID checks that 'input' can be parsed as a Streaming Endpoint ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_mediaservice.go index f5ec1a628f9c..a7b698c92223 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_mediaservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_mediaservice.go @@ -36,19 +36,9 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MediaServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - return &id, nil + return nil } // ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go index 7685f6c17057..54a38d652e47 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go @@ -38,23 +38,9 @@ func ParseStreamingLocatorID(input string) (*StreamingLocatorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingLocatorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.StreamingLocatorName, ok = parsed.Parsed["streamingLocatorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingLocatorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseStreamingLocatorIDInsensitively(input string) (*StreamingLocatorId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingLocatorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *StreamingLocatorId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.StreamingLocatorName, ok = parsed.Parsed["streamingLocatorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingLocatorName", *parsed) + if id.StreamingLocatorName, ok = input.Parsed["streamingLocatorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "streamingLocatorName", input) } - return &id, nil + return nil } // ValidateStreamingLocatorID checks that 'input' can be parsed as a Streaming Locator ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go index 2575a685a183..b9c3100c7f26 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go @@ -38,23 +38,9 @@ func ParseStreamingPolicyID(input string) (*StreamingPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.StreamingPolicyName, ok = parsed.Parsed["streamingPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseStreamingPolicyIDInsensitively(input string) (*StreamingPolicyId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *StreamingPolicyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.StreamingPolicyName, ok = parsed.Parsed["streamingPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingPolicyName", *parsed) + if id.StreamingPolicyName, ok = input.Parsed["streamingPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "streamingPolicyName", input) } - return &id, nil + return nil } // ValidateStreamingPolicyID checks that 'input' can be parsed as a Streaming Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_job.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_job.go index 2815b6b89fc0..74fcdc7af725 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_job.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_job.go @@ -40,27 +40,9 @@ func ParseJobID(input string) (*JobId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := JobId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.TransformName, ok = parsed.Parsed["transformName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "transformName", *parsed) - } - - if id.JobName, ok = parsed.Parsed["jobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := JobId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *JobId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.TransformName, ok = parsed.Parsed["transformName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "transformName", *parsed) + if id.TransformName, ok = input.Parsed["transformName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "transformName", input) } - if id.JobName, ok = parsed.Parsed["jobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobName", *parsed) + if id.JobName, ok = input.Parsed["jobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobName", input) } - return &id, nil + return nil } // ValidateJobID checks that 'input' can be parsed as a Job ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_mediaservice.go index 132ac54ae213..4700fb1369d6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_mediaservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_mediaservice.go @@ -36,19 +36,9 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MediaServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - return &id, nil + return nil } // ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_transform.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_transform.go index edbadbb57c03..5bd09bf2f20d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_transform.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings/id_transform.go @@ -38,23 +38,9 @@ func ParseTransformID(input string) (*TransformId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TransformId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.TransformName, ok = parsed.Parsed["transformName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "transformName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTransformIDInsensitively(input string) (*TransformId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TransformId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TransformId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.TransformName, ok = parsed.Parsed["transformName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "transformName", *parsed) + if id.TransformName, ok = input.Parsed["transformName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "transformName", input) } - return &id, nil + return nil } // ValidateTransformID checks that 'input' can be parsed as a Transform ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/id_accountfilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/id_accountfilter.go index 09bebc83a96b..1e2781ba04d1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/id_accountfilter.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/id_accountfilter.go @@ -38,23 +38,9 @@ func ParseAccountFilterID(input string) (*AccountFilterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.AccountFilterName, ok = parsed.Parsed["accountFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountFilterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAccountFilterIDInsensitively(input string) (*AccountFilterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountFilterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AccountFilterId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.AccountFilterName, ok = parsed.Parsed["accountFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountFilterName", *parsed) + if id.AccountFilterName, ok = input.Parsed["accountFilterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountFilterName", input) } - return &id, nil + return nil } // ValidateAccountFilterID checks that 'input' can be parsed as a Account Filter ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/id_mediaservice.go index fdc7ca2a0c58..aa414f3938bd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/id_mediaservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters/id_mediaservice.go @@ -36,19 +36,9 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MediaServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - return &id, nil + return nil } // ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_asset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_asset.go index 388aedc8f818..d81235d8dfe0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_asset.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_asset.go @@ -38,23 +38,9 @@ func ParseAssetID(input string) (*AssetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AssetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.AssetName, ok = parsed.Parsed["assetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAssetIDInsensitively(input string) (*AssetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AssetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AssetId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.AssetName, ok = parsed.Parsed["assetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assetName", *parsed) + if id.AssetName, ok = input.Parsed["assetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "assetName", input) } - return &id, nil + return nil } // ValidateAssetID checks that 'input' can be parsed as a Asset ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_assetfilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_assetfilter.go index 9c7367af6b4c..641b06dede90 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_assetfilter.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_assetfilter.go @@ -40,27 +40,9 @@ func ParseAssetFilterID(input string) (*AssetFilterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AssetFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.AssetName, ok = parsed.Parsed["assetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assetName", *parsed) - } - - if id.AssetFilterName, ok = parsed.Parsed["assetFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assetFilterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseAssetFilterIDInsensitively(input string) (*AssetFilterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AssetFilterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *AssetFilterId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.AssetName, ok = parsed.Parsed["assetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assetName", *parsed) + if id.AssetName, ok = input.Parsed["assetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "assetName", input) } - if id.AssetFilterName, ok = parsed.Parsed["assetFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assetFilterName", *parsed) + if id.AssetFilterName, ok = input.Parsed["assetFilterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "assetFilterName", input) } - return &id, nil + return nil } // ValidateAssetFilterID checks that 'input' can be parsed as a Asset Filter ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_mediaservice.go index 98df2e0ff2b4..04814d7bcae0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_mediaservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_mediaservice.go @@ -36,19 +36,9 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MediaServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - return &id, nil + return nil } // ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_track.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_track.go index 7b0956f24298..411058d73def 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_track.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters/id_track.go @@ -40,27 +40,9 @@ func ParseTrackID(input string) (*TrackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TrackId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.AssetName, ok = parsed.Parsed["assetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assetName", *parsed) - } - - if id.TrackName, ok = parsed.Parsed["trackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseTrackIDInsensitively(input string) (*TrackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TrackId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *TrackId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.AssetName, ok = parsed.Parsed["assetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assetName", *parsed) + if id.AssetName, ok = input.Parsed["assetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "assetName", input) } - if id.TrackName, ok = parsed.Parsed["trackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trackName", *parsed) + if id.TrackName, ok = input.Parsed["trackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "trackName", input) } - return &id, nil + return nil } // ValidateTrackID checks that 'input' can be parsed as a Track ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/id_contentkeypolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/id_contentkeypolicy.go index a639f299f7d9..c6d19670d29d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/id_contentkeypolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/id_contentkeypolicy.go @@ -38,23 +38,9 @@ func ParseContentKeyPolicyID(input string) (*ContentKeyPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContentKeyPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.ContentKeyPolicyName, ok = parsed.Parsed["contentKeyPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "contentKeyPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseContentKeyPolicyIDInsensitively(input string) (*ContentKeyPolicyId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContentKeyPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ContentKeyPolicyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.ContentKeyPolicyName, ok = parsed.Parsed["contentKeyPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "contentKeyPolicyName", *parsed) + if id.ContentKeyPolicyName, ok = input.Parsed["contentKeyPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "contentKeyPolicyName", input) } - return &id, nil + return nil } // ValidateContentKeyPolicyID checks that 'input' can be parsed as a Content Key Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/id_mediaservice.go index 0530b48da908..4b966221c63d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/id_mediaservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies/id_mediaservice.go @@ -36,19 +36,9 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MediaServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - return &id, nil + return nil } // ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_liveevent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_liveevent.go index 54f722e0dc18..293562206751 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_liveevent.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_liveevent.go @@ -38,23 +38,9 @@ func ParseLiveEventID(input string) (*LiveEventId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LiveEventId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLiveEventIDInsensitively(input string) (*LiveEventId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LiveEventId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LiveEventId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", *parsed) + if id.LiveEventName, ok = input.Parsed["liveEventName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", input) } - return &id, nil + return nil } // ValidateLiveEventID checks that 'input' can be parsed as a Live Event ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_liveeventoperation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_liveeventoperation.go index efe6b92d3a1d..8395bebf02e6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_liveeventoperation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_liveeventoperation.go @@ -38,23 +38,9 @@ func ParseLiveEventOperationID(input string) (*LiveEventOperationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LiveEventOperationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.OperationId, ok = parsed.Parsed["operationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLiveEventOperationIDInsensitively(input string) (*LiveEventOperationId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LiveEventOperationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LiveEventOperationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.OperationId, ok = parsed.Parsed["operationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationId", *parsed) + if id.OperationId, ok = input.Parsed["operationId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "operationId", input) } - return &id, nil + return nil } // ValidateLiveEventOperationID checks that 'input' can be parsed as a Live Event Operation ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_mediaservice.go index 354f5f9e6e9e..a5c9eedcee00 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_mediaservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents/id_mediaservice.go @@ -36,19 +36,9 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MediaServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - return &id, nil + return nil } // ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveevent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveevent.go index daf535f56d42..2a294bb2a871 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveevent.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveevent.go @@ -38,23 +38,9 @@ func ParseLiveEventID(input string) (*LiveEventId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LiveEventId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLiveEventIDInsensitively(input string) (*LiveEventId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LiveEventId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LiveEventId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", *parsed) + if id.LiveEventName, ok = input.Parsed["liveEventName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", input) } - return &id, nil + return nil } // ValidateLiveEventID checks that 'input' can be parsed as a Live Event ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveoutput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveoutput.go index 8d9aa43084ac..dea2b65f673b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveoutput.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveoutput.go @@ -40,27 +40,9 @@ func ParseLiveOutputID(input string) (*LiveOutputId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LiveOutputId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", *parsed) - } - - if id.LiveOutputName, ok = parsed.Parsed["liveOutputName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "liveOutputName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseLiveOutputIDInsensitively(input string) (*LiveOutputId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LiveOutputId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LiveOutputId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.LiveEventName, ok = parsed.Parsed["liveEventName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", *parsed) + if id.LiveEventName, ok = input.Parsed["liveEventName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "liveEventName", input) } - if id.LiveOutputName, ok = parsed.Parsed["liveOutputName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "liveOutputName", *parsed) + if id.LiveOutputName, ok = input.Parsed["liveOutputName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "liveOutputName", input) } - return &id, nil + return nil } // ValidateLiveOutputID checks that 'input' can be parsed as a Live Output ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveoutputoperation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveoutputoperation.go index 24b0d84bd273..45d739eb46e9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveoutputoperation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs/id_liveoutputoperation.go @@ -38,23 +38,9 @@ func ParseLiveOutputOperationID(input string) (*LiveOutputOperationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LiveOutputOperationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.OperationId, ok = parsed.Parsed["operationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLiveOutputOperationIDInsensitively(input string) (*LiveOutputOperation return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LiveOutputOperationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LiveOutputOperationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.OperationId, ok = parsed.Parsed["operationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationId", *parsed) + if id.OperationId, ok = input.Parsed["operationId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "operationId", input) } - return &id, nil + return nil } // ValidateLiveOutputOperationID checks that 'input' can be parsed as a Live Output Operation ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_mediaservice.go index 4e906722e849..9396721536c9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_mediaservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_mediaservice.go @@ -36,19 +36,9 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MediaServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - return &id, nil + return nil } // ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpoint.go index e49e92304ff6..3cb564769bc4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpoint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpoint.go @@ -38,23 +38,9 @@ func ParseStreamingEndpointID(input string) (*StreamingEndpointId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.StreamingEndpointName, ok = parsed.Parsed["streamingEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingEndpointName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseStreamingEndpointIDInsensitively(input string) (*StreamingEndpointId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingEndpointId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *StreamingEndpointId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.StreamingEndpointName, ok = parsed.Parsed["streamingEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingEndpointName", *parsed) + if id.StreamingEndpointName, ok = input.Parsed["streamingEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "streamingEndpointName", input) } - return &id, nil + return nil } // ValidateStreamingEndpointID checks that 'input' can be parsed as a Streaming Endpoint ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpointoperation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpointoperation.go index bde054415ac5..01924ca1ba2d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpointoperation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpointoperation.go @@ -38,23 +38,9 @@ func ParseStreamingEndpointOperationID(input string) (*StreamingEndpointOperatio return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingEndpointOperationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.OperationId, ok = parsed.Parsed["operationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseStreamingEndpointOperationIDInsensitively(input string) (*StreamingEnd return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingEndpointOperationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *StreamingEndpointOperationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.OperationId, ok = parsed.Parsed["operationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationId", *parsed) + if id.OperationId, ok = input.Parsed["operationId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "operationId", input) } - return &id, nil + return nil } // ValidateStreamingEndpointOperationID checks that 'input' can be parsed as a Streaming Endpoint Operation ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_mediaservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_mediaservice.go index f5ec1a628f9c..a7b698c92223 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_mediaservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_mediaservice.go @@ -36,19 +36,9 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MediaServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MediaServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - return &id, nil + return nil } // ValidateMediaServiceID checks that 'input' can be parsed as a Media Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go index 7685f6c17057..54a38d652e47 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go @@ -38,23 +38,9 @@ func ParseStreamingLocatorID(input string) (*StreamingLocatorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingLocatorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.StreamingLocatorName, ok = parsed.Parsed["streamingLocatorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingLocatorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseStreamingLocatorIDInsensitively(input string) (*StreamingLocatorId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingLocatorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *StreamingLocatorId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.StreamingLocatorName, ok = parsed.Parsed["streamingLocatorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingLocatorName", *parsed) + if id.StreamingLocatorName, ok = input.Parsed["streamingLocatorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "streamingLocatorName", input) } - return &id, nil + return nil } // ValidateStreamingLocatorID checks that 'input' can be parsed as a Streaming Locator ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go index 2575a685a183..b9c3100c7f26 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go @@ -38,23 +38,9 @@ func ParseStreamingPolicyID(input string) (*StreamingPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) - } - - if id.StreamingPolicyName, ok = parsed.Parsed["streamingPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseStreamingPolicyIDInsensitively(input string) (*StreamingPolicyId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *StreamingPolicyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MediaServiceName, ok = parsed.Parsed["mediaServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", *parsed) + if id.MediaServiceName, ok = input.Parsed["mediaServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mediaServiceName", input) } - if id.StreamingPolicyName, ok = parsed.Parsed["streamingPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingPolicyName", *parsed) + if id.StreamingPolicyName, ok = input.Parsed["streamingPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "streamingPolicyName", input) } - return &id, nil + return nil } // ValidateStreamingPolicyID checks that 'input' can be parsed as a Streaming Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/id_remoterenderingaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/id_remoterenderingaccount.go index 6fa891a5fe9a..aba7a0e6adec 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/id_remoterenderingaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/id_remoterenderingaccount.go @@ -36,19 +36,9 @@ func ParseRemoteRenderingAccountID(input string) (*RemoteRenderingAccountId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RemoteRenderingAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RemoteRenderingAccountName, ok = parsed.Parsed["remoteRenderingAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "remoteRenderingAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRemoteRenderingAccountIDInsensitively(input string) (*RemoteRenderingA return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RemoteRenderingAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RemoteRenderingAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RemoteRenderingAccountName, ok = parsed.Parsed["remoteRenderingAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "remoteRenderingAccountName", *parsed) + if id.RemoteRenderingAccountName, ok = input.Parsed["remoteRenderingAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "remoteRenderingAccountName", input) } - return &id, nil + return nil } // ValidateRemoteRenderingAccountID checks that 'input' can be parsed as a Remote Rendering Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/id_spatialanchorsaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/id_spatialanchorsaccount.go index 1f8fcebfce75..f827c8e6f2a1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/id_spatialanchorsaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource/id_spatialanchorsaccount.go @@ -36,19 +36,9 @@ func ParseSpatialAnchorsAccountID(input string) (*SpatialAnchorsAccountId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SpatialAnchorsAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpatialAnchorsAccountName, ok = parsed.Parsed["spatialAnchorsAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "spatialAnchorsAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSpatialAnchorsAccountIDInsensitively(input string) (*SpatialAnchorsAcc return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SpatialAnchorsAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SpatialAnchorsAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpatialAnchorsAccountName, ok = parsed.Parsed["spatialAnchorsAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "spatialAnchorsAccountName", *parsed) + if id.SpatialAnchorsAccountName, ok = input.Parsed["spatialAnchorsAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "spatialAnchorsAccountName", input) } - return &id, nil + return nil } // ValidateSpatialAnchorsAccountID checks that 'input' can be parsed as a Spatial Anchors Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/id_attacheddatanetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/id_attacheddatanetwork.go index 6587ebe81612..5ad3ee42b4ee 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/id_attacheddatanetwork.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/id_attacheddatanetwork.go @@ -40,27 +40,9 @@ func ParseAttachedDataNetworkID(input string) (*AttachedDataNetworkId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AttachedDataNetworkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PacketCoreControlPlaneName, ok = parsed.Parsed["packetCoreControlPlaneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "packetCoreControlPlaneName", *parsed) - } - - if id.PacketCoreDataPlaneName, ok = parsed.Parsed["packetCoreDataPlaneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "packetCoreDataPlaneName", *parsed) - } - - if id.AttachedDataNetworkName, ok = parsed.Parsed["attachedDataNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "attachedDataNetworkName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseAttachedDataNetworkIDInsensitively(input string) (*AttachedDataNetwork return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AttachedDataNetworkId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *AttachedDataNetworkId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PacketCoreControlPlaneName, ok = parsed.Parsed["packetCoreControlPlaneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "packetCoreControlPlaneName", *parsed) + if id.PacketCoreControlPlaneName, ok = input.Parsed["packetCoreControlPlaneName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "packetCoreControlPlaneName", input) } - if id.PacketCoreDataPlaneName, ok = parsed.Parsed["packetCoreDataPlaneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "packetCoreDataPlaneName", *parsed) + if id.PacketCoreDataPlaneName, ok = input.Parsed["packetCoreDataPlaneName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "packetCoreDataPlaneName", input) } - if id.AttachedDataNetworkName, ok = parsed.Parsed["attachedDataNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "attachedDataNetworkName", *parsed) + if id.AttachedDataNetworkName, ok = input.Parsed["attachedDataNetworkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "attachedDataNetworkName", input) } - return &id, nil + return nil } // ValidateAttachedDataNetworkID checks that 'input' can be parsed as a Attached Data Network ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/datanetwork/id_datanetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/datanetwork/id_datanetwork.go index 44fa45ae1327..686dadce350a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/datanetwork/id_datanetwork.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/datanetwork/id_datanetwork.go @@ -38,23 +38,9 @@ func ParseDataNetworkID(input string) (*DataNetworkId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataNetworkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MobileNetworkName, ok = parsed.Parsed["mobileNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", *parsed) - } - - if id.DataNetworkName, ok = parsed.Parsed["dataNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataNetworkName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDataNetworkIDInsensitively(input string) (*DataNetworkId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataNetworkId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DataNetworkId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MobileNetworkName, ok = parsed.Parsed["mobileNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", *parsed) + if id.MobileNetworkName, ok = input.Parsed["mobileNetworkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", input) } - if id.DataNetworkName, ok = parsed.Parsed["dataNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataNetworkName", *parsed) + if id.DataNetworkName, ok = input.Parsed["dataNetworkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dataNetworkName", input) } - return &id, nil + return nil } // ValidateDataNetworkID checks that 'input' can be parsed as a Data Network ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/id_mobilenetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/id_mobilenetwork.go index 3926cdecf402..3db623b94b4a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/id_mobilenetwork.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/id_mobilenetwork.go @@ -36,19 +36,9 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MobileNetworkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MobileNetworkName, ok = parsed.Parsed["mobileNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MobileNetworkId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MobileNetworkId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MobileNetworkName, ok = parsed.Parsed["mobileNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", *parsed) + if id.MobileNetworkName, ok = input.Parsed["mobileNetworkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", input) } - return &id, nil + return nil } // ValidateMobileNetworkID checks that 'input' can be parsed as a Mobile Network ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/id_packetcorecontrolplane.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/id_packetcorecontrolplane.go index 07ed68779072..a5fd1409642a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/id_packetcorecontrolplane.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/id_packetcorecontrolplane.go @@ -36,19 +36,9 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PacketCoreControlPlaneId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PacketCoreControlPlaneName, ok = parsed.Parsed["packetCoreControlPlaneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "packetCoreControlPlaneName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PacketCoreControlPlaneId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PacketCoreControlPlaneId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PacketCoreControlPlaneName, ok = parsed.Parsed["packetCoreControlPlaneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "packetCoreControlPlaneName", *parsed) + if id.PacketCoreControlPlaneName, ok = input.Parsed["packetCoreControlPlaneName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "packetCoreControlPlaneName", input) } - return &id, nil + return nil } // ValidatePacketCoreControlPlaneID checks that 'input' can be parsed as a Packet Core Control Plane ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/id_packetcoredataplane.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/id_packetcoredataplane.go index e6890480af8b..48c6b1f4d775 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/id_packetcoredataplane.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/id_packetcoredataplane.go @@ -38,23 +38,9 @@ func ParsePacketCoreDataPlaneID(input string) (*PacketCoreDataPlaneId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PacketCoreDataPlaneId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PacketCoreControlPlaneName, ok = parsed.Parsed["packetCoreControlPlaneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "packetCoreControlPlaneName", *parsed) - } - - if id.PacketCoreDataPlaneName, ok = parsed.Parsed["packetCoreDataPlaneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "packetCoreDataPlaneName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePacketCoreDataPlaneIDInsensitively(input string) (*PacketCoreDataPlane return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PacketCoreDataPlaneId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PacketCoreDataPlaneId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PacketCoreControlPlaneName, ok = parsed.Parsed["packetCoreControlPlaneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "packetCoreControlPlaneName", *parsed) + if id.PacketCoreControlPlaneName, ok = input.Parsed["packetCoreControlPlaneName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "packetCoreControlPlaneName", input) } - if id.PacketCoreDataPlaneName, ok = parsed.Parsed["packetCoreDataPlaneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "packetCoreDataPlaneName", *parsed) + if id.PacketCoreDataPlaneName, ok = input.Parsed["packetCoreDataPlaneName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "packetCoreDataPlaneName", input) } - return &id, nil + return nil } // ValidatePacketCoreDataPlaneID checks that 'input' can be parsed as a Packet Core Data Plane ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/service/id_service.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/service/id_service.go index 323042964f5b..cb22af831468 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/service/id_service.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/service/id_service.go @@ -38,23 +38,9 @@ func ParseServiceID(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MobileNetworkName, ok = parsed.Parsed["mobileNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", *parsed) - } - - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ServiceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MobileNetworkName, ok = parsed.Parsed["mobileNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", *parsed) + if id.MobileNetworkName, ok = input.Parsed["mobileNetworkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", input) } - if id.ServiceName, ok = parsed.Parsed["serviceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceName", *parsed) + if id.ServiceName, ok = input.Parsed["serviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceName", input) } - return &id, nil + return nil } // ValidateServiceID checks that 'input' can be parsed as a Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/sim/id_sim.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/sim/id_sim.go index f8d6b241f811..02e82cea2caa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/sim/id_sim.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/sim/id_sim.go @@ -38,23 +38,9 @@ func ParseSimID(input string) (*SimId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SimId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SimGroupName, ok = parsed.Parsed["simGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "simGroupName", *parsed) - } - - if id.SimName, ok = parsed.Parsed["simName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "simName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSimIDInsensitively(input string) (*SimId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SimId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SimId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SimGroupName, ok = parsed.Parsed["simGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "simGroupName", *parsed) + if id.SimGroupName, ok = input.Parsed["simGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "simGroupName", input) } - if id.SimName, ok = parsed.Parsed["simName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "simName", *parsed) + if id.SimName, ok = input.Parsed["simName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "simName", input) } - return &id, nil + return nil } // ValidateSimID checks that 'input' can be parsed as a Sim ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/simgroup/id_simgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/simgroup/id_simgroup.go index 303774665e02..f6d2c61b7cc9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/simgroup/id_simgroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/simgroup/id_simgroup.go @@ -36,19 +36,9 @@ func ParseSimGroupID(input string) (*SimGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SimGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SimGroupName, ok = parsed.Parsed["simGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "simGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSimGroupIDInsensitively(input string) (*SimGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SimGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SimGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SimGroupName, ok = parsed.Parsed["simGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "simGroupName", *parsed) + if id.SimGroupName, ok = input.Parsed["simGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "simGroupName", input) } - return &id, nil + return nil } // ValidateSimGroupID checks that 'input' can be parsed as a Sim Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/simpolicy/id_simpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/simpolicy/id_simpolicy.go index 85abda18014e..f93395200021 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/simpolicy/id_simpolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/simpolicy/id_simpolicy.go @@ -38,23 +38,9 @@ func ParseSimPolicyID(input string) (*SimPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SimPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MobileNetworkName, ok = parsed.Parsed["mobileNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", *parsed) - } - - if id.SimPolicyName, ok = parsed.Parsed["simPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "simPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSimPolicyIDInsensitively(input string) (*SimPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SimPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SimPolicyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MobileNetworkName, ok = parsed.Parsed["mobileNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", *parsed) + if id.MobileNetworkName, ok = input.Parsed["mobileNetworkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", input) } - if id.SimPolicyName, ok = parsed.Parsed["simPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "simPolicyName", *parsed) + if id.SimPolicyName, ok = input.Parsed["simPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "simPolicyName", input) } - return &id, nil + return nil } // ValidateSimPolicyID checks that 'input' can be parsed as a Sim Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/id_site.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/id_site.go index ff3d6a3d9752..d81ac0d5a65d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/id_site.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/id_site.go @@ -38,23 +38,9 @@ func ParseSiteID(input string) (*SiteId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SiteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MobileNetworkName, ok = parsed.Parsed["mobileNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", *parsed) - } - - if id.SiteName, ok = parsed.Parsed["siteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "siteName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSiteIDInsensitively(input string) (*SiteId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SiteId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SiteId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MobileNetworkName, ok = parsed.Parsed["mobileNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", *parsed) + if id.MobileNetworkName, ok = input.Parsed["mobileNetworkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", input) } - if id.SiteName, ok = parsed.Parsed["siteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "siteName", *parsed) + if id.SiteName, ok = input.Parsed["siteName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "siteName", input) } - return &id, nil + return nil } // ValidateSiteID checks that 'input' can be parsed as a Site ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/slice/id_slice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/slice/id_slice.go index 62541dc50bc7..23a1463fc8a1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/slice/id_slice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/slice/id_slice.go @@ -38,23 +38,9 @@ func ParseSliceID(input string) (*SliceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SliceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MobileNetworkName, ok = parsed.Parsed["mobileNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", *parsed) - } - - if id.SliceName, ok = parsed.Parsed["sliceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sliceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSliceIDInsensitively(input string) (*SliceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SliceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SliceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MobileNetworkName, ok = parsed.Parsed["mobileNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", *parsed) + if id.MobileNetworkName, ok = input.Parsed["mobileNetworkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", input) } - if id.SliceName, ok = parsed.Parsed["sliceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sliceName", *parsed) + if id.SliceName, ok = input.Parsed["sliceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sliceName", input) } - return &id, nil + return nil } // ValidateSliceID checks that 'input' can be parsed as a Slice ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/configurations/id_configuration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/configurations/id_configuration.go index 7feaec230250..dc6ea0c822f6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/configurations/id_configuration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/configurations/id_configuration.go @@ -38,23 +38,9 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) - } - - if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + if id.ConfigurationName, ok = input.Parsed["configurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "configurationName", input) } - return &id, nil + return nil } // ValidateConfigurationID checks that 'input' can be parsed as a Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/configurations/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/configurations/id_server.go index bae6e89be791..f7b042cd7d45 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/configurations/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/configurations/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/configurationsupdate/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/configurationsupdate/id_server.go index bdb29836fd59..efb972cbeedd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/configurationsupdate/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/configurationsupdate/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/databases/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/databases/id_database.go index a979b0a51f84..8f354bccb47d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/databases/id_database.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/databases/id_database.go @@ -38,23 +38,9 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool 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 = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - return &id, nil + return nil } // ValidateDatabaseID checks that 'input' can be parsed as a Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/databases/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/databases/id_server.go index 2b5b57fedaec..f384090c29d8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/databases/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/databases/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/firewallrules/id_firewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/firewallrules/id_firewallrule.go index 44ddf9c5e098..e7264d434526 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/firewallrules/id_firewallrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/firewallrules/id_firewallrule.go @@ -38,23 +38,9 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) - } - - if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FirewallRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", *parsed) + if id.FirewallRuleName, ok = input.Parsed["firewallRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", input) } - return &id, nil + return nil } // ValidateFirewallRuleID checks that 'input' can be parsed as a Firewall Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/firewallrules/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/firewallrules/id_server.go index e17ef27d1406..ab6f9b4a1fda 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/firewallrules/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/firewallrules/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/locationbasedperformancetier/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/locationbasedperformancetier/id_location.go index 8153c2241ff3..365b797aceb2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/locationbasedperformancetier/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/locationbasedperformancetier/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/logfiles/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/logfiles/id_server.go index d1d651dd73e6..4e4a7a6822d5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/logfiles/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/logfiles/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/recoverableservers/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/recoverableservers/id_server.go index b6c50db61a1f..7ba9fb7c4941 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/recoverableservers/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/recoverableservers/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/replicas/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/replicas/id_server.go index 66bf4a46371e..1c26ddbe2112 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/replicas/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/replicas/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serveradministrators/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serveradministrators/id_server.go index e6e1ed4b264d..8281d219c7ed 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serveradministrators/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serveradministrators/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serverbasedperformancetier/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serverbasedperformancetier/id_server.go index 7e4d55fd016c..47b68da44f51 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serverbasedperformancetier/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serverbasedperformancetier/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serverrestart/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serverrestart/id_server.go index c5975a59e6c0..5c641cda3aa8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serverrestart/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serverrestart/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/servers/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/servers/id_server.go index 13b3bb2dbaa7..f20da0b3bee2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/servers/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/servers/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/id_server.go index a387281b4b42..c8a190f79c8a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/virtualnetworkrules/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/virtualnetworkrules/id_server.go index e959cb6c60d2..0d3dbbe78b0f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/virtualnetworkrules/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/virtualnetworkrules/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/virtualnetworkrules/id_virtualnetworkrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/virtualnetworkrules/id_virtualnetworkrule.go index c49b840001e9..76235fd2db60 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/virtualnetworkrules/id_virtualnetworkrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/virtualnetworkrules/id_virtualnetworkrule.go @@ -38,23 +38,9 @@ func ParseVirtualNetworkRuleID(input string) (*VirtualNetworkRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) - } - - if id.VirtualNetworkRuleName, ok = parsed.Parsed["virtualNetworkRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseVirtualNetworkRuleIDInsensitively(input string) (*VirtualNetworkRuleId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VirtualNetworkRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - if id.VirtualNetworkRuleName, ok = parsed.Parsed["virtualNetworkRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkRuleName", *parsed) + if id.VirtualNetworkRuleName, ok = input.Parsed["virtualNetworkRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkRuleName", input) } - return &id, nil + return nil } // ValidateVirtualNetworkRuleID checks that 'input' can be parsed as a Virtual Network Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverkeys/id_key.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverkeys/id_key.go index 1ce5b0508169..107fa7f3af1e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverkeys/id_key.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverkeys/id_key.go @@ -38,23 +38,9 @@ func ParseKeyID(input string) (*KeyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := KeyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) - } - - if id.KeyName, ok = parsed.Parsed["keyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "keyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseKeyIDInsensitively(input string) (*KeyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := KeyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *KeyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - if id.KeyName, ok = parsed.Parsed["keyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "keyName", *parsed) + if id.KeyName, ok = input.Parsed["keyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "keyName", input) } - return &id, nil + return nil } // ValidateKeyID checks that 'input' can be parsed as a Key ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverkeys/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverkeys/id_server.go index cd6654c4b9fe..19c9dcde6a03 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverkeys/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverkeys/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverstart/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverstart/id_server.go index fd31671afb95..bf3a3cdc0bcc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverstart/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverstart/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverstop/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverstop/id_server.go index fe255126afdb..92adf6095bd7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverstop/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverstop/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverupgrade/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverupgrade/id_server.go index db03967b9b78..e547cc337e5e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverupgrade/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverupgrade/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/id_flexibleserver.go index 6b11b2803523..1d5f7413413b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/id_flexibleserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/id_flexibleserver.go @@ -36,19 +36,9 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FlexibleServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - return &id, nil + return nil } // ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/id_backup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/id_backup.go index 6d16556c1851..24d47198d908 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/id_backup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/id_backup.go @@ -38,23 +38,9 @@ func ParseBackupID(input string) (*BackupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) - } - - if id.BackupName, ok = parsed.Parsed["backupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseBackupIDInsensitively(input string) (*BackupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BackupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - if id.BackupName, ok = parsed.Parsed["backupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupName", *parsed) + if id.BackupName, ok = input.Parsed["backupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupName", input) } - return &id, nil + return nil } // ValidateBackupID checks that 'input' can be parsed as a Backup ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/id_flexibleserver.go index cc9dd2b0d947..dcd8092ba627 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/id_flexibleserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/id_flexibleserver.go @@ -36,19 +36,9 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FlexibleServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - return &id, nil + return nil } // ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/id_location.go index 1f4564c3d8ff..ea659695dff4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/id_configuration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/id_configuration.go index a9d0908a7b69..ad74c51e2bda 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/id_configuration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/id_configuration.go @@ -38,23 +38,9 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) - } - - if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + if id.ConfigurationName, ok = input.Parsed["configurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "configurationName", input) } - return &id, nil + return nil } // ValidateConfigurationID checks that 'input' can be parsed as a Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/id_flexibleserver.go index 72241638a667..75a9b36af4ae 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/id_flexibleserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/id_flexibleserver.go @@ -36,19 +36,9 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FlexibleServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - return &id, nil + return nil } // ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/id_database.go index 2fd0eb194981..06dd8ff5cd69 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/id_database.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/id_database.go @@ -38,23 +38,9 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool 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 = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - return &id, nil + return nil } // ValidateDatabaseID checks that 'input' can be parsed as a Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/id_flexibleserver.go index a9924e6f1c62..9b7ecf2c7067 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/id_flexibleserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/id_flexibleserver.go @@ -36,19 +36,9 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FlexibleServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - return &id, nil + return nil } // ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/id_firewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/id_firewallrule.go index b735e21dc57b..022c44812fa1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/id_firewallrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/id_firewallrule.go @@ -38,23 +38,9 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) - } - - if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FirewallRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", *parsed) + if id.FirewallRuleName, ok = input.Parsed["firewallRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", input) } - return &id, nil + return nil } // ValidateFirewallRuleID checks that 'input' can be parsed as a Firewall Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/id_flexibleserver.go index 88b84fdedf98..76281db5b466 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/id_flexibleserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/id_flexibleserver.go @@ -36,19 +36,9 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FlexibleServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - return &id, nil + return nil } // ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/id_location.go index 7934cb55cf21..598730155137 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/id_flexibleserver.go index 3bf684f08d90..c7280c91e32e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/id_flexibleserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/id_flexibleserver.go @@ -36,19 +36,9 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FlexibleServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - return &id, nil + return nil } // ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverfailover/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverfailover/id_flexibleserver.go index 615ca132014f..d3629dbd9236 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverfailover/id_flexibleserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverfailover/id_flexibleserver.go @@ -36,19 +36,9 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FlexibleServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - return &id, nil + return nil } // ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/id_flexibleserver.go index 105a7af57d4b..2f2e3695f4b3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/id_flexibleserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/id_flexibleserver.go @@ -36,19 +36,9 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FlexibleServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - return &id, nil + return nil } // ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/id_flexibleserver.go index de1a095f0c21..fc9e940a7570 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/id_flexibleserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/id_flexibleserver.go @@ -36,19 +36,9 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FlexibleServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - return &id, nil + return nil } // ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstart/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstart/id_flexibleserver.go index 993b5a194b3e..ce569c538f6e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstart/id_flexibleserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstart/id_flexibleserver.go @@ -36,19 +36,9 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FlexibleServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - return &id, nil + return nil } // ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstop/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstop/id_flexibleserver.go index aaaee2ed29e0..13e7981cb3db 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstop/id_flexibleserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstop/id_flexibleserver.go @@ -36,19 +36,9 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FlexibleServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - return &id, nil + return nil } // ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/id_capacitypool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/id_capacitypool.go index c2e4d58474e3..69954702fd9b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/id_capacitypool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/id_capacitypool.go @@ -38,23 +38,9 @@ func ParseCapacityPoolID(input string) (*CapacityPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CapacityPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) - } - - if id.CapacityPoolName, ok = parsed.Parsed["capacityPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCapacityPoolIDInsensitively(input string) (*CapacityPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CapacityPoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CapacityPoolId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if id.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) } - if id.CapacityPoolName, ok = parsed.Parsed["capacityPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", *parsed) + if id.CapacityPoolName, ok = input.Parsed["capacityPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", input) } - return &id, nil + return nil } // ValidateCapacityPoolID checks that 'input' can be parsed as a Capacity Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/id_netappaccount.go index 43537ad3c8a6..f424e58a9e89 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/id_netappaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools/id_netappaccount.go @@ -36,19 +36,9 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetAppAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetAppAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetAppAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if id.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) } - return &id, nil + return nil } // ValidateNetAppAccountID checks that 'input' can be parsed as a Net App Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/id_netappaccount.go index 65af9c406fe9..07a8ef7a5799 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/id_netappaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts/id_netappaccount.go @@ -36,19 +36,9 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetAppAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetAppAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetAppAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if id.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) } - return &id, nil + return nil } // ValidateNetAppAccountID checks that 'input' can be parsed as a Net App Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/id_netappaccount.go index 6def655e7c09..162b7094379a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/id_netappaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/id_netappaccount.go @@ -36,19 +36,9 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetAppAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetAppAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetAppAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if id.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) } - return &id, nil + return nil } // ValidateNetAppAccountID checks that 'input' can be parsed as a Net App Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/id_snapshotpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/id_snapshotpolicy.go index a751a65ec3b1..3daea71a654c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/id_snapshotpolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy/id_snapshotpolicy.go @@ -38,23 +38,9 @@ func ParseSnapshotPolicyID(input string) (*SnapshotPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SnapshotPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) - } - - if id.SnapshotPolicyName, ok = parsed.Parsed["snapshotPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "snapshotPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSnapshotPolicyIDInsensitively(input string) (*SnapshotPolicyId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SnapshotPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SnapshotPolicyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if id.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) } - if id.SnapshotPolicyName, ok = parsed.Parsed["snapshotPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "snapshotPolicyName", *parsed) + if id.SnapshotPolicyName, ok = input.Parsed["snapshotPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "snapshotPolicyName", input) } - return &id, nil + return nil } // ValidateSnapshotPolicyID checks that 'input' can be parsed as a Snapshot Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/id_snapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/id_snapshot.go index d7cb729822b8..8a20d21ec278 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/id_snapshot.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/id_snapshot.go @@ -42,31 +42,9 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SnapshotId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) - } - - if id.CapacityPoolName, ok = parsed.Parsed["capacityPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", *parsed) - } - - if id.VolumeName, ok = parsed.Parsed["volumeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeName", *parsed) - } - - if id.SnapshotName, ok = parsed.Parsed["snapshotName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "snapshotName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SnapshotId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SnapshotId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if id.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) } - if id.CapacityPoolName, ok = parsed.Parsed["capacityPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", *parsed) + if id.CapacityPoolName, ok = input.Parsed["capacityPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", input) } - if id.VolumeName, ok = parsed.Parsed["volumeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeName", *parsed) + if id.VolumeName, ok = input.Parsed["volumeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "volumeName", input) } - if id.SnapshotName, ok = parsed.Parsed["snapshotName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "snapshotName", *parsed) + if id.SnapshotName, ok = input.Parsed["snapshotName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "snapshotName", input) } - return &id, nil + return nil } // ValidateSnapshotID checks that 'input' can be parsed as a Snapshot ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/id_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/id_volume.go index b144bfb03c73..06879ea6a3aa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/id_volume.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots/id_volume.go @@ -40,27 +40,9 @@ func ParseVolumeID(input string) (*VolumeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VolumeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) - } - - if id.CapacityPoolName, ok = parsed.Parsed["capacityPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", *parsed) - } - - if id.VolumeName, ok = parsed.Parsed["volumeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VolumeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *VolumeId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if id.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) } - if id.CapacityPoolName, ok = parsed.Parsed["capacityPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", *parsed) + if id.CapacityPoolName, ok = input.Parsed["capacityPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", input) } - if id.VolumeName, ok = parsed.Parsed["volumeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeName", *parsed) + if id.VolumeName, ok = input.Parsed["volumeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "volumeName", input) } - return &id, nil + return nil } // ValidateVolumeID checks that 'input' can be parsed as a Volume ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/id_netappaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/id_netappaccount.go index 5cf7bb723314..180947b711b4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/id_netappaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/id_netappaccount.go @@ -36,19 +36,9 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetAppAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetAppAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetAppAccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if id.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) } - return &id, nil + return nil } // ValidateNetAppAccountID checks that 'input' can be parsed as a Net App Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/id_volumegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/id_volumegroup.go index fbd627e4b854..f97a6bb10bd5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/id_volumegroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups/id_volumegroup.go @@ -38,23 +38,9 @@ func ParseVolumeGroupID(input string) (*VolumeGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VolumeGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) - } - - if id.VolumeGroupName, ok = parsed.Parsed["volumeGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseVolumeGroupIDInsensitively(input string) (*VolumeGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VolumeGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VolumeGroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if id.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) } - if id.VolumeGroupName, ok = parsed.Parsed["volumeGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeGroupName", *parsed) + if id.VolumeGroupName, ok = input.Parsed["volumeGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "volumeGroupName", input) } - return &id, nil + return nil } // ValidateVolumeGroupID checks that 'input' can be parsed as a Volume Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/id_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/id_volume.go index 306e2dc62196..b3d6ab761b3c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/id_volume.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/id_volume.go @@ -40,27 +40,9 @@ func ParseVolumeID(input string) (*VolumeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VolumeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) - } - - if id.CapacityPoolName, ok = parsed.Parsed["capacityPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", *parsed) - } - - if id.VolumeName, ok = parsed.Parsed["volumeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VolumeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *VolumeId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if id.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) } - if id.CapacityPoolName, ok = parsed.Parsed["capacityPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", *parsed) + if id.CapacityPoolName, ok = input.Parsed["capacityPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", input) } - if id.VolumeName, ok = parsed.Parsed["volumeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeName", *parsed) + if id.VolumeName, ok = input.Parsed["volumeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "volumeName", input) } - return &id, nil + return nil } // ValidateVolumeID checks that 'input' can be parsed as a Volume ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/id_volumequotarule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/id_volumequotarule.go index f86acf65be70..711a80ae5cd0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/id_volumequotarule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules/id_volumequotarule.go @@ -42,31 +42,9 @@ func ParseVolumeQuotaRuleID(input string) (*VolumeQuotaRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VolumeQuotaRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) - } - - if id.CapacityPoolName, ok = parsed.Parsed["capacityPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", *parsed) - } - - if id.VolumeName, ok = parsed.Parsed["volumeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeName", *parsed) - } - - if id.VolumeQuotaRuleName, ok = parsed.Parsed["volumeQuotaRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeQuotaRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseVolumeQuotaRuleIDInsensitively(input string) (*VolumeQuotaRuleId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VolumeQuotaRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VolumeQuotaRuleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if id.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) } - if id.CapacityPoolName, ok = parsed.Parsed["capacityPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", *parsed) + if id.CapacityPoolName, ok = input.Parsed["capacityPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", input) } - if id.VolumeName, ok = parsed.Parsed["volumeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeName", *parsed) + if id.VolumeName, ok = input.Parsed["volumeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "volumeName", input) } - if id.VolumeQuotaRuleName, ok = parsed.Parsed["volumeQuotaRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeQuotaRuleName", *parsed) + if id.VolumeQuotaRuleName, ok = input.Parsed["volumeQuotaRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "volumeQuotaRuleName", input) } - return &id, nil + return nil } // ValidateVolumeQuotaRuleID checks that 'input' can be parsed as a Volume Quota Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/id_capacitypool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/id_capacitypool.go index edb30a75b16a..9ce092f4fe4d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/id_capacitypool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/id_capacitypool.go @@ -38,23 +38,9 @@ func ParseCapacityPoolID(input string) (*CapacityPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CapacityPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) - } - - if id.CapacityPoolName, ok = parsed.Parsed["capacityPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCapacityPoolIDInsensitively(input string) (*CapacityPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CapacityPoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CapacityPoolId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if id.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) } - if id.CapacityPoolName, ok = parsed.Parsed["capacityPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", *parsed) + if id.CapacityPoolName, ok = input.Parsed["capacityPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", input) } - return &id, nil + return nil } // ValidateCapacityPoolID checks that 'input' can be parsed as a Capacity Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/id_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/id_volume.go index 142e376a72ce..0b27e4a330cc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/id_volume.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes/id_volume.go @@ -40,27 +40,9 @@ func ParseVolumeID(input string) (*VolumeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VolumeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) - } - - if id.CapacityPoolName, ok = parsed.Parsed["capacityPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", *parsed) - } - - if id.VolumeName, ok = parsed.Parsed["volumeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VolumeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *VolumeId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if id.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) } - if id.CapacityPoolName, ok = parsed.Parsed["capacityPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", *parsed) + if id.CapacityPoolName, ok = input.Parsed["capacityPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", input) } - if id.VolumeName, ok = parsed.Parsed["volumeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeName", *parsed) + if id.VolumeName, ok = input.Parsed["volumeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "volumeName", input) } - return &id, nil + return nil } // ValidateVolumeID checks that 'input' can be parsed as a Volume ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/id_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/id_volume.go index 1a057729587e..c68d5f31c454 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/id_volume.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication/id_volume.go @@ -40,27 +40,9 @@ func ParseVolumeID(input string) (*VolumeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VolumeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) - } - - if id.CapacityPoolName, ok = parsed.Parsed["capacityPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", *parsed) - } - - if id.VolumeName, ok = parsed.Parsed["volumeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VolumeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *VolumeId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetAppAccountName, ok = parsed.Parsed["netAppAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", *parsed) + if id.NetAppAccountName, ok = input.Parsed["netAppAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "netAppAccountName", input) } - if id.CapacityPoolName, ok = parsed.Parsed["capacityPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", *parsed) + if id.CapacityPoolName, ok = input.Parsed["capacityPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "capacityPoolName", input) } - if id.VolumeName, ok = parsed.Parsed["volumeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeName", *parsed) + if id.VolumeName, ok = input.Parsed["volumeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "volumeName", input) } - return &id, nil + return nil } // ValidateVolumeID checks that 'input' can be parsed as a Volume ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrulecollections/id_rulecollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrulecollections/id_rulecollection.go index 49cb86529fdf..e872007ab215 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrulecollections/id_rulecollection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrulecollections/id_rulecollection.go @@ -40,27 +40,9 @@ func ParseRuleCollectionID(input string) (*RuleCollectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RuleCollectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseRuleCollectionIDInsensitively(input string) (*RuleCollectionId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RuleCollectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *RuleCollectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if id.NetworkManagerName, ok = input.Parsed["networkManagerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", input) } - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) + if id.SecurityAdminConfigurationName, ok = input.Parsed["securityAdminConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", input) } - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) + if id.RuleCollectionName, ok = input.Parsed["ruleCollectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", input) } - return &id, nil + return nil } // ValidateRuleCollectionID checks that 'input' can be parsed as a Rule Collection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrulecollections/id_securityadminconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrulecollections/id_securityadminconfiguration.go index 6e36b78776a2..a623baf41bca 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrulecollections/id_securityadminconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrulecollections/id_securityadminconfiguration.go @@ -38,23 +38,9 @@ func ParseSecurityAdminConfigurationID(input string) (*SecurityAdminConfiguratio return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SecurityAdminConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSecurityAdminConfigurationIDInsensitively(input string) (*SecurityAdmi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SecurityAdminConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SecurityAdminConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if id.NetworkManagerName, ok = input.Parsed["networkManagerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", input) } - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) + if id.SecurityAdminConfigurationName, ok = input.Parsed["securityAdminConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", input) } - return &id, nil + return nil } // ValidateSecurityAdminConfigurationID checks that 'input' can be parsed as a Security Admin Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrules/id_rule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrules/id_rule.go index d93cbce740ec..1773ee5f02ed 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrules/id_rule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrules/id_rule.go @@ -42,31 +42,9 @@ func ParseRuleID(input string) (*RuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) - } - - if id.RuleName, ok = parsed.Parsed["ruleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RuleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if id.NetworkManagerName, ok = input.Parsed["networkManagerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", input) } - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) + if id.SecurityAdminConfigurationName, ok = input.Parsed["securityAdminConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", input) } - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) + if id.RuleCollectionName, ok = input.Parsed["ruleCollectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", input) } - if id.RuleName, ok = parsed.Parsed["ruleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleName", *parsed) + if id.RuleName, ok = input.Parsed["ruleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ruleName", input) } - return &id, nil + return nil } // ValidateRuleID checks that 'input' can be parsed as a Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrules/id_rulecollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrules/id_rulecollection.go index 1cdbb320880e..9755614ded3c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrules/id_rulecollection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/adminrules/id_rulecollection.go @@ -40,27 +40,9 @@ func ParseRuleCollectionID(input string) (*RuleCollectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RuleCollectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseRuleCollectionIDInsensitively(input string) (*RuleCollectionId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RuleCollectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *RuleCollectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if id.NetworkManagerName, ok = input.Parsed["networkManagerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", input) } - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) + if id.SecurityAdminConfigurationName, ok = input.Parsed["securityAdminConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", input) } - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) + if id.RuleCollectionName, ok = input.Parsed["ruleCollectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", input) } - return &id, nil + return nil } // ValidateRuleCollectionID checks that 'input' can be parsed as a Rule Collection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go index 58498d25a2cb..cfc53ebc3419 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go @@ -36,19 +36,9 @@ func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ApplicationGatewayId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) + if id.ApplicationGatewayName, ok = input.Parsed["applicationGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", input) } - return &id, nil + return nil } // ValidateApplicationGatewayID checks that 'input' can be parsed as a Application Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go index 16e2175839e7..e7d21df9e978 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go @@ -38,23 +38,9 @@ func ParseApplicationGatewayPrivateEndpointConnectionID(input string) (*Applicat return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGatewayPrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseApplicationGatewayPrivateEndpointConnectionIDInsensitively(input strin return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGatewayPrivateEndpointConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ApplicationGatewayPrivateEndpointConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) + if id.ApplicationGatewayName, ok = input.Parsed["applicationGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", input) } - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", input) } - return &id, nil + return nil } // ValidateApplicationGatewayPrivateEndpointConnectionID checks that 'input' can be parsed as a Application Gateway Private Endpoint Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgatewayprivatelinkresources/id_applicationgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgatewayprivatelinkresources/id_applicationgateway.go index 6a994cbbf56a..40c8e0927ccc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgatewayprivatelinkresources/id_applicationgateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgatewayprivatelinkresources/id_applicationgateway.go @@ -36,19 +36,9 @@ func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ApplicationGatewayId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) + if id.ApplicationGatewayName, ok = input.Parsed["applicationGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", input) } - return &id, nil + return nil } // ValidateApplicationGatewayID checks that 'input' can be parsed as a Application Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgateways/id_applicationgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgateways/id_applicationgateway.go index c9e4b9d3cbb0..599b534439a4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgateways/id_applicationgateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgateways/id_applicationgateway.go @@ -36,19 +36,9 @@ func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ApplicationGatewayId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) + if id.ApplicationGatewayName, ok = input.Parsed["applicationGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", input) } - return &id, nil + return nil } // ValidateApplicationGatewayID checks that 'input' can be parsed as a Application Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgateways/id_predefinedpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgateways/id_predefinedpolicy.go index b49384e166d1..b5821036369b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgateways/id_predefinedpolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgateways/id_predefinedpolicy.go @@ -34,15 +34,9 @@ func ParsePredefinedPolicyID(input string) (*PredefinedPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PredefinedPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.PredefinedPolicyName, ok = parsed.Parsed["predefinedPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "predefinedPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParsePredefinedPolicyIDInsensitively(input string) (*PredefinedPolicyId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PredefinedPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *PredefinedPolicyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.PredefinedPolicyName, ok = parsed.Parsed["predefinedPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "predefinedPolicyName", *parsed) + if id.PredefinedPolicyName, ok = input.Parsed["predefinedPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "predefinedPolicyName", input) } - return &id, nil + return nil } // ValidatePredefinedPolicyID checks that 'input' can be parsed as a Predefined Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgatewaywafdynamicmanifests/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgatewaywafdynamicmanifests/id_location.go index d3b01a8cfcef..1d6c45d82266 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgatewaywafdynamicmanifests/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationgatewaywafdynamicmanifests/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationsecuritygroups/id_applicationsecuritygroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationsecuritygroups/id_applicationsecuritygroup.go index 34de777e09ea..c457f791c4b5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationsecuritygroups/id_applicationsecuritygroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/applicationsecuritygroups/id_applicationsecuritygroup.go @@ -36,19 +36,9 @@ func ParseApplicationSecurityGroupID(input string) (*ApplicationSecurityGroupId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationSecurityGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationSecurityGroupName, ok = parsed.Parsed["applicationSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationSecurityGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseApplicationSecurityGroupIDInsensitively(input string) (*ApplicationSec return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationSecurityGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ApplicationSecurityGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ApplicationSecurityGroupName, ok = parsed.Parsed["applicationSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationSecurityGroupName", *parsed) + if id.ApplicationSecurityGroupName, ok = input.Parsed["applicationSecurityGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationSecurityGroupName", input) } - return &id, nil + return nil } // ValidateApplicationSecurityGroupID checks that 'input' can be parsed as a Application Security Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/availabledelegations/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/availabledelegations/id_location.go index a6a158e88e60..92bfc72a62b7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/availabledelegations/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/availabledelegations/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/availabledelegations/id_providerlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/availabledelegations/id_providerlocation.go index a5f5134b65c4..8fdfc45fb951 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/availabledelegations/id_providerlocation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/availabledelegations/id_providerlocation.go @@ -36,19 +36,9 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProviderLocationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/availableservicealiases/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/availableservicealiases/id_location.go index 7d25a1ec759a..98a110bc9e53 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/availableservicealiases/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/availableservicealiases/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/availableservicealiases/id_providerlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/availableservicealiases/id_providerlocation.go index 0eb12f2b1328..5d51d89a8215 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/availableservicealiases/id_providerlocation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/availableservicealiases/id_providerlocation.go @@ -36,19 +36,9 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProviderLocationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/azurefirewalls/id_azurefirewall.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/azurefirewalls/id_azurefirewall.go index 1c8e506ab976..e1afeeca58f9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/azurefirewalls/id_azurefirewall.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/azurefirewalls/id_azurefirewall.go @@ -36,19 +36,9 @@ func ParseAzureFirewallID(input string) (*AzureFirewallId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AzureFirewallId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AzureFirewallName, ok = parsed.Parsed["azureFirewallName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureFirewallName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAzureFirewallIDInsensitively(input string) (*AzureFirewallId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AzureFirewallId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AzureFirewallId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AzureFirewallName, ok = parsed.Parsed["azureFirewallName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureFirewallName", *parsed) + if id.AzureFirewallName, ok = input.Parsed["azureFirewallName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "azureFirewallName", input) } - return &id, nil + return nil } // ValidateAzureFirewallID checks that 'input' can be parsed as a Azure Firewall ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/bastionhosts/id_bastionhost.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/bastionhosts/id_bastionhost.go index deb831367875..b9b0bd95a9b4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/bastionhosts/id_bastionhost.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/bastionhosts/id_bastionhost.go @@ -36,19 +36,9 @@ func ParseBastionHostID(input string) (*BastionHostId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BastionHostId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BastionHostName, ok = parsed.Parsed["bastionHostName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "bastionHostName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseBastionHostIDInsensitively(input string) (*BastionHostId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BastionHostId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *BastionHostId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.BastionHostName, ok = parsed.Parsed["bastionHostName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "bastionHostName", *parsed) + if id.BastionHostName, ok = input.Parsed["bastionHostName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "bastionHostName", input) } - return &id, nil + return nil } // ValidateBastionHostID checks that 'input' can be parsed as a Bastion Host ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/bastionshareablelink/id_bastionhost.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/bastionshareablelink/id_bastionhost.go index 28c97854f8dd..b000a81dd74e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/bastionshareablelink/id_bastionhost.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/bastionshareablelink/id_bastionhost.go @@ -36,19 +36,9 @@ func ParseBastionHostID(input string) (*BastionHostId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BastionHostId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BastionHostName, ok = parsed.Parsed["bastionHostName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "bastionHostName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseBastionHostIDInsensitively(input string) (*BastionHostId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BastionHostId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *BastionHostId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.BastionHostName, ok = parsed.Parsed["bastionHostName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "bastionHostName", *parsed) + if id.BastionHostName, ok = input.Parsed["bastionHostName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "bastionHostName", input) } - return &id, nil + return nil } // ValidateBastionHostID checks that 'input' can be parsed as a Bastion Host ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/checkdnsavailabilities/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/checkdnsavailabilities/id_location.go index 474bff1709be..6b84973a31b3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/checkdnsavailabilities/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/checkdnsavailabilities/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/cloudservicepublicipaddresses/id_providercloudservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/cloudservicepublicipaddresses/id_providercloudservice.go index 0a86336f5d89..135ae6b32ecc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/cloudservicepublicipaddresses/id_providercloudservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/cloudservicepublicipaddresses/id_providercloudservice.go @@ -36,19 +36,9 @@ func ParseProviderCloudServiceID(input string) (*ProviderCloudServiceId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderCloudServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProviderCloudServiceIDInsensitively(input string) (*ProviderCloudServi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderCloudServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProviderCloudServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) + if id.CloudServiceName, ok = input.Parsed["cloudServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", input) } - return &id, nil + return nil } // ValidateProviderCloudServiceID checks that 'input' can be parsed as a Provider Cloud Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/connectionmonitors/id_connectionmonitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/connectionmonitors/id_connectionmonitor.go index a7922c2d6665..59380596a99c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/connectionmonitors/id_connectionmonitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/connectionmonitors/id_connectionmonitor.go @@ -38,23 +38,9 @@ func ParseConnectionMonitorID(input string) (*ConnectionMonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectionMonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - if id.ConnectionMonitorName, ok = parsed.Parsed["connectionMonitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionMonitorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseConnectionMonitorIDInsensitively(input string) (*ConnectionMonitorId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectionMonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConnectionMonitorId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) + if id.NetworkWatcherName, ok = input.Parsed["networkWatcherName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", input) } - if id.ConnectionMonitorName, ok = parsed.Parsed["connectionMonitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionMonitorName", *parsed) + if id.ConnectionMonitorName, ok = input.Parsed["connectionMonitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "connectionMonitorName", input) } - return &id, nil + return nil } // ValidateConnectionMonitorID checks that 'input' can be parsed as a Connection Monitor ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/connectionmonitors/id_networkwatcher.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/connectionmonitors/id_networkwatcher.go index 9827216a58b2..363c1317ad36 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/connectionmonitors/id_networkwatcher.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/connectionmonitors/id_networkwatcher.go @@ -36,19 +36,9 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkWatcherId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkWatcherId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) + if id.NetworkWatcherName, ok = input.Parsed["networkWatcherName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", input) } - return &id, nil + return nil } // ValidateNetworkWatcherID checks that 'input' can be parsed as a Network Watcher ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/connectivityconfigurations/id_connectivityconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/connectivityconfigurations/id_connectivityconfiguration.go index 65487e1c1022..5d5da37b7117 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/connectivityconfigurations/id_connectivityconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/connectivityconfigurations/id_connectivityconfiguration.go @@ -38,23 +38,9 @@ func ParseConnectivityConfigurationID(input string) (*ConnectivityConfigurationI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectivityConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.ConnectivityConfigurationName, ok = parsed.Parsed["connectivityConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectivityConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseConnectivityConfigurationIDInsensitively(input string) (*ConnectivityC return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectivityConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConnectivityConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if id.NetworkManagerName, ok = input.Parsed["networkManagerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", input) } - if id.ConnectivityConfigurationName, ok = parsed.Parsed["connectivityConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectivityConfigurationName", *parsed) + if id.ConnectivityConfigurationName, ok = input.Parsed["connectivityConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "connectivityConfigurationName", input) } - return &id, nil + return nil } // ValidateConnectivityConfigurationID checks that 'input' can be parsed as a Connectivity Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/connectivityconfigurations/id_networkmanager.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/connectivityconfigurations/id_networkmanager.go index 087c284a6d4b..ec4128ee5c89 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/connectivityconfigurations/id_networkmanager.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/connectivityconfigurations/id_networkmanager.go @@ -36,19 +36,9 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkManagerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkManagerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if id.NetworkManagerName, ok = input.Parsed["networkManagerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", input) } - return &id, nil + return nil } // ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/customipprefixes/id_customipprefix.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/customipprefixes/id_customipprefix.go index 088e2b59a9a6..a409949ab9a4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/customipprefixes/id_customipprefix.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/customipprefixes/id_customipprefix.go @@ -36,19 +36,9 @@ func ParseCustomIPPrefixID(input string) (*CustomIPPrefixId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CustomIPPrefixId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CustomIPPrefixName, ok = parsed.Parsed["customIPPrefixName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "customIPPrefixName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseCustomIPPrefixIDInsensitively(input string) (*CustomIPPrefixId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CustomIPPrefixId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *CustomIPPrefixId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CustomIPPrefixName, ok = parsed.Parsed["customIPPrefixName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "customIPPrefixName", *parsed) + if id.CustomIPPrefixName, ok = input.Parsed["customIPPrefixName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "customIPPrefixName", input) } - return &id, nil + return nil } // ValidateCustomIPPrefixID checks that 'input' can be parsed as a Custom I P Prefix ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/ddoscustompolicies/id_ddoscustompolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/ddoscustompolicies/id_ddoscustompolicy.go index 311930ea7403..ad86631a79a5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/ddoscustompolicies/id_ddoscustompolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/ddoscustompolicies/id_ddoscustompolicy.go @@ -36,19 +36,9 @@ func ParseDdosCustomPolicyID(input string) (*DdosCustomPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DdosCustomPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DdosCustomPolicyName, ok = parsed.Parsed["ddosCustomPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ddosCustomPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDdosCustomPolicyIDInsensitively(input string) (*DdosCustomPolicyId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DdosCustomPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DdosCustomPolicyId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DdosCustomPolicyName, ok = parsed.Parsed["ddosCustomPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ddosCustomPolicyName", *parsed) + if id.DdosCustomPolicyName, ok = input.Parsed["ddosCustomPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ddosCustomPolicyName", input) } - return &id, nil + return nil } // ValidateDdosCustomPolicyID checks that 'input' can be parsed as a Ddos Custom Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/ddosprotectionplans/id_ddosprotectionplan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/ddosprotectionplans/id_ddosprotectionplan.go index 24d6a8f8f24a..4dfddca2d862 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/ddosprotectionplans/id_ddosprotectionplan.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/ddosprotectionplans/id_ddosprotectionplan.go @@ -36,19 +36,9 @@ func ParseDdosProtectionPlanID(input string) (*DdosProtectionPlanId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DdosProtectionPlanId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DdosProtectionPlanName, ok = parsed.Parsed["ddosProtectionPlanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ddosProtectionPlanName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDdosProtectionPlanIDInsensitively(input string) (*DdosProtectionPlanId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DdosProtectionPlanId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DdosProtectionPlanId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DdosProtectionPlanName, ok = parsed.Parsed["ddosProtectionPlanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ddosProtectionPlanName", *parsed) + if id.DdosProtectionPlanName, ok = input.Parsed["ddosProtectionPlanName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ddosProtectionPlanName", input) } - return &id, nil + return nil } // ValidateDdosProtectionPlanID checks that 'input' can be parsed as a Ddos Protection Plan ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/dscpconfiguration/id_dscpconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/dscpconfiguration/id_dscpconfiguration.go index 4f0d024833c8..6997820990c6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/dscpconfiguration/id_dscpconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/dscpconfiguration/id_dscpconfiguration.go @@ -36,19 +36,9 @@ func ParseDscpConfigurationID(input string) (*DscpConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DscpConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DscpConfigurationName, ok = parsed.Parsed["dscpConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dscpConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDscpConfigurationIDInsensitively(input string) (*DscpConfigurationId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DscpConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DscpConfigurationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DscpConfigurationName, ok = parsed.Parsed["dscpConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dscpConfigurationName", *parsed) + if id.DscpConfigurationName, ok = input.Parsed["dscpConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dscpConfigurationName", input) } - return &id, nil + return nil } // ValidateDscpConfigurationID checks that 'input' can be parsed as a Dscp Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/endpointservices/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/endpointservices/id_location.go index cb3d2ffd4c8d..5728b9db3377 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/endpointservices/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/endpointservices/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitarptable/id_arptable.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitarptable/id_arptable.go index 0771397d6bb6..4255998ba5be 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitarptable/id_arptable.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitarptable/id_arptable.go @@ -40,27 +40,9 @@ func ParseArpTableID(input string) (*ArpTableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ArpTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.ArpTableName, ok = parsed.Parsed["arpTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arpTableName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseArpTableIDInsensitively(input string) (*ArpTableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ArpTableId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ArpTableId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) + if id.ExpressRouteCircuitName, ok = input.Parsed["expressRouteCircuitName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", input) } - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) + if id.PeeringName, ok = input.Parsed["peeringName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "peeringName", input) } - if id.ArpTableName, ok = parsed.Parsed["arpTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arpTableName", *parsed) + if id.ArpTableName, ok = input.Parsed["arpTableName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "arpTableName", input) } - return &id, nil + return nil } // ValidateArpTableID checks that 'input' can be parsed as a Arp Table ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitauthorizations/id_authorization.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitauthorizations/id_authorization.go index 614f1572fa7e..e0c5a60e3e66 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitauthorizations/id_authorization.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitauthorizations/id_authorization.go @@ -38,23 +38,9 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AuthorizationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.AuthorizationName, ok = parsed.Parsed["authorizationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AuthorizationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AuthorizationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) + if id.ExpressRouteCircuitName, ok = input.Parsed["expressRouteCircuitName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", input) } - if id.AuthorizationName, ok = parsed.Parsed["authorizationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationName", *parsed) + if id.AuthorizationName, ok = input.Parsed["authorizationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "authorizationName", input) } - return &id, nil + return nil } // ValidateAuthorizationID checks that 'input' can be parsed as a Authorization ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitauthorizations/id_expressroutecircuit.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitauthorizations/id_expressroutecircuit.go index 502b311d236e..29b136159f30 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitauthorizations/id_expressroutecircuit.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitauthorizations/id_expressroutecircuit.go @@ -36,19 +36,9 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteCircuitId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ExpressRouteCircuitId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) + if id.ExpressRouteCircuitName, ok = input.Parsed["expressRouteCircuitName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", input) } - return &id, nil + return nil } // ValidateExpressRouteCircuitID checks that 'input' can be parsed as a Express Route Circuit ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitconnections/id_peeringconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitconnections/id_peeringconnection.go index 4bdac2a095ad..eba1c63329b6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitconnections/id_peeringconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitconnections/id_peeringconnection.go @@ -40,27 +40,9 @@ func ParsePeeringConnectionID(input string) (*PeeringConnectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PeeringConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParsePeeringConnectionIDInsensitively(input string) (*PeeringConnectionId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PeeringConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *PeeringConnectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) + if id.ExpressRouteCircuitName, ok = input.Parsed["expressRouteCircuitName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", input) } - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) + if id.PeeringName, ok = input.Parsed["peeringName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "peeringName", input) } - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) + if id.ConnectionName, ok = input.Parsed["connectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "connectionName", input) } - return &id, nil + return nil } // ValidatePeeringConnectionID checks that 'input' can be parsed as a Peering Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitpeerings/id_expressroutecircuit.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitpeerings/id_expressroutecircuit.go index 80bd7e639d77..b36253f5c4af 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitpeerings/id_expressroutecircuit.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitpeerings/id_expressroutecircuit.go @@ -36,19 +36,9 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteCircuitId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ExpressRouteCircuitId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) + if id.ExpressRouteCircuitName, ok = input.Parsed["expressRouteCircuitName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", input) } - return &id, nil + return nil } // ValidateExpressRouteCircuitID checks that 'input' can be parsed as a Express Route Circuit ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitroutestable/id_peeringroutetable.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitroutestable/id_peeringroutetable.go index b383a1c57d28..2aa9e827b691 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitroutestable/id_peeringroutetable.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitroutestable/id_peeringroutetable.go @@ -40,27 +40,9 @@ func ParsePeeringRouteTableID(input string) (*PeeringRouteTableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PeeringRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParsePeeringRouteTableIDInsensitively(input string) (*PeeringRouteTableId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PeeringRouteTableId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *PeeringRouteTableId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) + if id.ExpressRouteCircuitName, ok = input.Parsed["expressRouteCircuitName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", input) } - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) + if id.PeeringName, ok = input.Parsed["peeringName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "peeringName", input) } - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) + if id.RouteTableName, ok = input.Parsed["routeTableName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", input) } - return &id, nil + return nil } // ValidatePeeringRouteTableID checks that 'input' can be parsed as a Peering Route Table ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/id_routetablessummary.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/id_routetablessummary.go index 1cbf96985849..8f8c7f0a7262 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/id_routetablessummary.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitroutestablesummary/id_routetablessummary.go @@ -40,27 +40,9 @@ func ParseRouteTablesSummaryID(input string) (*RouteTablesSummaryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteTablesSummaryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTablesSummaryName, ok = parsed.Parsed["routeTablesSummaryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTablesSummaryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseRouteTablesSummaryIDInsensitively(input string) (*RouteTablesSummaryId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteTablesSummaryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *RouteTablesSummaryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) + if id.ExpressRouteCircuitName, ok = input.Parsed["expressRouteCircuitName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", input) } - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) + if id.PeeringName, ok = input.Parsed["peeringName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "peeringName", input) } - if id.RouteTablesSummaryName, ok = parsed.Parsed["routeTablesSummaryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTablesSummaryName", *parsed) + if id.RouteTablesSummaryName, ok = input.Parsed["routeTablesSummaryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "routeTablesSummaryName", input) } - return &id, nil + return nil } // ValidateRouteTablesSummaryID checks that 'input' can be parsed as a Route Tables Summary ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuits/id_expressroutecircuit.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuits/id_expressroutecircuit.go index 76f0cad79409..386f2129eb8a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuits/id_expressroutecircuit.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuits/id_expressroutecircuit.go @@ -36,19 +36,9 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteCircuitId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ExpressRouteCircuitId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) + if id.ExpressRouteCircuitName, ok = input.Parsed["expressRouteCircuitName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", input) } - return &id, nil + return nil } // ValidateExpressRouteCircuitID checks that 'input' can be parsed as a Express Route Circuit ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitstats/id_expressroutecircuit.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitstats/id_expressroutecircuit.go index 8f5bdbd93bb0..defd9b84aac0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitstats/id_expressroutecircuit.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecircuitstats/id_expressroutecircuit.go @@ -36,19 +36,9 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteCircuitId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ExpressRouteCircuitId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) + if id.ExpressRouteCircuitName, ok = input.Parsed["expressRouteCircuitName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", input) } - return &id, nil + return nil } // ValidateExpressRouteCircuitID checks that 'input' can be parsed as a Express Route Circuit ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteconnections/id_expressrouteconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteconnections/id_expressrouteconnection.go index 9df4b46202ba..b43720635d6c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteconnections/id_expressrouteconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteconnections/id_expressrouteconnection.go @@ -38,23 +38,9 @@ func ParseExpressRouteConnectionID(input string) (*ExpressRouteConnectionId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) - } - - if id.ExpressRouteConnectionName, ok = parsed.Parsed["expressRouteConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseExpressRouteConnectionIDInsensitively(input string) (*ExpressRouteConn return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ExpressRouteConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) + if id.ExpressRouteGatewayName, ok = input.Parsed["expressRouteGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", input) } - if id.ExpressRouteConnectionName, ok = parsed.Parsed["expressRouteConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteConnectionName", *parsed) + if id.ExpressRouteConnectionName, ok = input.Parsed["expressRouteConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteConnectionName", input) } - return &id, nil + return nil } // ValidateExpressRouteConnectionID checks that 'input' can be parsed as a Express Route Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteconnections/id_expressroutegateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteconnections/id_expressroutegateway.go index a697ea8a7e4c..25fd28d50f54 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteconnections/id_expressroutegateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteconnections/id_expressroutegateway.go @@ -36,19 +36,9 @@ func ParseExpressRouteGatewayID(input string) (*ExpressRouteGatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseExpressRouteGatewayIDInsensitively(input string) (*ExpressRouteGateway return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteGatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ExpressRouteGatewayId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) + if id.ExpressRouteGatewayName, ok = input.Parsed["expressRouteGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", input) } - return &id, nil + return nil } // ValidateExpressRouteGatewayID checks that 'input' can be parsed as a Express Route Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/id_peeringarptable.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/id_peeringarptable.go index c7d0e4d6c082..1fa7715c5c39 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/id_peeringarptable.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionarptable/id_peeringarptable.go @@ -40,27 +40,9 @@ func ParsePeeringArpTableID(input string) (*PeeringArpTableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PeeringArpTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.ArpTableName, ok = parsed.Parsed["arpTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arpTableName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParsePeeringArpTableIDInsensitively(input string) (*PeeringArpTableId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PeeringArpTableId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *PeeringArpTableId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) + if id.ExpressRouteCrossConnectionName, ok = input.Parsed["expressRouteCrossConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", input) } - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) + if id.PeeringName, ok = input.Parsed["peeringName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "peeringName", input) } - if id.ArpTableName, ok = parsed.Parsed["arpTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arpTableName", *parsed) + if id.ArpTableName, ok = input.Parsed["arpTableName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "arpTableName", input) } - return &id, nil + return nil } // ValidatePeeringArpTableID checks that 'input' can be parsed as a Peering Arp Table ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go index c2abc2bcb6ec..79fdcaa3b4a6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go @@ -36,19 +36,9 @@ func ParseExpressRouteCrossConnectionID(input string) (*ExpressRouteCrossConnect return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteCrossConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseExpressRouteCrossConnectionIDInsensitively(input string) (*ExpressRout return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteCrossConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ExpressRouteCrossConnectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) + if id.ExpressRouteCrossConnectionName, ok = input.Parsed["expressRouteCrossConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", input) } - return &id, nil + return nil } // ValidateExpressRouteCrossConnectionID checks that 'input' can be parsed as a Express Route Cross Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionpeerings/id_peering.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionpeerings/id_peering.go index 8ff1861f76d8..c01ecaf33aee 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionpeerings/id_peering.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionpeerings/id_peering.go @@ -38,23 +38,9 @@ func ParsePeeringID(input string) (*PeeringId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PeeringId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePeeringIDInsensitively(input string) (*PeeringId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PeeringId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PeeringId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) + if id.ExpressRouteCrossConnectionName, ok = input.Parsed["expressRouteCrossConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", input) } - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) + if id.PeeringName, ok = input.Parsed["peeringName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "peeringName", input) } - return &id, nil + return nil } // ValidatePeeringID checks that 'input' can be parsed as a Peering ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go index 5c0a0ea53027..8b8c3b8bcb70 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go @@ -40,27 +40,9 @@ func ParseExpressRouteCrossConnectionPeeringRouteTableID(input string) (*Express return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteCrossConnectionPeeringRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseExpressRouteCrossConnectionPeeringRouteTableIDInsensitively(input stri return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteCrossConnectionPeeringRouteTableId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ExpressRouteCrossConnectionPeeringRouteTableId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) + if id.ExpressRouteCrossConnectionName, ok = input.Parsed["expressRouteCrossConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", input) } - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) + if id.PeeringName, ok = input.Parsed["peeringName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "peeringName", input) } - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) + if id.RouteTableName, ok = input.Parsed["routeTableName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", input) } - return &id, nil + return nil } // ValidateExpressRouteCrossConnectionPeeringRouteTableID checks that 'input' can be parsed as a Express Route Cross Connection Peering Route Table ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go index d679350bf9bf..cb2b91c3cb93 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go @@ -40,27 +40,9 @@ func ParsePeeringRouteTablesSummaryID(input string) (*PeeringRouteTablesSummaryI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PeeringRouteTablesSummaryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTablesSummaryName, ok = parsed.Parsed["routeTablesSummaryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTablesSummaryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParsePeeringRouteTablesSummaryIDInsensitively(input string) (*PeeringRouteT return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PeeringRouteTablesSummaryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *PeeringRouteTablesSummaryId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) + if id.ExpressRouteCrossConnectionName, ok = input.Parsed["expressRouteCrossConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", input) } - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) + if id.PeeringName, ok = input.Parsed["peeringName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "peeringName", input) } - if id.RouteTablesSummaryName, ok = parsed.Parsed["routeTablesSummaryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTablesSummaryName", *parsed) + if id.RouteTablesSummaryName, ok = input.Parsed["routeTablesSummaryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "routeTablesSummaryName", input) } - return &id, nil + return nil } // ValidatePeeringRouteTablesSummaryID checks that 'input' can be parsed as a Peering Route Tables Summary ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnections/id_expressroutecrossconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnections/id_expressroutecrossconnection.go index a8eb6b95127b..1007905256c9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnections/id_expressroutecrossconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutecrossconnections/id_expressroutecrossconnection.go @@ -36,19 +36,9 @@ func ParseExpressRouteCrossConnectionID(input string) (*ExpressRouteCrossConnect return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteCrossConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseExpressRouteCrossConnectionIDInsensitively(input string) (*ExpressRout return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteCrossConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ExpressRouteCrossConnectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) + if id.ExpressRouteCrossConnectionName, ok = input.Parsed["expressRouteCrossConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", input) } - return &id, nil + return nil } // ValidateExpressRouteCrossConnectionID checks that 'input' can be parsed as a Express Route Cross Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutegateways/id_expressroutegateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutegateways/id_expressroutegateway.go index 4e9f6ccc25fd..0e940d12bdf9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutegateways/id_expressroutegateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutegateways/id_expressroutegateway.go @@ -36,19 +36,9 @@ func ParseExpressRouteGatewayID(input string) (*ExpressRouteGatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseExpressRouteGatewayIDInsensitively(input string) (*ExpressRouteGateway return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteGatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ExpressRouteGatewayId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) + if id.ExpressRouteGatewayName, ok = input.Parsed["expressRouteGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", input) } - return &id, nil + return nil } // ValidateExpressRouteGatewayID checks that 'input' can be parsed as a Express Route Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutelinks/id_expressrouteport.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutelinks/id_expressrouteport.go index 4c0b60ea4576..1ddfc494185f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutelinks/id_expressrouteport.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutelinks/id_expressrouteport.go @@ -36,19 +36,9 @@ func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRoutePortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRoutePortId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ExpressRoutePortId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) + if id.ExpressRoutePortName, ok = input.Parsed["expressRoutePortName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", input) } - return &id, nil + return nil } // ValidateExpressRoutePortID checks that 'input' can be parsed as a Express Route Port ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutelinks/id_link.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutelinks/id_link.go index 39a80538a624..3e4266036c2a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutelinks/id_link.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressroutelinks/id_link.go @@ -38,23 +38,9 @@ func ParseLinkID(input string) (*LinkId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LinkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - if id.LinkName, ok = parsed.Parsed["linkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "linkName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLinkIDInsensitively(input string) (*LinkId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LinkId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LinkId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) + if id.ExpressRoutePortName, ok = input.Parsed["expressRoutePortName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", input) } - if id.LinkName, ok = parsed.Parsed["linkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "linkName", *parsed) + if id.LinkName, ok = input.Parsed["linkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "linkName", input) } - return &id, nil + return nil } // ValidateLinkID checks that 'input' can be parsed as a Link ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteportauthorizations/id_expressrouteport.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteportauthorizations/id_expressrouteport.go index be98e366b7f7..a2222ad6d454 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteportauthorizations/id_expressrouteport.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteportauthorizations/id_expressrouteport.go @@ -36,19 +36,9 @@ func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRoutePortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRoutePortId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ExpressRoutePortId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) + if id.ExpressRoutePortName, ok = input.Parsed["expressRoutePortName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", input) } - return &id, nil + return nil } // ValidateExpressRoutePortID checks that 'input' can be parsed as a Express Route Port ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteportauthorizations/id_expressrouteportauthorization.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteportauthorizations/id_expressrouteportauthorization.go index 5b7042091d0c..8af9ba18bf63 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteportauthorizations/id_expressrouteportauthorization.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteportauthorizations/id_expressrouteportauthorization.go @@ -38,23 +38,9 @@ func ParseExpressRoutePortAuthorizationID(input string) (*ExpressRoutePortAuthor return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRoutePortAuthorizationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - if id.AuthorizationName, ok = parsed.Parsed["authorizationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseExpressRoutePortAuthorizationIDInsensitively(input string) (*ExpressRo return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRoutePortAuthorizationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ExpressRoutePortAuthorizationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) + if id.ExpressRoutePortName, ok = input.Parsed["expressRoutePortName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", input) } - if id.AuthorizationName, ok = parsed.Parsed["authorizationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationName", *parsed) + if id.AuthorizationName, ok = input.Parsed["authorizationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "authorizationName", input) } - return &id, nil + return nil } // ValidateExpressRoutePortAuthorizationID checks that 'input' can be parsed as a Express Route Port Authorization ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteports/id_expressrouteport.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteports/id_expressrouteport.go index 2d3ef3fed81c..ee7a7081bcc5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteports/id_expressrouteport.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteports/id_expressrouteport.go @@ -36,19 +36,9 @@ func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRoutePortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRoutePortId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ExpressRoutePortId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) + if id.ExpressRoutePortName, ok = input.Parsed["expressRoutePortName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", input) } - return &id, nil + return nil } // ValidateExpressRoutePortID checks that 'input' can be parsed as a Express Route Port ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteportslocations/id_expressrouteportslocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteportslocations/id_expressrouteportslocation.go index 096c43de6674..bde80a447d3c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteportslocations/id_expressrouteportslocation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteportslocations/id_expressrouteportslocation.go @@ -34,15 +34,9 @@ func ParseExpressRoutePortsLocationID(input string) (*ExpressRoutePortsLocationI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRoutePortsLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ExpressRoutePortsLocationName, ok = parsed.Parsed["expressRoutePortsLocationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortsLocationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseExpressRoutePortsLocationIDInsensitively(input string) (*ExpressRouteP return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRoutePortsLocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ExpressRoutePortsLocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ExpressRoutePortsLocationName, ok = parsed.Parsed["expressRoutePortsLocationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortsLocationName", *parsed) + if id.ExpressRoutePortsLocationName, ok = input.Parsed["expressRoutePortsLocationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortsLocationName", input) } - return &id, nil + return nil } // ValidateExpressRoutePortsLocationID checks that 'input' can be parsed as a Express Route Ports Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteproviderports/id_expressrouteproviderport.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteproviderports/id_expressrouteproviderport.go index e7df5d969e98..c331d5741526 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteproviderports/id_expressrouteproviderport.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/expressrouteproviderports/id_expressrouteproviderport.go @@ -34,15 +34,9 @@ func ParseExpressRouteProviderPortID(input string) (*ExpressRouteProviderPortId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteProviderPortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ExpressRouteProviderPortName, ok = parsed.Parsed["expressRouteProviderPortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteProviderPortName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseExpressRouteProviderPortIDInsensitively(input string) (*ExpressRoutePr return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ExpressRouteProviderPortId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ExpressRouteProviderPortId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ExpressRouteProviderPortName, ok = parsed.Parsed["expressRouteProviderPortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteProviderPortName", *parsed) + if id.ExpressRouteProviderPortName, ok = input.Parsed["expressRouteProviderPortName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteProviderPortName", input) } - return &id, nil + return nil } // ValidateExpressRouteProviderPortID checks that 'input' can be parsed as a Express Route Provider Port ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/firewallpolicies/id_firewallpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/firewallpolicies/id_firewallpolicy.go index 7b760ef341ff..6cbb1ce84930 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/firewallpolicies/id_firewallpolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/firewallpolicies/id_firewallpolicy.go @@ -36,19 +36,9 @@ func ParseFirewallPolicyID(input string) (*FirewallPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFirewallPolicyIDInsensitively(input string) (*FirewallPolicyId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FirewallPolicyId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) + if id.FirewallPolicyName, ok = input.Parsed["firewallPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", input) } - return &id, nil + return nil } // ValidateFirewallPolicyID checks that 'input' can be parsed as a Firewall Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go index 0ab643089363..2082c31895f9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go @@ -36,19 +36,9 @@ func ParseFirewallPolicyID(input string) (*FirewallPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFirewallPolicyIDInsensitively(input string) (*FirewallPolicyId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FirewallPolicyId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) + if id.FirewallPolicyName, ok = input.Parsed["firewallPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", input) } - return &id, nil + return nil } // ValidateFirewallPolicyID checks that 'input' can be parsed as a Firewall Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go index 8ab322f77ac9..a53efd198103 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go @@ -38,23 +38,9 @@ func ParseRuleCollectionGroupID(input string) (*RuleCollectionGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RuleCollectionGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) - } - - if id.RuleCollectionGroupName, ok = parsed.Parsed["ruleCollectionGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRuleCollectionGroupIDInsensitively(input string) (*RuleCollectionGroup return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RuleCollectionGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RuleCollectionGroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) + if id.FirewallPolicyName, ok = input.Parsed["firewallPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", input) } - if id.RuleCollectionGroupName, ok = parsed.Parsed["ruleCollectionGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionGroupName", *parsed) + if id.RuleCollectionGroupName, ok = input.Parsed["ruleCollectionGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionGroupName", input) } - return &id, nil + return nil } // ValidateRuleCollectionGroupID checks that 'input' can be parsed as a Rule Collection Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/flowlogs/id_flowlog.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/flowlogs/id_flowlog.go index 531b76451d08..aa2aae5403e7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/flowlogs/id_flowlog.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/flowlogs/id_flowlog.go @@ -38,23 +38,9 @@ func ParseFlowLogID(input string) (*FlowLogId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlowLogId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - if id.FlowLogName, ok = parsed.Parsed["flowLogName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flowLogName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseFlowLogIDInsensitively(input string) (*FlowLogId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlowLogId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FlowLogId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) + if id.NetworkWatcherName, ok = input.Parsed["networkWatcherName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", input) } - if id.FlowLogName, ok = parsed.Parsed["flowLogName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flowLogName", *parsed) + if id.FlowLogName, ok = input.Parsed["flowLogName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flowLogName", input) } - return &id, nil + return nil } // ValidateFlowLogID checks that 'input' can be parsed as a Flow Log ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/flowlogs/id_networkwatcher.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/flowlogs/id_networkwatcher.go index 5fc6d966ffee..3bbc6a1f6591 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/flowlogs/id_networkwatcher.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/flowlogs/id_networkwatcher.go @@ -36,19 +36,9 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkWatcherId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkWatcherId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) + if id.NetworkWatcherName, ok = input.Parsed["networkWatcherName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", input) } - return &id, nil + return nil } // ValidateNetworkWatcherID checks that 'input' can be parsed as a Network Watcher ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/ipallocations/id_ipallocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/ipallocations/id_ipallocation.go index 6e8aa2517f84..2a7473772181 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/ipallocations/id_ipallocation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/ipallocations/id_ipallocation.go @@ -36,19 +36,9 @@ func ParseIPAllocationID(input string) (*IPAllocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IPAllocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IpAllocationName, ok = parsed.Parsed["ipAllocationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ipAllocationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseIPAllocationIDInsensitively(input string) (*IPAllocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IPAllocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *IPAllocationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IpAllocationName, ok = parsed.Parsed["ipAllocationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ipAllocationName", *parsed) + if id.IpAllocationName, ok = input.Parsed["ipAllocationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ipAllocationName", input) } - return &id, nil + return nil } // ValidateIPAllocationID checks that 'input' can be parsed as a I P Allocation ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/ipgroups/id_ipgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/ipgroups/id_ipgroup.go index 8ca4249bbd48..45902765d86e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/ipgroups/id_ipgroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/ipgroups/id_ipgroup.go @@ -36,19 +36,9 @@ func ParseIPGroupID(input string) (*IPGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IPGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IpGroupName, ok = parsed.Parsed["ipGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ipGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseIPGroupIDInsensitively(input string) (*IPGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IPGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *IPGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.IpGroupName, ok = parsed.Parsed["ipGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ipGroupName", *parsed) + if id.IpGroupName, ok = input.Parsed["ipGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ipGroupName", input) } - return &id, nil + return nil } // ValidateIPGroupID checks that 'input' can be parsed as a I P Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_backendaddresspool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_backendaddresspool.go index 39e1f9356f94..8f5a557e2b83 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_backendaddresspool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_backendaddresspool.go @@ -38,23 +38,9 @@ func ParseBackendAddressPoolID(input string) (*BackendAddressPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackendAddressPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.BackendAddressPoolName, ok = parsed.Parsed["backendAddressPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backendAddressPoolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseBackendAddressPoolIDInsensitively(input string) (*BackendAddressPoolId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackendAddressPoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BackendAddressPoolId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) + if id.LoadBalancerName, ok = input.Parsed["loadBalancerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", input) } - if id.BackendAddressPoolName, ok = parsed.Parsed["backendAddressPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backendAddressPoolName", *parsed) + if id.BackendAddressPoolName, ok = input.Parsed["backendAddressPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backendAddressPoolName", input) } - return &id, nil + return nil } // ValidateBackendAddressPoolID checks that 'input' can be parsed as a Backend Address Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_frontendipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_frontendipconfiguration.go index 9f6c3f96a03e..aafe02ffabc3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_frontendipconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_frontendipconfiguration.go @@ -38,23 +38,9 @@ func ParseFrontendIPConfigurationID(input string) (*FrontendIPConfigurationId, e return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FrontendIPConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.FrontendIPConfigurationName, ok = parsed.Parsed["frontendIPConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontendIPConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseFrontendIPConfigurationIDInsensitively(input string) (*FrontendIPConfi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FrontendIPConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FrontendIPConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) + if id.LoadBalancerName, ok = input.Parsed["loadBalancerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", input) } - if id.FrontendIPConfigurationName, ok = parsed.Parsed["frontendIPConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontendIPConfigurationName", *parsed) + if id.FrontendIPConfigurationName, ok = input.Parsed["frontendIPConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "frontendIPConfigurationName", input) } - return &id, nil + return nil } // ValidateFrontendIPConfigurationID checks that 'input' can be parsed as a Frontend I P Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_inboundnatrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_inboundnatrule.go index 8a803ad67887..6bd76e31f884 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_inboundnatrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_inboundnatrule.go @@ -38,23 +38,9 @@ func ParseInboundNatRuleID(input string) (*InboundNatRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := InboundNatRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.InboundNatRuleName, ok = parsed.Parsed["inboundNatRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "inboundNatRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseInboundNatRuleIDInsensitively(input string) (*InboundNatRuleId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := InboundNatRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *InboundNatRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) + if id.LoadBalancerName, ok = input.Parsed["loadBalancerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", input) } - if id.InboundNatRuleName, ok = parsed.Parsed["inboundNatRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "inboundNatRuleName", *parsed) + if id.InboundNatRuleName, ok = input.Parsed["inboundNatRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "inboundNatRuleName", input) } - return &id, nil + return nil } // ValidateInboundNatRuleID checks that 'input' can be parsed as a Inbound Nat Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_loadbalancer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_loadbalancer.go index 28f94e2cf3f7..7bdb2e468e1f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_loadbalancer.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_loadbalancer.go @@ -36,19 +36,9 @@ func ParseLoadBalancerID(input string) (*LoadBalancerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LoadBalancerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLoadBalancerIDInsensitively(input string) (*LoadBalancerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LoadBalancerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LoadBalancerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) + if id.LoadBalancerName, ok = input.Parsed["loadBalancerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", input) } - return &id, nil + return nil } // ValidateLoadBalancerID checks that 'input' can be parsed as a Load Balancer ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_loadbalancerbackendaddresspool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_loadbalancerbackendaddresspool.go index 98ac08abc20b..8698d328a338 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_loadbalancerbackendaddresspool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_loadbalancerbackendaddresspool.go @@ -38,23 +38,9 @@ func ParseLoadBalancerBackendAddressPoolID(input string) (*LoadBalancerBackendAd return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LoadBalancerBackendAddressPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.BackendAddressPoolName, ok = parsed.Parsed["backendAddressPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backendAddressPoolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLoadBalancerBackendAddressPoolIDInsensitively(input string) (*LoadBala return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LoadBalancerBackendAddressPoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LoadBalancerBackendAddressPoolId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) + if id.LoadBalancerName, ok = input.Parsed["loadBalancerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", input) } - if id.BackendAddressPoolName, ok = parsed.Parsed["backendAddressPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backendAddressPoolName", *parsed) + if id.BackendAddressPoolName, ok = input.Parsed["backendAddressPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backendAddressPoolName", input) } - return &id, nil + return nil } // ValidateLoadBalancerBackendAddressPoolID checks that 'input' can be parsed as a Load Balancer Backend Address Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_loadbalancingrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_loadbalancingrule.go index 4b3bb48b397e..e5622c56f466 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_loadbalancingrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_loadbalancingrule.go @@ -38,23 +38,9 @@ func ParseLoadBalancingRuleID(input string) (*LoadBalancingRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LoadBalancingRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.LoadBalancingRuleName, ok = parsed.Parsed["loadBalancingRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancingRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLoadBalancingRuleIDInsensitively(input string) (*LoadBalancingRuleId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LoadBalancingRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LoadBalancingRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) + if id.LoadBalancerName, ok = input.Parsed["loadBalancerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", input) } - if id.LoadBalancingRuleName, ok = parsed.Parsed["loadBalancingRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancingRuleName", *parsed) + if id.LoadBalancingRuleName, ok = input.Parsed["loadBalancingRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "loadBalancingRuleName", input) } - return &id, nil + return nil } // ValidateLoadBalancingRuleID checks that 'input' can be parsed as a Load Balancing Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_location.go index 3a2efc6db170..7a45a89e1ae1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_outboundrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_outboundrule.go index b2c3cafa61b1..651a601a0f4f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_outboundrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_outboundrule.go @@ -38,23 +38,9 @@ func ParseOutboundRuleID(input string) (*OutboundRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OutboundRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.OutboundRuleName, ok = parsed.Parsed["outboundRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "outboundRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseOutboundRuleIDInsensitively(input string) (*OutboundRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OutboundRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *OutboundRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) + if id.LoadBalancerName, ok = input.Parsed["loadBalancerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", input) } - if id.OutboundRuleName, ok = parsed.Parsed["outboundRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "outboundRuleName", *parsed) + if id.OutboundRuleName, ok = input.Parsed["outboundRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "outboundRuleName", input) } - return &id, nil + return nil } // ValidateOutboundRuleID checks that 'input' can be parsed as a Outbound Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_probe.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_probe.go index 6307740b0b8a..a6df1c3f1b1a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_probe.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_probe.go @@ -38,23 +38,9 @@ func ParseProbeID(input string) (*ProbeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProbeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.ProbeName, ok = parsed.Parsed["probeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "probeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseProbeIDInsensitively(input string) (*ProbeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProbeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProbeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) + if id.LoadBalancerName, ok = input.Parsed["loadBalancerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", input) } - if id.ProbeName, ok = parsed.Parsed["probeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "probeName", *parsed) + if id.ProbeName, ok = input.Parsed["probeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "probeName", input) } - return &id, nil + return nil } // ValidateProbeID checks that 'input' can be parsed as a Probe ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_providerloadbalancer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_providerloadbalancer.go index d93844028b64..c66a2652fd81 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_providerloadbalancer.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/loadbalancers/id_providerloadbalancer.go @@ -36,19 +36,9 @@ func ParseProviderLoadBalancerID(input string) (*ProviderLoadBalancerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLoadBalancerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProviderLoadBalancerIDInsensitively(input string) (*ProviderLoadBalanc return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLoadBalancerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProviderLoadBalancerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) + if id.LoadBalancerName, ok = input.Parsed["loadBalancerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", input) } - return &id, nil + return nil } // ValidateProviderLoadBalancerID checks that 'input' can be parsed as a Provider Load Balancer ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/localnetworkgateways/id_localnetworkgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/localnetworkgateways/id_localnetworkgateway.go index 9e5a1b39e8ca..6242e60495d6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/localnetworkgateways/id_localnetworkgateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/localnetworkgateways/id_localnetworkgateway.go @@ -36,19 +36,9 @@ func ParseLocalNetworkGatewayID(input string) (*LocalNetworkGatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalNetworkGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocalNetworkGatewayName, ok = parsed.Parsed["localNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localNetworkGatewayName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLocalNetworkGatewayIDInsensitively(input string) (*LocalNetworkGateway return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalNetworkGatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LocalNetworkGatewayId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocalNetworkGatewayName, ok = parsed.Parsed["localNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localNetworkGatewayName", *parsed) + if id.LocalNetworkGatewayName, ok = input.Parsed["localNetworkGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "localNetworkGatewayName", input) } - return &id, nil + return nil } // ValidateLocalNetworkGatewayID checks that 'input' can be parsed as a Local Network Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/natgateways/id_natgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/natgateways/id_natgateway.go index 2ce4673298f4..2d35c7387487 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/natgateways/id_natgateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/natgateways/id_natgateway.go @@ -36,19 +36,9 @@ func ParseNatGatewayID(input string) (*NatGatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NatGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NatGatewayName, ok = parsed.Parsed["natGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natGatewayName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNatGatewayIDInsensitively(input string) (*NatGatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NatGatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NatGatewayId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NatGatewayName, ok = parsed.Parsed["natGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natGatewayName", *parsed) + if id.NatGatewayName, ok = input.Parsed["natGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "natGatewayName", input) } - return &id, nil + return nil } // ValidateNatGatewayID checks that 'input' can be parsed as a Nat Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkgroups/id_networkgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkgroups/id_networkgroup.go index e96f87ea6b41..186c7965e715 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkgroups/id_networkgroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkgroups/id_networkgroup.go @@ -38,23 +38,9 @@ func ParseNetworkGroupID(input string) (*NetworkGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseNetworkGroupIDInsensitively(input string) (*NetworkGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *NetworkGroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if id.NetworkManagerName, ok = input.Parsed["networkManagerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", input) } - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) + if id.NetworkGroupName, ok = input.Parsed["networkGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", input) } - return &id, nil + return nil } // ValidateNetworkGroupID checks that 'input' can be parsed as a Network Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkgroups/id_networkmanager.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkgroups/id_networkmanager.go index 0524156947bd..bcdb5221bdd3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkgroups/id_networkmanager.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkgroups/id_networkmanager.go @@ -36,19 +36,9 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkManagerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkManagerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if id.NetworkManagerName, ok = input.Parsed["networkManagerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", input) } - return &id, nil + return nil } // ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_providercloudservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_providercloudservice.go index 3fcfcb53fc74..6493dd6d4f74 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_providercloudservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_providercloudservice.go @@ -36,19 +36,9 @@ func ParseProviderCloudServiceID(input string) (*ProviderCloudServiceId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderCloudServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProviderCloudServiceIDInsensitively(input string) (*ProviderCloudServi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderCloudServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProviderCloudServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) + if id.CloudServiceName, ok = input.Parsed["cloudServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", input) } - return &id, nil + return nil } // ValidateProviderCloudServiceID checks that 'input' can be parsed as a Provider Cloud Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_roleinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_roleinstance.go index 5c916d65fd82..8f24317428a9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_roleinstance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_roleinstance.go @@ -38,23 +38,9 @@ func ParseRoleInstanceID(input string) (*RoleInstanceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RoleInstanceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - if id.RoleInstanceName, ok = parsed.Parsed["roleInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleInstanceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRoleInstanceIDInsensitively(input string) (*RoleInstanceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RoleInstanceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RoleInstanceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) + if id.CloudServiceName, ok = input.Parsed["cloudServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", input) } - if id.RoleInstanceName, ok = parsed.Parsed["roleInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleInstanceName", *parsed) + if id.RoleInstanceName, ok = input.Parsed["roleInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "roleInstanceName", input) } - return &id, nil + return nil } // ValidateRoleInstanceID checks that 'input' can be parsed as a Role Instance ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_roleinstancenetworkinterface.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_roleinstancenetworkinterface.go index b0f618d319e1..39a088a38c0d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_roleinstancenetworkinterface.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_roleinstancenetworkinterface.go @@ -40,27 +40,9 @@ func ParseRoleInstanceNetworkInterfaceID(input string) (*RoleInstanceNetworkInte return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RoleInstanceNetworkInterfaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - if id.RoleInstanceName, ok = parsed.Parsed["roleInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleInstanceName", *parsed) - } - - if id.NetworkInterfaceName, ok = parsed.Parsed["networkInterfaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkInterfaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseRoleInstanceNetworkInterfaceIDInsensitively(input string) (*RoleInstan return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RoleInstanceNetworkInterfaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *RoleInstanceNetworkInterfaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) + if id.CloudServiceName, ok = input.Parsed["cloudServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", input) } - if id.RoleInstanceName, ok = parsed.Parsed["roleInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleInstanceName", *parsed) + if id.RoleInstanceName, ok = input.Parsed["roleInstanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "roleInstanceName", input) } - if id.NetworkInterfaceName, ok = parsed.Parsed["networkInterfaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkInterfaceName", *parsed) + if id.NetworkInterfaceName, ok = input.Parsed["networkInterfaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkInterfaceName", input) } - return &id, nil + return nil } // ValidateRoleInstanceNetworkInterfaceID checks that 'input' can be parsed as a Role Instance Network Interface ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_tapconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_tapconfiguration.go index c7879c40c1f2..846e65a80a84 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_tapconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_tapconfiguration.go @@ -38,23 +38,9 @@ func ParseTapConfigurationID(input string) (*TapConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TapConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkInterfaceName, ok = parsed.Parsed["networkInterfaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkInterfaceName", *parsed) - } - - if id.TapConfigurationName, ok = parsed.Parsed["tapConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tapConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTapConfigurationIDInsensitively(input string) (*TapConfigurationId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TapConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TapConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkInterfaceName, ok = parsed.Parsed["networkInterfaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkInterfaceName", *parsed) + if id.NetworkInterfaceName, ok = input.Parsed["networkInterfaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkInterfaceName", input) } - if id.TapConfigurationName, ok = parsed.Parsed["tapConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tapConfigurationName", *parsed) + if id.TapConfigurationName, ok = input.Parsed["tapConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "tapConfigurationName", input) } - return &id, nil + return nil } // ValidateTapConfigurationID checks that 'input' can be parsed as a Tap Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_virtualmachine.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_virtualmachine.go index c0c1dd29a1b8..263ea3672215 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_virtualmachine.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_virtualmachine.go @@ -38,23 +38,9 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualMachineId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) - } - - if id.VirtualMachineName, ok = parsed.Parsed["virtualMachineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualMachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VirtualMachineId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) + if id.VirtualMachineScaleSetName, ok = input.Parsed["virtualMachineScaleSetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", input) } - if id.VirtualMachineName, ok = parsed.Parsed["virtualMachineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", *parsed) + if id.VirtualMachineName, ok = input.Parsed["virtualMachineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", input) } - return &id, nil + return nil } // ValidateVirtualMachineID checks that 'input' can be parsed as a Virtual Machine ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_virtualmachinescaleset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_virtualmachinescaleset.go index 8435bb247a2c..04a66737ce36 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_virtualmachinescaleset.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkinterfaces/id_virtualmachinescaleset.go @@ -36,19 +36,9 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualMachineScaleSetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualMachineScaleSetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VirtualMachineScaleSetId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) + if id.VirtualMachineScaleSetName, ok = input.Parsed["virtualMachineScaleSetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", input) } - return &id, nil + return nil } // ValidateVirtualMachineScaleSetID checks that 'input' can be parsed as a Virtual Machine Scale Set ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanageractiveconfigurations/id_networkmanager.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanageractiveconfigurations/id_networkmanager.go index eb40c45d5682..1188c8c4e05f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanageractiveconfigurations/id_networkmanager.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanageractiveconfigurations/id_networkmanager.go @@ -36,19 +36,9 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkManagerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkManagerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if id.NetworkManagerName, ok = input.Parsed["networkManagerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", input) } - return &id, nil + return nil } // ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go index 6f686aaaba2f..1bda39b2b1e1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go @@ -36,19 +36,9 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkManagerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkManagerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if id.NetworkManagerName, ok = input.Parsed["networkManagerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", input) } - return &id, nil + return nil } // ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanagerconnections/id_networkmanagerconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanagerconnections/id_networkmanagerconnection.go index 257d0dbb5801..0cee14099cfc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanagerconnections/id_networkmanagerconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanagerconnections/id_networkmanagerconnection.go @@ -34,15 +34,9 @@ func ParseNetworkManagerConnectionID(input string) (*NetworkManagerConnectionId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkManagerConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.NetworkManagerConnectionName, ok = parsed.Parsed["networkManagerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseNetworkManagerConnectionIDInsensitively(input string) (*NetworkManager return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkManagerConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *NetworkManagerConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.NetworkManagerConnectionName, ok = parsed.Parsed["networkManagerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerConnectionName", *parsed) + if id.NetworkManagerConnectionName, ok = input.Parsed["networkManagerConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerConnectionName", input) } - return &id, nil + return nil } // ValidateNetworkManagerConnectionID checks that 'input' can be parsed as a Network Manager Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanagerconnections/id_providers2networkmanagerconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanagerconnections/id_providers2networkmanagerconnection.go index eb0ead3de30d..a6fa4fd9225e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanagerconnections/id_providers2networkmanagerconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanagerconnections/id_providers2networkmanagerconnection.go @@ -34,15 +34,9 @@ func ParseProviders2NetworkManagerConnectionID(input string) (*Providers2Network return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Providers2NetworkManagerConnectionId{} - - if id.ManagementGroupId, ok = parsed.Parsed["managementGroupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managementGroupId", *parsed) - } - - if id.NetworkManagerConnectionName, ok = parsed.Parsed["networkManagerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseProviders2NetworkManagerConnectionIDInsensitively(input string) (*Prov return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Providers2NetworkManagerConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.ManagementGroupId, ok = parsed.Parsed["managementGroupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managementGroupId", *parsed) + return &id, nil +} + +func (id *Providers2NetworkManagerConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ManagementGroupId, ok = input.Parsed["managementGroupId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managementGroupId", input) } - if id.NetworkManagerConnectionName, ok = parsed.Parsed["networkManagerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerConnectionName", *parsed) + if id.NetworkManagerConnectionName, ok = input.Parsed["networkManagerConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerConnectionName", input) } - return &id, nil + return nil } // ValidateProviders2NetworkManagerConnectionID checks that 'input' can be parsed as a Providers 2 Network Manager Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanagers/id_networkmanager.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanagers/id_networkmanager.go index fa90a755a358..6ab905990a99 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanagers/id_networkmanager.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkmanagers/id_networkmanager.go @@ -36,19 +36,9 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkManagerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkManagerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if id.NetworkManagerName, ok = input.Parsed["networkManagerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", input) } - return &id, nil + return nil } // ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkprofiles/id_networkprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkprofiles/id_networkprofile.go index 0cacfb77d6a2..75ac2822b5d2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkprofiles/id_networkprofile.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkprofiles/id_networkprofile.go @@ -36,19 +36,9 @@ func ParseNetworkProfileID(input string) (*NetworkProfileId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkProfileId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkProfileName, ok = parsed.Parsed["networkProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkProfileName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkProfileIDInsensitively(input string) (*NetworkProfileId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkProfileId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkProfileId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkProfileName, ok = parsed.Parsed["networkProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkProfileName", *parsed) + if id.NetworkProfileName, ok = input.Parsed["networkProfileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkProfileName", input) } - return &id, nil + return nil } // ValidateNetworkProfileID checks that 'input' can be parsed as a Network Profile ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networksecuritygroups/id_networksecuritygroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networksecuritygroups/id_networksecuritygroup.go index 976358d972cd..4714b6b6f8b0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networksecuritygroups/id_networksecuritygroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networksecuritygroups/id_networksecuritygroup.go @@ -36,19 +36,9 @@ func ParseNetworkSecurityGroupID(input string) (*NetworkSecurityGroupId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkSecurityGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkSecurityGroupIDInsensitively(input string) (*NetworkSecurityGro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkSecurityGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkSecurityGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) + if id.NetworkSecurityGroupName, ok = input.Parsed["networkSecurityGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", input) } - return &id, nil + return nil } // ValidateNetworkSecurityGroupID checks that 'input' can be parsed as a Network Security Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkvirtualappliances/id_inboundsecurityrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkvirtualappliances/id_inboundsecurityrule.go index 57ed3f89cae8..55aff9179bfa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkvirtualappliances/id_inboundsecurityrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkvirtualappliances/id_inboundsecurityrule.go @@ -38,23 +38,9 @@ func ParseInboundSecurityRuleID(input string) (*InboundSecurityRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := InboundSecurityRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - if id.InboundSecurityRuleName, ok = parsed.Parsed["inboundSecurityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "inboundSecurityRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseInboundSecurityRuleIDInsensitively(input string) (*InboundSecurityRule return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := InboundSecurityRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *InboundSecurityRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) + if id.NetworkVirtualApplianceName, ok = input.Parsed["networkVirtualApplianceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", input) } - if id.InboundSecurityRuleName, ok = parsed.Parsed["inboundSecurityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "inboundSecurityRuleName", *parsed) + if id.InboundSecurityRuleName, ok = input.Parsed["inboundSecurityRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "inboundSecurityRuleName", input) } - return &id, nil + return nil } // ValidateInboundSecurityRuleID checks that 'input' can be parsed as a Inbound Security Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkvirtualappliances/id_networkvirtualappliance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkvirtualappliances/id_networkvirtualappliance.go index c4feaf36235e..58a3908e643f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkvirtualappliances/id_networkvirtualappliance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkvirtualappliances/id_networkvirtualappliance.go @@ -36,19 +36,9 @@ func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, e return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkVirtualApplianceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualA return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkVirtualApplianceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkVirtualApplianceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) + if id.NetworkVirtualApplianceName, ok = input.Parsed["networkVirtualApplianceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", input) } - return &id, nil + return nil } // ValidateNetworkVirtualApplianceID checks that 'input' can be parsed as a Network Virtual Appliance ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkwatchers/id_networkwatcher.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkwatchers/id_networkwatcher.go index 2cb57313a168..88102cbe0ba8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkwatchers/id_networkwatcher.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/networkwatchers/id_networkwatcher.go @@ -36,19 +36,9 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkWatcherId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkWatcherId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) + if id.NetworkWatcherName, ok = input.Parsed["networkWatcherName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", input) } - return &id, nil + return nil } // ValidateNetworkWatcherID checks that 'input' can be parsed as a Network Watcher ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/packetcaptures/id_networkwatcher.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/packetcaptures/id_networkwatcher.go index b5478e241e24..05a87434be65 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/packetcaptures/id_networkwatcher.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/packetcaptures/id_networkwatcher.go @@ -36,19 +36,9 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkWatcherId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkWatcherId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) + if id.NetworkWatcherName, ok = input.Parsed["networkWatcherName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", input) } - return &id, nil + return nil } // ValidateNetworkWatcherID checks that 'input' can be parsed as a Network Watcher ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/packetcaptures/id_packetcapture.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/packetcaptures/id_packetcapture.go index 57e35d5f1f28..e56233f86a2e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/packetcaptures/id_packetcapture.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/packetcaptures/id_packetcapture.go @@ -38,23 +38,9 @@ func ParsePacketCaptureID(input string) (*PacketCaptureId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PacketCaptureId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - if id.PacketCaptureName, ok = parsed.Parsed["packetCaptureName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "packetCaptureName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePacketCaptureIDInsensitively(input string) (*PacketCaptureId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PacketCaptureId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PacketCaptureId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) + if id.NetworkWatcherName, ok = input.Parsed["networkWatcherName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", input) } - if id.PacketCaptureName, ok = parsed.Parsed["packetCaptureName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "packetCaptureName", *parsed) + if id.PacketCaptureName, ok = input.Parsed["packetCaptureName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "packetCaptureName", input) } - return &id, nil + return nil } // ValidatePacketCaptureID checks that 'input' can be parsed as a Packet Capture ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/peerexpressroutecircuitconnections/id_peerconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/peerexpressroutecircuitconnections/id_peerconnection.go index 9e974b3fad55..13e4d8f3184c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/peerexpressroutecircuitconnections/id_peerconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/peerexpressroutecircuitconnections/id_peerconnection.go @@ -40,27 +40,9 @@ func ParsePeerConnectionID(input string) (*PeerConnectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PeerConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.PeerConnectionName, ok = parsed.Parsed["peerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peerConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParsePeerConnectionIDInsensitively(input string) (*PeerConnectionId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PeerConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *PeerConnectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) + if id.ExpressRouteCircuitName, ok = input.Parsed["expressRouteCircuitName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", input) } - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) + if id.PeeringName, ok = input.Parsed["peeringName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "peeringName", input) } - if id.PeerConnectionName, ok = parsed.Parsed["peerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peerConnectionName", *parsed) + if id.PeerConnectionName, ok = input.Parsed["peerConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "peerConnectionName", input) } - return &id, nil + return nil } // ValidatePeerConnectionID checks that 'input' can be parsed as a Peer Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatednszonegroups/id_privatednszonegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatednszonegroups/id_privatednszonegroup.go index 532e498e1595..c4cd41f32d5f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatednszonegroups/id_privatednszonegroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatednszonegroups/id_privatednszonegroup.go @@ -38,23 +38,9 @@ func ParsePrivateDnsZoneGroupID(input string) (*PrivateDnsZoneGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateDnsZoneGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) - } - - if id.PrivateDnsZoneGroupName, ok = parsed.Parsed["privateDnsZoneGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrivateDnsZoneGroupIDInsensitively(input string) (*PrivateDnsZoneGroup return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateDnsZoneGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateDnsZoneGroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) + if id.PrivateEndpointName, ok = input.Parsed["privateEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", input) } - if id.PrivateDnsZoneGroupName, ok = parsed.Parsed["privateDnsZoneGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneGroupName", *parsed) + if id.PrivateDnsZoneGroupName, ok = input.Parsed["privateDnsZoneGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneGroupName", input) } - return &id, nil + return nil } // ValidatePrivateDnsZoneGroupID checks that 'input' can be parsed as a Private Dns Zone Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatednszonegroups/id_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatednszonegroups/id_privateendpoint.go index a547392c0f38..16a2e56d16c2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatednszonegroups/id_privateendpoint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatednszonegroups/id_privateendpoint.go @@ -36,19 +36,9 @@ func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PrivateEndpointId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) + if id.PrivateEndpointName, ok = input.Parsed["privateEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", input) } - return &id, nil + return nil } // ValidatePrivateEndpointID checks that 'input' can be parsed as a Private Endpoint ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privateendpoints/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privateendpoints/id_location.go index 146a6110738b..f2d861344268 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privateendpoints/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privateendpoints/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privateendpoints/id_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privateendpoints/id_privateendpoint.go index 219fe0f79061..2122ecbbc30b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privateendpoints/id_privateendpoint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privateendpoints/id_privateendpoint.go @@ -36,19 +36,9 @@ func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PrivateEndpointId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) + if id.PrivateEndpointName, ok = input.Parsed["privateEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", input) } - return &id, nil + return nil } // ValidatePrivateEndpointID checks that 'input' can be parsed as a Private Endpoint ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privateendpoints/id_providerlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privateendpoints/id_providerlocation.go index bdc082c05302..e412f544122d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privateendpoints/id_providerlocation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privateendpoints/id_providerlocation.go @@ -36,19 +36,9 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProviderLocationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservice/id_privatelinkservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservice/id_privatelinkservice.go index 1565b227dbde..8eae2881181f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservice/id_privatelinkservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservice/id_privatelinkservice.go @@ -36,19 +36,9 @@ func ParsePrivateLinkServiceID(input string) (*PrivateLinkServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateLinkServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePrivateLinkServiceIDInsensitively(input string) (*PrivateLinkServiceId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateLinkServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PrivateLinkServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) + if id.PrivateLinkServiceName, ok = input.Parsed["privateLinkServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", input) } - return &id, nil + return nil } // ValidatePrivateLinkServiceID checks that 'input' can be parsed as a Private Link Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservices/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservices/id_location.go index 24e866620595..95e950e7e64c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservices/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservices/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservices/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservices/id_privateendpointconnection.go index d6a66965d1b9..d9cd7306b2c2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservices/id_privateendpointconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservices/id_privateendpointconnection.go @@ -38,23 +38,9 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) + if id.PrivateLinkServiceName, ok = input.Parsed["privateLinkServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", input) } - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", input) } - return &id, nil + return nil } // ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservices/id_privatelinkservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservices/id_privatelinkservice.go index 94f3432277b9..45249de5a73a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservices/id_privatelinkservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservices/id_privatelinkservice.go @@ -36,19 +36,9 @@ func ParsePrivateLinkServiceID(input string) (*PrivateLinkServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateLinkServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePrivateLinkServiceIDInsensitively(input string) (*PrivateLinkServiceId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateLinkServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PrivateLinkServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) + if id.PrivateLinkServiceName, ok = input.Parsed["privateLinkServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", input) } - return &id, nil + return nil } // ValidatePrivateLinkServiceID checks that 'input' can be parsed as a Private Link Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservices/id_providerlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservices/id_providerlocation.go index 2b075dec749d..16521a221cb3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservices/id_providerlocation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/privatelinkservices/id_providerlocation.go @@ -36,19 +36,9 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProviderLocationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/publicipprefixes/id_publicipprefix.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/publicipprefixes/id_publicipprefix.go index 545d5140e510..8a54fd6b51e7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/publicipprefixes/id_publicipprefix.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/publicipprefixes/id_publicipprefix.go @@ -36,19 +36,9 @@ func ParsePublicIPPrefixID(input string) (*PublicIPPrefixId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PublicIPPrefixId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PublicIPPrefixName, ok = parsed.Parsed["publicIPPrefixName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publicIPPrefixName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePublicIPPrefixIDInsensitively(input string) (*PublicIPPrefixId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PublicIPPrefixId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PublicIPPrefixId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PublicIPPrefixName, ok = parsed.Parsed["publicIPPrefixName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publicIPPrefixName", *parsed) + if id.PublicIPPrefixName, ok = input.Parsed["publicIPPrefixName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "publicIPPrefixName", input) } - return &id, nil + return nil } // ValidatePublicIPPrefixID checks that 'input' can be parsed as a Public I P Prefix ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routefilterrules/id_routefilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routefilterrules/id_routefilter.go index 6ada8a037fc3..20669cb3c9fd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routefilterrules/id_routefilter.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routefilterrules/id_routefilter.go @@ -36,19 +36,9 @@ func ParseRouteFilterID(input string) (*RouteFilterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRouteFilterIDInsensitively(input string) (*RouteFilterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteFilterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RouteFilterId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) + if id.RouteFilterName, ok = input.Parsed["routeFilterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", input) } - return &id, nil + return nil } // ValidateRouteFilterID checks that 'input' can be parsed as a Route Filter ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routefilterrules/id_routefilterrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routefilterrules/id_routefilterrule.go index e4cf470acdc7..fffc56ea557f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routefilterrules/id_routefilterrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routefilterrules/id_routefilterrule.go @@ -38,23 +38,9 @@ func ParseRouteFilterRuleID(input string) (*RouteFilterRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteFilterRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) - } - - if id.RouteFilterRuleName, ok = parsed.Parsed["routeFilterRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRouteFilterRuleIDInsensitively(input string) (*RouteFilterRuleId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteFilterRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RouteFilterRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) + if id.RouteFilterName, ok = input.Parsed["routeFilterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", input) } - if id.RouteFilterRuleName, ok = parsed.Parsed["routeFilterRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterRuleName", *parsed) + if id.RouteFilterRuleName, ok = input.Parsed["routeFilterRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "routeFilterRuleName", input) } - return &id, nil + return nil } // ValidateRouteFilterRuleID checks that 'input' can be parsed as a Route Filter Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routefilters/id_routefilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routefilters/id_routefilter.go index 0d539e18cc37..4104bf0d1543 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routefilters/id_routefilter.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routefilters/id_routefilter.go @@ -36,19 +36,9 @@ func ParseRouteFilterID(input string) (*RouteFilterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRouteFilterIDInsensitively(input string) (*RouteFilterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteFilterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RouteFilterId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) + if id.RouteFilterName, ok = input.Parsed["routeFilterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", input) } - return &id, nil + return nil } // ValidateRouteFilterID checks that 'input' can be parsed as a Route Filter ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routes/id_route.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routes/id_route.go index f2bbb0efdb53..aa8060fb8f7f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routes/id_route.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routes/id_route.go @@ -38,23 +38,9 @@ func ParseRouteID(input string) (*RouteId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - if id.RouteName, ok = parsed.Parsed["routeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRouteIDInsensitively(input string) (*RouteId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RouteId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) + if id.RouteTableName, ok = input.Parsed["routeTableName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", input) } - if id.RouteName, ok = parsed.Parsed["routeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeName", *parsed) + if id.RouteName, ok = input.Parsed["routeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "routeName", input) } - return &id, nil + return nil } // ValidateRouteID checks that 'input' can be parsed as a Route ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routes/id_routetable.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routes/id_routetable.go index c8aadc85160c..2aaab7c00d7b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routes/id_routetable.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routes/id_routetable.go @@ -36,19 +36,9 @@ func ParseRouteTableID(input string) (*RouteTableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRouteTableIDInsensitively(input string) (*RouteTableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteTableId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RouteTableId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) + if id.RouteTableName, ok = input.Parsed["routeTableName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", input) } - return &id, nil + return nil } // ValidateRouteTableID checks that 'input' can be parsed as a Route Table ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routetables/id_routetable.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routetables/id_routetable.go index 15838ef16b1b..8fe456d11cd5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routetables/id_routetable.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/routetables/id_routetable.go @@ -36,19 +36,9 @@ func ParseRouteTableID(input string) (*RouteTableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRouteTableIDInsensitively(input string) (*RouteTableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteTableId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RouteTableId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) + if id.RouteTableName, ok = input.Parsed["routeTableName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", input) } - return &id, nil + return nil } // ValidateRouteTableID checks that 'input' can be parsed as a Route Table ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/scopeconnections/id_networkmanager.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/scopeconnections/id_networkmanager.go index 8e518126e3dc..168e61737858 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/scopeconnections/id_networkmanager.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/scopeconnections/id_networkmanager.go @@ -36,19 +36,9 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkManagerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkManagerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if id.NetworkManagerName, ok = input.Parsed["networkManagerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", input) } - return &id, nil + return nil } // ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/scopeconnections/id_scopeconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/scopeconnections/id_scopeconnection.go index dbc1fb7a7a70..bafad6ca7ab0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/scopeconnections/id_scopeconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/scopeconnections/id_scopeconnection.go @@ -38,23 +38,9 @@ func ParseScopeConnectionID(input string) (*ScopeConnectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopeConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.ScopeConnectionName, ok = parsed.Parsed["scopeConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scopeConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseScopeConnectionIDInsensitively(input string) (*ScopeConnectionId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopeConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ScopeConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if id.NetworkManagerName, ok = input.Parsed["networkManagerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", input) } - if id.ScopeConnectionName, ok = parsed.Parsed["scopeConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scopeConnectionName", *parsed) + if id.ScopeConnectionName, ok = input.Parsed["scopeConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scopeConnectionName", input) } - return &id, nil + return nil } // ValidateScopeConnectionID checks that 'input' can be parsed as a Scope Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityadminconfigurations/id_networkmanager.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityadminconfigurations/id_networkmanager.go index aec8d0fdd539..89b28c6005af 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityadminconfigurations/id_networkmanager.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityadminconfigurations/id_networkmanager.go @@ -36,19 +36,9 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkManagerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkManagerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if id.NetworkManagerName, ok = input.Parsed["networkManagerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", input) } - return &id, nil + return nil } // ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityadminconfigurations/id_securityadminconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityadminconfigurations/id_securityadminconfiguration.go index 3c2a85431265..5876385de219 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityadminconfigurations/id_securityadminconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityadminconfigurations/id_securityadminconfiguration.go @@ -38,23 +38,9 @@ func ParseSecurityAdminConfigurationID(input string) (*SecurityAdminConfiguratio return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SecurityAdminConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSecurityAdminConfigurationIDInsensitively(input string) (*SecurityAdmi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SecurityAdminConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SecurityAdminConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if id.NetworkManagerName, ok = input.Parsed["networkManagerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", input) } - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) + if id.SecurityAdminConfigurationName, ok = input.Parsed["securityAdminConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", input) } - return &id, nil + return nil } // ValidateSecurityAdminConfigurationID checks that 'input' can be parsed as a Security Admin Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securitypartnerproviders/id_securitypartnerprovider.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securitypartnerproviders/id_securitypartnerprovider.go index 3ebe53eb67a9..91f369b0d332 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securitypartnerproviders/id_securitypartnerprovider.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securitypartnerproviders/id_securitypartnerprovider.go @@ -36,19 +36,9 @@ func ParseSecurityPartnerProviderID(input string) (*SecurityPartnerProviderId, e return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SecurityPartnerProviderId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SecurityPartnerProviderName, ok = parsed.Parsed["securityPartnerProviderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityPartnerProviderName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSecurityPartnerProviderIDInsensitively(input string) (*SecurityPartner return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SecurityPartnerProviderId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SecurityPartnerProviderId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SecurityPartnerProviderName, ok = parsed.Parsed["securityPartnerProviderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityPartnerProviderName", *parsed) + if id.SecurityPartnerProviderName, ok = input.Parsed["securityPartnerProviderName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "securityPartnerProviderName", input) } - return &id, nil + return nil } // ValidateSecurityPartnerProviderID checks that 'input' can be parsed as a Security Partner Provider ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityrules/id_defaultsecurityrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityrules/id_defaultsecurityrule.go index e4a89e02f98b..6c7a0c234333 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityrules/id_defaultsecurityrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityrules/id_defaultsecurityrule.go @@ -38,23 +38,9 @@ func ParseDefaultSecurityRuleID(input string) (*DefaultSecurityRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DefaultSecurityRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - if id.DefaultSecurityRuleName, ok = parsed.Parsed["defaultSecurityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "defaultSecurityRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDefaultSecurityRuleIDInsensitively(input string) (*DefaultSecurityRule return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DefaultSecurityRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DefaultSecurityRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) + if id.NetworkSecurityGroupName, ok = input.Parsed["networkSecurityGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", input) } - if id.DefaultSecurityRuleName, ok = parsed.Parsed["defaultSecurityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "defaultSecurityRuleName", *parsed) + if id.DefaultSecurityRuleName, ok = input.Parsed["defaultSecurityRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "defaultSecurityRuleName", input) } - return &id, nil + return nil } // ValidateDefaultSecurityRuleID checks that 'input' can be parsed as a Default Security Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityrules/id_networksecuritygroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityrules/id_networksecuritygroup.go index 07dda76386b9..2a508ada09a8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityrules/id_networksecuritygroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityrules/id_networksecuritygroup.go @@ -36,19 +36,9 @@ func ParseNetworkSecurityGroupID(input string) (*NetworkSecurityGroupId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkSecurityGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkSecurityGroupIDInsensitively(input string) (*NetworkSecurityGro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkSecurityGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkSecurityGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) + if id.NetworkSecurityGroupName, ok = input.Parsed["networkSecurityGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", input) } - return &id, nil + return nil } // ValidateNetworkSecurityGroupID checks that 'input' can be parsed as a Network Security Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityrules/id_securityrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityrules/id_securityrule.go index 32ca98be479a..3c3391537ed9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityrules/id_securityrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/securityrules/id_securityrule.go @@ -38,23 +38,9 @@ func ParseSecurityRuleID(input string) (*SecurityRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SecurityRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - if id.SecurityRuleName, ok = parsed.Parsed["securityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSecurityRuleIDInsensitively(input string) (*SecurityRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SecurityRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SecurityRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) + if id.NetworkSecurityGroupName, ok = input.Parsed["networkSecurityGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", input) } - if id.SecurityRuleName, ok = parsed.Parsed["securityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityRuleName", *parsed) + if id.SecurityRuleName, ok = input.Parsed["securityRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "securityRuleName", input) } - return &id, nil + return nil } // ValidateSecurityRuleID checks that 'input' can be parsed as a Security Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/serviceendpointpolicies/id_serviceendpointpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/serviceendpointpolicies/id_serviceendpointpolicy.go index 1df0f6e46768..2b791b53a7e5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/serviceendpointpolicies/id_serviceendpointpolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/serviceendpointpolicies/id_serviceendpointpolicy.go @@ -36,19 +36,9 @@ func ParseServiceEndpointPolicyID(input string) (*ServiceEndpointPolicyId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceEndpointPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceEndpointPolicyIDInsensitively(input string) (*ServiceEndpointPo return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceEndpointPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceEndpointPolicyId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) + if id.ServiceEndpointPolicyName, ok = input.Parsed["serviceEndpointPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", input) } - return &id, nil + return nil } // ValidateServiceEndpointPolicyID checks that 'input' can be parsed as a Service Endpoint Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go index 979cf4f022ef..83015de951da 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go @@ -36,19 +36,9 @@ func ParseServiceEndpointPolicyID(input string) (*ServiceEndpointPolicyId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceEndpointPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServiceEndpointPolicyIDInsensitively(input string) (*ServiceEndpointPo return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceEndpointPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServiceEndpointPolicyId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) + if id.ServiceEndpointPolicyName, ok = input.Parsed["serviceEndpointPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", input) } - return &id, nil + return nil } // ValidateServiceEndpointPolicyID checks that 'input' can be parsed as a Service Endpoint Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go index f8fabb5925a4..f64efcf7090c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go @@ -38,23 +38,9 @@ func ParseServiceEndpointPolicyDefinitionID(input string) (*ServiceEndpointPolic return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceEndpointPolicyDefinitionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) - } - - if id.ServiceEndpointPolicyDefinitionName, ok = parsed.Parsed["serviceEndpointPolicyDefinitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyDefinitionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseServiceEndpointPolicyDefinitionIDInsensitively(input string) (*Service return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServiceEndpointPolicyDefinitionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ServiceEndpointPolicyDefinitionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) + if id.ServiceEndpointPolicyName, ok = input.Parsed["serviceEndpointPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", input) } - if id.ServiceEndpointPolicyDefinitionName, ok = parsed.Parsed["serviceEndpointPolicyDefinitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyDefinitionName", *parsed) + if id.ServiceEndpointPolicyDefinitionName, ok = input.Parsed["serviceEndpointPolicyDefinitionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyDefinitionName", input) } - return &id, nil + return nil } // ValidateServiceEndpointPolicyDefinitionID checks that 'input' can be parsed as a Service Endpoint Policy Definition ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/servicetags/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/servicetags/id_location.go index 2d8a29c22d91..768bb04fc555 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/servicetags/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/servicetags/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/staticmembers/id_networkgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/staticmembers/id_networkgroup.go index 67b3fd5daf13..85f6e10e5ea0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/staticmembers/id_networkgroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/staticmembers/id_networkgroup.go @@ -38,23 +38,9 @@ func ParseNetworkGroupID(input string) (*NetworkGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseNetworkGroupIDInsensitively(input string) (*NetworkGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *NetworkGroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if id.NetworkManagerName, ok = input.Parsed["networkManagerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", input) } - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) + if id.NetworkGroupName, ok = input.Parsed["networkGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", input) } - return &id, nil + return nil } // ValidateNetworkGroupID checks that 'input' can be parsed as a Network Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/staticmembers/id_staticmember.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/staticmembers/id_staticmember.go index c42f4e8bd271..92cd458d75ca 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/staticmembers/id_staticmember.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/staticmembers/id_staticmember.go @@ -40,27 +40,9 @@ func ParseStaticMemberID(input string) (*StaticMemberId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StaticMemberId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) - } - - if id.StaticMemberName, ok = parsed.Parsed["staticMemberName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "staticMemberName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseStaticMemberIDInsensitively(input string) (*StaticMemberId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StaticMemberId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *StaticMemberId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) + if id.NetworkManagerName, ok = input.Parsed["networkManagerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", input) } - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) + if id.NetworkGroupName, ok = input.Parsed["networkGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", input) } - if id.StaticMemberName, ok = parsed.Parsed["staticMemberName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "staticMemberName", *parsed) + if id.StaticMemberName, ok = input.Parsed["staticMemberName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "staticMemberName", input) } - return &id, nil + return nil } // ValidateStaticMemberID checks that 'input' can be parsed as a Static Member ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/trafficanalytics/id_networkwatcher.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/trafficanalytics/id_networkwatcher.go index 28df98e2c497..cf23d7e1b6b7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/trafficanalytics/id_networkwatcher.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/trafficanalytics/id_networkwatcher.go @@ -36,19 +36,9 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkWatcherId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkWatcherId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) + if id.NetworkWatcherName, ok = input.Parsed["networkWatcherName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", input) } - return &id, nil + return nil } // ValidateNetworkWatcherID checks that 'input' can be parsed as a Network Watcher ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/usages/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/usages/id_location.go index ef70b32225b0..0ea1a3015adb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/usages/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/usages/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vipswap/id_cloudservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vipswap/id_cloudservice.go index 9544661fbc5c..aab8095b9400 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vipswap/id_cloudservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vipswap/id_cloudservice.go @@ -36,19 +36,9 @@ func ParseCloudServiceID(input string) (*CloudServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CloudServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseCloudServiceIDInsensitively(input string) (*CloudServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CloudServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *CloudServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) + if id.CloudServiceName, ok = input.Parsed["cloudServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", input) } - return &id, nil + return nil } // ValidateCloudServiceID checks that 'input' can be parsed as a Cloud Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualappliancesites/id_networkvirtualappliance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualappliancesites/id_networkvirtualappliance.go index 2ae3ddeb5285..3a98094ce5f0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualappliancesites/id_networkvirtualappliance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualappliancesites/id_networkvirtualappliance.go @@ -36,19 +36,9 @@ func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, e return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkVirtualApplianceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualA return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkVirtualApplianceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkVirtualApplianceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) + if id.NetworkVirtualApplianceName, ok = input.Parsed["networkVirtualApplianceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", input) } - return &id, nil + return nil } // ValidateNetworkVirtualApplianceID checks that 'input' can be parsed as a Network Virtual Appliance ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualappliancesites/id_virtualappliancesite.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualappliancesites/id_virtualappliancesite.go index 62bcc9817bf3..64fcaa60c672 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualappliancesites/id_virtualappliancesite.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualappliancesites/id_virtualappliancesite.go @@ -38,23 +38,9 @@ func ParseVirtualApplianceSiteID(input string) (*VirtualApplianceSiteId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualApplianceSiteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - if id.VirtualApplianceSiteName, ok = parsed.Parsed["virtualApplianceSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualApplianceSiteName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseVirtualApplianceSiteIDInsensitively(input string) (*VirtualApplianceSi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualApplianceSiteId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VirtualApplianceSiteId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) + if id.NetworkVirtualApplianceName, ok = input.Parsed["networkVirtualApplianceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", input) } - if id.VirtualApplianceSiteName, ok = parsed.Parsed["virtualApplianceSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualApplianceSiteName", *parsed) + if id.VirtualApplianceSiteName, ok = input.Parsed["virtualApplianceSiteName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualApplianceSiteName", input) } - return &id, nil + return nil } // ValidateVirtualApplianceSiteID checks that 'input' can be parsed as a Virtual Appliance Site ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualapplianceskus/id_networkvirtualappliancesku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualapplianceskus/id_networkvirtualappliancesku.go index 7558f22904e1..9a2083833654 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualapplianceskus/id_networkvirtualappliancesku.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualapplianceskus/id_networkvirtualappliancesku.go @@ -34,15 +34,9 @@ func ParseNetworkVirtualApplianceSkuID(input string) (*NetworkVirtualApplianceSk return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkVirtualApplianceSkuId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.NetworkVirtualApplianceSkuName, ok = parsed.Parsed["networkVirtualApplianceSkuName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceSkuName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseNetworkVirtualApplianceSkuIDInsensitively(input string) (*NetworkVirtu return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkVirtualApplianceSkuId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *NetworkVirtualApplianceSkuId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.NetworkVirtualApplianceSkuName, ok = parsed.Parsed["networkVirtualApplianceSkuName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceSkuName", *parsed) + if id.NetworkVirtualApplianceSkuName, ok = input.Parsed["networkVirtualApplianceSkuName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceSkuName", input) } - return &id, nil + return nil } // ValidateNetworkVirtualApplianceSkuID checks that 'input' can be parsed as a Network Virtual Appliance Sku ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkgatewayconnections/id_connection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkgatewayconnections/id_connection.go index 20cd2e940778..d894548ccde4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkgatewayconnections/id_connection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkgatewayconnections/id_connection.go @@ -36,19 +36,9 @@ func ParseConnectionID(input string) (*ConnectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ConnectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) + if id.ConnectionName, ok = input.Parsed["connectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "connectionName", input) } - return &id, nil + return nil } // ValidateConnectionID checks that 'input' can be parsed as a Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkgateways/id_connection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkgateways/id_connection.go index 0474f12724b4..bdc065e680c4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkgateways/id_connection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkgateways/id_connection.go @@ -36,19 +36,9 @@ func ParseConnectionID(input string) (*ConnectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ConnectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) + if id.ConnectionName, ok = input.Parsed["connectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "connectionName", input) } - return &id, nil + return nil } // ValidateConnectionID checks that 'input' can be parsed as a Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkgateways/id_virtualnetworkgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkgateways/id_virtualnetworkgateway.go index f405ee0a07db..30e96c0b1147 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkgateways/id_virtualnetworkgateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkgateways/id_virtualnetworkgateway.go @@ -36,19 +36,9 @@ func ParseVirtualNetworkGatewayID(input string) (*VirtualNetworkGatewayId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkGatewayName, ok = parsed.Parsed["virtualNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkGatewayName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVirtualNetworkGatewayIDInsensitively(input string) (*VirtualNetworkGat return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkGatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VirtualNetworkGatewayId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualNetworkGatewayName, ok = parsed.Parsed["virtualNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkGatewayName", *parsed) + if id.VirtualNetworkGatewayName, ok = input.Parsed["virtualNetworkGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkGatewayName", input) } - return &id, nil + return nil } // ValidateVirtualNetworkGatewayID checks that 'input' can be parsed as a Virtual Network Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go index 76631d94563c..d261f426c85c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go @@ -38,23 +38,9 @@ func ParseVirtualNetworkGatewayNatRuleID(input string) (*VirtualNetworkGatewayNa return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkGatewayNatRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkGatewayName, ok = parsed.Parsed["virtualNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkGatewayName", *parsed) - } - - if id.NatRuleName, ok = parsed.Parsed["natRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseVirtualNetworkGatewayNatRuleIDInsensitively(input string) (*VirtualNet return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkGatewayNatRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VirtualNetworkGatewayNatRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualNetworkGatewayName, ok = parsed.Parsed["virtualNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkGatewayName", *parsed) + if id.VirtualNetworkGatewayName, ok = input.Parsed["virtualNetworkGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkGatewayName", input) } - if id.NatRuleName, ok = parsed.Parsed["natRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natRuleName", *parsed) + if id.NatRuleName, ok = input.Parsed["natRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "natRuleName", input) } - return &id, nil + return nil } // ValidateVirtualNetworkGatewayNatRuleID checks that 'input' can be parsed as a Virtual Network Gateway Nat Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkpeerings/id_virtualnetworkpeering.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkpeerings/id_virtualnetworkpeering.go index aaaf017cf077..de01f35aeb8b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkpeerings/id_virtualnetworkpeering.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworkpeerings/id_virtualnetworkpeering.go @@ -38,23 +38,9 @@ func ParseVirtualNetworkPeeringID(input string) (*VirtualNetworkPeeringId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkPeeringId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkName, ok = parsed.Parsed["virtualNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkName", *parsed) - } - - if id.VirtualNetworkPeeringName, ok = parsed.Parsed["virtualNetworkPeeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkPeeringName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseVirtualNetworkPeeringIDInsensitively(input string) (*VirtualNetworkPee return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkPeeringId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VirtualNetworkPeeringId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualNetworkName, ok = parsed.Parsed["virtualNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkName", *parsed) + if id.VirtualNetworkName, ok = input.Parsed["virtualNetworkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkName", input) } - if id.VirtualNetworkPeeringName, ok = parsed.Parsed["virtualNetworkPeeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkPeeringName", *parsed) + if id.VirtualNetworkPeeringName, ok = input.Parsed["virtualNetworkPeeringName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkPeeringName", input) } - return &id, nil + return nil } // ValidateVirtualNetworkPeeringID checks that 'input' can be parsed as a Virtual Network Peering ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworktap/id_virtualnetworktap.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworktap/id_virtualnetworktap.go index 7e7e843e4d13..1264701d5152 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworktap/id_virtualnetworktap.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualnetworktap/id_virtualnetworktap.go @@ -36,19 +36,9 @@ func ParseVirtualNetworkTapID(input string) (*VirtualNetworkTapId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkTapId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkTapName, ok = parsed.Parsed["virtualNetworkTapName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkTapName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVirtualNetworkTapIDInsensitively(input string) (*VirtualNetworkTapId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkTapId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VirtualNetworkTapId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualNetworkTapName, ok = parsed.Parsed["virtualNetworkTapName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkTapName", *parsed) + if id.VirtualNetworkTapName, ok = input.Parsed["virtualNetworkTapName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkTapName", input) } - return &id, nil + return nil } // ValidateVirtualNetworkTapID checks that 'input' can be parsed as a Virtual Network Tap ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualrouterpeerings/id_virtualrouter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualrouterpeerings/id_virtualrouter.go index 885ce3a276ad..0cfcf59d1246 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualrouterpeerings/id_virtualrouter.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualrouterpeerings/id_virtualrouter.go @@ -36,19 +36,9 @@ func ParseVirtualRouterID(input string) (*VirtualRouterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualRouterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualRouterName, ok = parsed.Parsed["virtualRouterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualRouterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVirtualRouterIDInsensitively(input string) (*VirtualRouterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualRouterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VirtualRouterId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualRouterName, ok = parsed.Parsed["virtualRouterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualRouterName", *parsed) + if id.VirtualRouterName, ok = input.Parsed["virtualRouterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualRouterName", input) } - return &id, nil + return nil } // ValidateVirtualRouterID checks that 'input' can be parsed as a Virtual Router ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualrouters/id_virtualrouter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualrouters/id_virtualrouter.go index ecb01bd99e59..5832396424bd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualrouters/id_virtualrouter.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualrouters/id_virtualrouter.go @@ -36,19 +36,9 @@ func ParseVirtualRouterID(input string) (*VirtualRouterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualRouterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualRouterName, ok = parsed.Parsed["virtualRouterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualRouterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVirtualRouterIDInsensitively(input string) (*VirtualRouterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualRouterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VirtualRouterId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualRouterName, ok = parsed.Parsed["virtualRouterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualRouterName", *parsed) + if id.VirtualRouterName, ok = input.Parsed["virtualRouterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualRouterName", input) } - return &id, nil + return nil } // ValidateVirtualRouterID checks that 'input' can be parsed as a Virtual Router ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_configurationpolicygroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_configurationpolicygroup.go index d6c7f2eaff87..dff384d30cad 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_configurationpolicygroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_configurationpolicygroup.go @@ -38,23 +38,9 @@ func ParseConfigurationPolicyGroupID(input string) (*ConfigurationPolicyGroupId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationPolicyGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) - } - - if id.ConfigurationPolicyGroupName, ok = parsed.Parsed["configurationPolicyGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationPolicyGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseConfigurationPolicyGroupIDInsensitively(input string) (*ConfigurationP return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationPolicyGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConfigurationPolicyGroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) + if id.VpnServerConfigurationName, ok = input.Parsed["vpnServerConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", input) } - if id.ConfigurationPolicyGroupName, ok = parsed.Parsed["configurationPolicyGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationPolicyGroupName", *parsed) + if id.ConfigurationPolicyGroupName, ok = input.Parsed["configurationPolicyGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "configurationPolicyGroupName", input) } - return &id, nil + return nil } // ValidateConfigurationPolicyGroupID checks that 'input' can be parsed as a Configuration Policy Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_hubroutetable.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_hubroutetable.go index 0297471a681d..72310881bba3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_hubroutetable.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_hubroutetable.go @@ -38,23 +38,9 @@ func ParseHubRouteTableID(input string) (*HubRouteTableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HubRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.HubRouteTableName, ok = parsed.Parsed["hubRouteTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hubRouteTableName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseHubRouteTableIDInsensitively(input string) (*HubRouteTableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HubRouteTableId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *HubRouteTableId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) + if id.VirtualHubName, ok = input.Parsed["virtualHubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", input) } - if id.HubRouteTableName, ok = parsed.Parsed["hubRouteTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hubRouteTableName", *parsed) + if id.HubRouteTableName, ok = input.Parsed["hubRouteTableName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hubRouteTableName", input) } - return &id, nil + return nil } // ValidateHubRouteTableID checks that 'input' can be parsed as a Hub Route Table ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_hubvirtualnetworkconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_hubvirtualnetworkconnection.go index e5bc46da4b4c..116cf5cd477f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_hubvirtualnetworkconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_hubvirtualnetworkconnection.go @@ -38,23 +38,9 @@ func ParseHubVirtualNetworkConnectionID(input string) (*HubVirtualNetworkConnect return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HubVirtualNetworkConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.HubVirtualNetworkConnectionName, ok = parsed.Parsed["hubVirtualNetworkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hubVirtualNetworkConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseHubVirtualNetworkConnectionIDInsensitively(input string) (*HubVirtualN return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HubVirtualNetworkConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *HubVirtualNetworkConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) + if id.VirtualHubName, ok = input.Parsed["virtualHubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", input) } - if id.HubVirtualNetworkConnectionName, ok = parsed.Parsed["hubVirtualNetworkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hubVirtualNetworkConnectionName", *parsed) + if id.HubVirtualNetworkConnectionName, ok = input.Parsed["hubVirtualNetworkConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hubVirtualNetworkConnectionName", input) } - return &id, nil + return nil } // ValidateHubVirtualNetworkConnectionID checks that 'input' can be parsed as a Hub Virtual Network Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_natrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_natrule.go index 2563c42130db..93cab37e7c61 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_natrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_natrule.go @@ -38,23 +38,9 @@ func ParseNatRuleID(input string) (*NatRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NatRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - if id.NatRuleName, ok = parsed.Parsed["natRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseNatRuleIDInsensitively(input string) (*NatRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NatRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *NatRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) + if id.VpnGatewayName, ok = input.Parsed["vpnGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", input) } - if id.NatRuleName, ok = parsed.Parsed["natRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natRuleName", *parsed) + if id.NatRuleName, ok = input.Parsed["natRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "natRuleName", input) } - return &id, nil + return nil } // ValidateNatRuleID checks that 'input' can be parsed as a Nat Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_networkvirtualappliance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_networkvirtualappliance.go index 4f44479d9b90..a0e0ef317967 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_networkvirtualappliance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_networkvirtualappliance.go @@ -36,19 +36,9 @@ func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, e return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkVirtualApplianceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualA return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkVirtualApplianceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NetworkVirtualApplianceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) + if id.NetworkVirtualApplianceName, ok = input.Parsed["networkVirtualApplianceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", input) } - return &id, nil + return nil } // ValidateNetworkVirtualApplianceID checks that 'input' can be parsed as a Network Virtual Appliance ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_networkvirtualapplianceconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_networkvirtualapplianceconnection.go index 13800d99e633..de54637c1bc0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_networkvirtualapplianceconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_networkvirtualapplianceconnection.go @@ -38,23 +38,9 @@ func ParseNetworkVirtualApplianceConnectionID(input string) (*NetworkVirtualAppl return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkVirtualApplianceConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - if id.NetworkVirtualApplianceConnectionName, ok = parsed.Parsed["networkVirtualApplianceConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseNetworkVirtualApplianceConnectionIDInsensitively(input string) (*Netwo return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NetworkVirtualApplianceConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *NetworkVirtualApplianceConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) + if id.NetworkVirtualApplianceName, ok = input.Parsed["networkVirtualApplianceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", input) } - if id.NetworkVirtualApplianceConnectionName, ok = parsed.Parsed["networkVirtualApplianceConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceConnectionName", *parsed) + if id.NetworkVirtualApplianceConnectionName, ok = input.Parsed["networkVirtualApplianceConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceConnectionName", input) } - return &id, nil + return nil } // ValidateNetworkVirtualApplianceConnectionID checks that 'input' can be parsed as a Network Virtual Appliance Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_routemap.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_routemap.go index a7eb1850cb88..ff3a75a5126a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_routemap.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_routemap.go @@ -38,23 +38,9 @@ func ParseRouteMapID(input string) (*RouteMapId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteMapId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.RouteMapName, ok = parsed.Parsed["routeMapName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeMapName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRouteMapIDInsensitively(input string) (*RouteMapId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RouteMapId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RouteMapId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) + if id.VirtualHubName, ok = input.Parsed["virtualHubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", input) } - if id.RouteMapName, ok = parsed.Parsed["routeMapName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeMapName", *parsed) + if id.RouteMapName, ok = input.Parsed["routeMapName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "routeMapName", input) } - return &id, nil + return nil } // ValidateRouteMapID checks that 'input' can be parsed as a Route Map ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_routingintent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_routingintent.go index 9a8b1a5cc316..dbc58606baea 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_routingintent.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_routingintent.go @@ -38,23 +38,9 @@ func ParseRoutingIntentID(input string) (*RoutingIntentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RoutingIntentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.RoutingIntentName, ok = parsed.Parsed["routingIntentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routingIntentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRoutingIntentIDInsensitively(input string) (*RoutingIntentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RoutingIntentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RoutingIntentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) + if id.VirtualHubName, ok = input.Parsed["virtualHubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", input) } - if id.RoutingIntentName, ok = parsed.Parsed["routingIntentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routingIntentName", *parsed) + if id.RoutingIntentName, ok = input.Parsed["routingIntentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "routingIntentName", input) } - return &id, nil + return nil } // ValidateRoutingIntentID checks that 'input' can be parsed as a Routing Intent ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_virtualhub.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_virtualhub.go index 3f42afd7fc55..7b6723ff9e31 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_virtualhub.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_virtualhub.go @@ -36,19 +36,9 @@ func ParseVirtualHubID(input string) (*VirtualHubId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualHubId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVirtualHubIDInsensitively(input string) (*VirtualHubId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualHubId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VirtualHubId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) + if id.VirtualHubName, ok = input.Parsed["virtualHubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", input) } - return &id, nil + return nil } // ValidateVirtualHubID checks that 'input' can be parsed as a Virtual Hub ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_virtualhubroutetable.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_virtualhubroutetable.go index ccb706e1460d..c62be8a98a81 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_virtualhubroutetable.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_virtualhubroutetable.go @@ -38,23 +38,9 @@ func ParseVirtualHubRouteTableID(input string) (*VirtualHubRouteTableId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualHubRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseVirtualHubRouteTableIDInsensitively(input string) (*VirtualHubRouteTab return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualHubRouteTableId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VirtualHubRouteTableId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) + if id.VirtualHubName, ok = input.Parsed["virtualHubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", input) } - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) + if id.RouteTableName, ok = input.Parsed["routeTableName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", input) } - return &id, nil + return nil } // ValidateVirtualHubRouteTableID checks that 'input' can be parsed as a Virtual Hub Route Table ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_virtualwan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_virtualwan.go index 590264a9ee13..db457c86102b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_virtualwan.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_virtualwan.go @@ -36,19 +36,9 @@ func ParseVirtualWANID(input string) (*VirtualWANId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualWANId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualWanName, ok = parsed.Parsed["virtualWanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualWanName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVirtualWANIDInsensitively(input string) (*VirtualWANId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualWANId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VirtualWANId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualWanName, ok = parsed.Parsed["virtualWanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualWanName", *parsed) + if id.VirtualWanName, ok = input.Parsed["virtualWanName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualWanName", input) } - return &id, nil + return nil } // ValidateVirtualWANID checks that 'input' can be parsed as a Virtual W A N ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpngateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpngateway.go index a438d896289c..cf7683ac9e36 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpngateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpngateway.go @@ -36,19 +36,9 @@ func ParseVpnGatewayID(input string) (*VpnGatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVpnGatewayIDInsensitively(input string) (*VpnGatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnGatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VpnGatewayId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) + if id.VpnGatewayName, ok = input.Parsed["vpnGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", input) } - return &id, nil + return nil } // ValidateVpnGatewayID checks that 'input' can be parsed as a Vpn Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpnlinkconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpnlinkconnection.go index f8c398dc7ace..dfeff21ccfc9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpnlinkconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpnlinkconnection.go @@ -40,27 +40,9 @@ func ParseVpnLinkConnectionID(input string) (*VpnLinkConnectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnLinkConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - if id.VpnConnectionName, ok = parsed.Parsed["vpnConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnConnectionName", *parsed) - } - - if id.VpnLinkConnectionName, ok = parsed.Parsed["vpnLinkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnLinkConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseVpnLinkConnectionIDInsensitively(input string) (*VpnLinkConnectionId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnLinkConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *VpnLinkConnectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) + if id.VpnGatewayName, ok = input.Parsed["vpnGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", input) } - if id.VpnConnectionName, ok = parsed.Parsed["vpnConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnConnectionName", *parsed) + if id.VpnConnectionName, ok = input.Parsed["vpnConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vpnConnectionName", input) } - if id.VpnLinkConnectionName, ok = parsed.Parsed["vpnLinkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnLinkConnectionName", *parsed) + if id.VpnLinkConnectionName, ok = input.Parsed["vpnLinkConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vpnLinkConnectionName", input) } - return &id, nil + return nil } // ValidateVpnLinkConnectionID checks that 'input' can be parsed as a Vpn Link Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpnserverconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpnserverconfiguration.go index 194ee0e58a31..9bd021609200 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpnserverconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpnserverconfiguration.go @@ -36,19 +36,9 @@ func ParseVpnServerConfigurationID(input string) (*VpnServerConfigurationId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnServerConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVpnServerConfigurationIDInsensitively(input string) (*VpnServerConfigu return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnServerConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VpnServerConfigurationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) + if id.VpnServerConfigurationName, ok = input.Parsed["vpnServerConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", input) } - return &id, nil + return nil } // ValidateVpnServerConfigurationID checks that 'input' can be parsed as a Vpn Server Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpnsite.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpnsite.go index d32b6f6dba41..4c1e5f7deecf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpnsite.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpnsite.go @@ -36,19 +36,9 @@ func ParseVpnSiteID(input string) (*VpnSiteId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnSiteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVpnSiteIDInsensitively(input string) (*VpnSiteId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnSiteId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VpnSiteId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) + if id.VpnSiteName, ok = input.Parsed["vpnSiteName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", input) } - return &id, nil + return nil } // ValidateVpnSiteID checks that 'input' can be parsed as a Vpn Site ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpnsitelink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpnsitelink.go index e43deb2be926..aebb2d3d5d66 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpnsitelink.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/virtualwans/id_vpnsitelink.go @@ -38,23 +38,9 @@ func ParseVpnSiteLinkID(input string) (*VpnSiteLinkId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnSiteLinkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) - } - - if id.VpnSiteLinkName, ok = parsed.Parsed["vpnSiteLinkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteLinkName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseVpnSiteLinkIDInsensitively(input string) (*VpnSiteLinkId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnSiteLinkId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VpnSiteLinkId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) + if id.VpnSiteName, ok = input.Parsed["vpnSiteName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", input) } - if id.VpnSiteLinkName, ok = parsed.Parsed["vpnSiteLinkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteLinkName", *parsed) + if id.VpnSiteLinkName, ok = input.Parsed["vpnSiteLinkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteLinkName", input) } - return &id, nil + return nil } // ValidateVpnSiteLinkID checks that 'input' can be parsed as a Vpn Site Link ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vmsspublicipaddresses/id_virtualmachinescaleset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vmsspublicipaddresses/id_virtualmachinescaleset.go index b798e513d2e1..7f2795675f63 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vmsspublicipaddresses/id_virtualmachinescaleset.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vmsspublicipaddresses/id_virtualmachinescaleset.go @@ -36,19 +36,9 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualMachineScaleSetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualMachineScaleSetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VirtualMachineScaleSetId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) + if id.VirtualMachineScaleSetName, ok = input.Parsed["virtualMachineScaleSetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", input) } - return &id, nil + return nil } // ValidateVirtualMachineScaleSetID checks that 'input' can be parsed as a Virtual Machine Scale Set ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vpngateways/id_vpngateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vpngateways/id_vpngateway.go index 5e23e288887f..bf76c30c5dac 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vpngateways/id_vpngateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vpngateways/id_vpngateway.go @@ -36,19 +36,9 @@ func ParseVpnGatewayID(input string) (*VpnGatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVpnGatewayIDInsensitively(input string) (*VpnGatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnGatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VpnGatewayId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) + if id.VpnGatewayName, ok = input.Parsed["vpnGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", input) } - return &id, nil + return nil } // ValidateVpnGatewayID checks that 'input' can be parsed as a Vpn Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vpnlinkconnections/id_vpnlinkconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vpnlinkconnections/id_vpnlinkconnection.go index 1fc8b77b7e9d..b5191696d312 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vpnlinkconnections/id_vpnlinkconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vpnlinkconnections/id_vpnlinkconnection.go @@ -40,27 +40,9 @@ func ParseVpnLinkConnectionID(input string) (*VpnLinkConnectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnLinkConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - if id.VpnConnectionName, ok = parsed.Parsed["vpnConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnConnectionName", *parsed) - } - - if id.VpnLinkConnectionName, ok = parsed.Parsed["vpnLinkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnLinkConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseVpnLinkConnectionIDInsensitively(input string) (*VpnLinkConnectionId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnLinkConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *VpnLinkConnectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) + if id.VpnGatewayName, ok = input.Parsed["vpnGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", input) } - if id.VpnConnectionName, ok = parsed.Parsed["vpnConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnConnectionName", *parsed) + if id.VpnConnectionName, ok = input.Parsed["vpnConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vpnConnectionName", input) } - if id.VpnLinkConnectionName, ok = parsed.Parsed["vpnLinkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnLinkConnectionName", *parsed) + if id.VpnLinkConnectionName, ok = input.Parsed["vpnLinkConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vpnLinkConnectionName", input) } - return &id, nil + return nil } // ValidateVpnLinkConnectionID checks that 'input' can be parsed as a Vpn Link Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vpnserverconfigurations/id_vpnserverconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vpnserverconfigurations/id_vpnserverconfiguration.go index 688f2431145b..3371906376ce 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vpnserverconfigurations/id_vpnserverconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vpnserverconfigurations/id_vpnserverconfiguration.go @@ -36,19 +36,9 @@ func ParseVpnServerConfigurationID(input string) (*VpnServerConfigurationId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnServerConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVpnServerConfigurationIDInsensitively(input string) (*VpnServerConfigu return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnServerConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VpnServerConfigurationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) + if id.VpnServerConfigurationName, ok = input.Parsed["vpnServerConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", input) } - return &id, nil + return nil } // ValidateVpnServerConfigurationID checks that 'input' can be parsed as a Vpn Server Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vpnsites/id_vpnsite.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vpnsites/id_vpnsite.go index 01be85624d79..4266864fca0b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vpnsites/id_vpnsite.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/vpnsites/id_vpnsite.go @@ -36,19 +36,9 @@ func ParseVpnSiteID(input string) (*VpnSiteId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnSiteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVpnSiteIDInsensitively(input string) (*VpnSiteId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VpnSiteId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VpnSiteId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) + if id.VpnSiteName, ok = input.Parsed["vpnSiteName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", input) } - return &id, nil + return nil } // ValidateVpnSiteID checks that 'input' can be parsed as a Vpn Site ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go index d15af832185d..d06b36f88671 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go @@ -36,19 +36,9 @@ func ParseApplicationGatewayWebApplicationFirewallPolicyID(input string) (*Appli return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGatewayWebApplicationFirewallPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayWebApplicationFirewallPolicyName, ok = parsed.Parsed["applicationGatewayWebApplicationFirewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayWebApplicationFirewallPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseApplicationGatewayWebApplicationFirewallPolicyIDInsensitively(input st return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplicationGatewayWebApplicationFirewallPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ApplicationGatewayWebApplicationFirewallPolicyId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ApplicationGatewayWebApplicationFirewallPolicyName, ok = parsed.Parsed["applicationGatewayWebApplicationFirewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayWebApplicationFirewallPolicyName", *parsed) + if id.ApplicationGatewayWebApplicationFirewallPolicyName, ok = input.Parsed["applicationGatewayWebApplicationFirewallPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayWebApplicationFirewallPolicyName", input) } - return &id, nil + return nil } // ValidateApplicationGatewayWebApplicationFirewallPolicyID checks that 'input' can be parsed as a Application Gateway Web Application Firewall Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/webcategories/id_azurewebcategory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/webcategories/id_azurewebcategory.go index 05fb4633638b..acb30d2a8fad 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/webcategories/id_azurewebcategory.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-06-01/webcategories/id_azurewebcategory.go @@ -34,15 +34,9 @@ func ParseAzureWebCategoryID(input string) (*AzureWebCategoryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AzureWebCategoryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.AzureWebCategoryName, ok = parsed.Parsed["azureWebCategoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureWebCategoryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseAzureWebCategoryIDInsensitively(input string) (*AzureWebCategoryId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AzureWebCategoryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *AzureWebCategoryId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.AzureWebCategoryName, ok = parsed.Parsed["azureWebCategoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureWebCategoryName", *parsed) + if id.AzureWebCategoryName, ok = input.Parsed["azureWebCategoryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "azureWebCategoryName", input) } - return &id, nil + return nil } // ValidateAzureWebCategoryID checks that 'input' can be parsed as a Azure Web Category ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/id_azuretrafficcollector.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/id_azuretrafficcollector.go index 3d0cf730c133..37daf654765b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/id_azuretrafficcollector.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/id_azuretrafficcollector.go @@ -36,19 +36,9 @@ func ParseAzureTrafficCollectorID(input string) (*AzureTrafficCollectorId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AzureTrafficCollectorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AzureTrafficCollectorName, ok = parsed.Parsed["azureTrafficCollectorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureTrafficCollectorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAzureTrafficCollectorIDInsensitively(input string) (*AzureTrafficColle return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AzureTrafficCollectorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AzureTrafficCollectorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AzureTrafficCollectorName, ok = parsed.Parsed["azureTrafficCollectorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureTrafficCollectorName", *parsed) + if id.AzureTrafficCollectorName, ok = input.Parsed["azureTrafficCollectorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "azureTrafficCollectorName", input) } - return &id, nil + return nil } // ValidateAzureTrafficCollectorID checks that 'input' can be parsed as a Azure Traffic Collector ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/collectorpolicies/id_azuretrafficcollector.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/collectorpolicies/id_azuretrafficcollector.go index 7626d2634cf8..6079f72dd08a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/collectorpolicies/id_azuretrafficcollector.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/collectorpolicies/id_azuretrafficcollector.go @@ -36,19 +36,9 @@ func ParseAzureTrafficCollectorID(input string) (*AzureTrafficCollectorId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AzureTrafficCollectorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AzureTrafficCollectorName, ok = parsed.Parsed["azureTrafficCollectorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureTrafficCollectorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAzureTrafficCollectorIDInsensitively(input string) (*AzureTrafficColle return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AzureTrafficCollectorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AzureTrafficCollectorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AzureTrafficCollectorName, ok = parsed.Parsed["azureTrafficCollectorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureTrafficCollectorName", *parsed) + if id.AzureTrafficCollectorName, ok = input.Parsed["azureTrafficCollectorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "azureTrafficCollectorName", input) } - return &id, nil + return nil } // ValidateAzureTrafficCollectorID checks that 'input' can be parsed as a Azure Traffic Collector ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/collectorpolicies/id_collectorpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/collectorpolicies/id_collectorpolicy.go index b70be0df5708..59971b30a966 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/collectorpolicies/id_collectorpolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/collectorpolicies/id_collectorpolicy.go @@ -38,23 +38,9 @@ func ParseCollectorPolicyID(input string) (*CollectorPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CollectorPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AzureTrafficCollectorName, ok = parsed.Parsed["azureTrafficCollectorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureTrafficCollectorName", *parsed) - } - - if id.CollectorPolicyName, ok = parsed.Parsed["collectorPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectorPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCollectorPolicyIDInsensitively(input string) (*CollectorPolicyId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CollectorPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CollectorPolicyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AzureTrafficCollectorName, ok = parsed.Parsed["azureTrafficCollectorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureTrafficCollectorName", *parsed) + if id.AzureTrafficCollectorName, ok = input.Parsed["azureTrafficCollectorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "azureTrafficCollectorName", input) } - if id.CollectorPolicyName, ok = parsed.Parsed["collectorPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "collectorPolicyName", *parsed) + if id.CollectorPolicyName, ok = input.Parsed["collectorPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "collectorPolicyName", input) } - return &id, nil + return nil } // ValidateCollectorPolicyID checks that 'input' can be parsed as a Collector Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/monitors/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/monitors/id_monitor.go index 1b178c41cd0b..f66509a175b0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/monitors/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/monitors/id_monitor.go @@ -36,19 +36,9 @@ func ParseMonitorID(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MonitorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - return &id, nil + return nil } // ValidateMonitorID checks that 'input' can be parsed as a Monitor ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/tagrules/id_monitor.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/tagrules/id_monitor.go index 91def2f39e15..865b538a9e9b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/tagrules/id_monitor.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/tagrules/id_monitor.go @@ -36,19 +36,9 @@ func ParseMonitorID(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MonitorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *MonitorId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - return &id, nil + return nil } // ValidateMonitorID checks that 'input' can be parsed as a Monitor ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/tagrules/id_tagrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/tagrules/id_tagrule.go index 0f89ab5c649b..98785f2e11fd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/tagrules/id_tagrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/tagrules/id_tagrule.go @@ -38,23 +38,9 @@ func ParseTagRuleID(input string) (*TagRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TagRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) - } - - if id.TagRuleName, ok = parsed.Parsed["tagRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTagRuleIDInsensitively(input string) (*TagRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TagRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TagRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.MonitorName, ok = parsed.Parsed["monitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "monitorName", *parsed) + if id.MonitorName, ok = input.Parsed["monitorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "monitorName", input) } - if id.TagRuleName, ok = parsed.Parsed["tagRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tagRuleName", *parsed) + if id.TagRuleName, ok = input.Parsed["tagRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "tagRuleName", input) } - return &id, nil + return nil } // ValidateTagRuleID checks that 'input' can be parsed as a Tag Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/id_certificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/id_certificate.go index 4d6f53b5b26e..fedae0413dfc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/id_certificate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/id_certificate.go @@ -38,23 +38,9 @@ func ParseCertificateID(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) - } - - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CertificateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + if id.NginxDeploymentName, ok = input.Parsed["nginxDeploymentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", input) } - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if id.CertificateName, ok = input.Parsed["certificateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "certificateName", input) } - return &id, nil + return nil } // ValidateCertificateID checks that 'input' can be parsed as a Certificate ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/id_nginxdeployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/id_nginxdeployment.go index ad8f96db4898..98ca5db8fa94 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/id_nginxdeployment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/id_nginxdeployment.go @@ -36,19 +36,9 @@ func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NginxDeploymentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NginxDeploymentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NginxDeploymentId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + if id.NginxDeploymentName, ok = input.Parsed["nginxDeploymentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", input) } - return &id, nil + return nil } // ValidateNginxDeploymentID checks that 'input' can be parsed as a Nginx Deployment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/id_configuration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/id_configuration.go index 7a3131a1eaf4..ac4c2d0cbdb7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/id_configuration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/id_configuration.go @@ -38,23 +38,9 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) - } - - if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + if id.NginxDeploymentName, ok = input.Parsed["nginxDeploymentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", input) } - if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + if id.ConfigurationName, ok = input.Parsed["configurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "configurationName", input) } - return &id, nil + return nil } // ValidateConfigurationID checks that 'input' can be parsed as a Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/id_nginxdeployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/id_nginxdeployment.go index ab125d9e6cae..dc4f36405085 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/id_nginxdeployment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/id_nginxdeployment.go @@ -36,19 +36,9 @@ func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NginxDeploymentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NginxDeploymentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NginxDeploymentId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + if id.NginxDeploymentName, ok = input.Parsed["nginxDeploymentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", input) } - return &id, nil + return nil } // ValidateNginxDeploymentID checks that 'input' can be parsed as a Nginx Deployment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/id_nginxdeployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/id_nginxdeployment.go index bd5eb587fac5..159775a4f8ca 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/id_nginxdeployment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/id_nginxdeployment.go @@ -36,19 +36,9 @@ func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NginxDeploymentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NginxDeploymentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NginxDeploymentId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + if id.NginxDeploymentName, ok = input.Parsed["nginxDeploymentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", input) } - return &id, nil + return nil } // ValidateNginxDeploymentID checks that 'input' can be parsed as a Nginx Deployment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/id_authorizationrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/id_authorizationrule.go index 521d93c802ca..f2ee82f7d2d5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/id_authorizationrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/id_authorizationrule.go @@ -38,23 +38,9 @@ func ParseAuthorizationRuleID(input string) (*AuthorizationRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AuthorizationRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAuthorizationRuleIDInsensitively(input string) (*AuthorizationRuleId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AuthorizationRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AuthorizationRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if id.AuthorizationRuleName, ok = input.Parsed["authorizationRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", input) } - return &id, nil + return nil } // ValidateAuthorizationRuleID checks that 'input' can be parsed as a Authorization Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/id_namespace.go index 1eddd491afa3..b3824b1b3090 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/id_namespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces/id_namespace.go @@ -36,19 +36,9 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - return &id, nil + return nil } // ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_namespace.go index 28ee36959590..cf50e60f7844 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_namespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_namespace.go @@ -36,19 +36,9 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - return &id, nil + return nil } // ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_notificationhub.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_notificationhub.go index 1204bec2b635..f3744b63071f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_notificationhub.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_notificationhub.go @@ -38,23 +38,9 @@ func ParseNotificationHubID(input string) (*NotificationHubId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NotificationHubId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.NotificationHubName, ok = parsed.Parsed["notificationHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "notificationHubName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseNotificationHubIDInsensitively(input string) (*NotificationHubId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NotificationHubId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *NotificationHubId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.NotificationHubName, ok = parsed.Parsed["notificationHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "notificationHubName", *parsed) + if id.NotificationHubName, ok = input.Parsed["notificationHubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "notificationHubName", input) } - return &id, nil + return nil } // ValidateNotificationHubID checks that 'input' can be parsed as a Notification Hub ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_notificationhubauthorizationrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_notificationhubauthorizationrule.go index 97ee7b6b3bac..ca7d31d6d915 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_notificationhubauthorizationrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_notificationhubauthorizationrule.go @@ -40,27 +40,9 @@ func ParseNotificationHubAuthorizationRuleID(input string) (*NotificationHubAuth return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NotificationHubAuthorizationRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.NotificationHubName, ok = parsed.Parsed["notificationHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "notificationHubName", *parsed) - } - - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseNotificationHubAuthorizationRuleIDInsensitively(input string) (*Notifi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NotificationHubAuthorizationRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *NotificationHubAuthorizationRuleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.NotificationHubName, ok = parsed.Parsed["notificationHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "notificationHubName", *parsed) + if id.NotificationHubName, ok = input.Parsed["notificationHubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "notificationHubName", input) } - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if id.AuthorizationRuleName, ok = input.Parsed["authorizationRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", input) } - return &id, nil + return nil } // ValidateNotificationHubAuthorizationRuleID checks that 'input' can be parsed as a Notification Hub Authorization Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypackqueries/id_query.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypackqueries/id_query.go index 053747e6db04..d729b8f7aa48 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypackqueries/id_query.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypackqueries/id_query.go @@ -38,23 +38,9 @@ func ParseQueryID(input string) (*QueryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := QueryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.QueryPackName, ok = parsed.Parsed["queryPackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "queryPackName", *parsed) - } - - if id.QueryName, ok = parsed.Parsed["queryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "queryName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseQueryIDInsensitively(input string) (*QueryId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := QueryId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *QueryId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.QueryPackName, ok = parsed.Parsed["queryPackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "queryPackName", *parsed) + if id.QueryPackName, ok = input.Parsed["queryPackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "queryPackName", input) } - if id.QueryName, ok = parsed.Parsed["queryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "queryName", *parsed) + if id.QueryName, ok = input.Parsed["queryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "queryName", input) } - return &id, nil + return nil } // ValidateQueryID checks that 'input' can be parsed as a Query ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypackqueries/id_querypack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypackqueries/id_querypack.go index 7763d8f50943..2d7b4e9bfd84 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypackqueries/id_querypack.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypackqueries/id_querypack.go @@ -36,19 +36,9 @@ func ParseQueryPackID(input string) (*QueryPackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := QueryPackId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.QueryPackName, ok = parsed.Parsed["queryPackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "queryPackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseQueryPackIDInsensitively(input string) (*QueryPackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := QueryPackId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *QueryPackId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.QueryPackName, ok = parsed.Parsed["queryPackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "queryPackName", *parsed) + if id.QueryPackName, ok = input.Parsed["queryPackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "queryPackName", input) } - return &id, nil + return nil } // ValidateQueryPackID checks that 'input' can be parsed as a Query Pack ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypacks/id_querypack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypacks/id_querypack.go index ef50ff29b40d..287dd7ae875f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypacks/id_querypack.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypacks/id_querypack.go @@ -36,19 +36,9 @@ func ParseQueryPackID(input string) (*QueryPackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := QueryPackId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.QueryPackName, ok = parsed.Parsed["queryPackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "queryPackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseQueryPackIDInsensitively(input string) (*QueryPackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := QueryPackId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *QueryPackId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.QueryPackName, ok = parsed.Parsed["queryPackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "queryPackName", *parsed) + if id.QueryPackName, ok = input.Parsed["queryPackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "queryPackName", input) } - return &id, nil + return nil } // ValidateQueryPackID checks that 'input' can be parsed as a Query Pack ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/clusters/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/clusters/id_cluster.go index c1ac2c07ed13..d87cbd6e769f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/clusters/id_cluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/clusters/id_cluster.go @@ -36,19 +36,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/dataexport/id_dataexport.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/dataexport/id_dataexport.go index 7d26a6a6fa33..4100d83f16f9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/dataexport/id_dataexport.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/dataexport/id_dataexport.go @@ -38,23 +38,9 @@ func ParseDataExportID(input string) (*DataExportId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataExportId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.DataExportName, ok = parsed.Parsed["dataExportName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataExportName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDataExportIDInsensitively(input string) (*DataExportId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataExportId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DataExportId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.DataExportName, ok = parsed.Parsed["dataExportName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataExportName", *parsed) + if id.DataExportName, ok = input.Parsed["dataExportName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dataExportName", input) } - return &id, nil + return nil } // ValidateDataExportID checks that 'input' can be parsed as a Data Export ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/dataexport/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/dataexport/id_workspace.go index cec9837159c9..9ad90d675184 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/dataexport/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/dataexport/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/datasources/id_datasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/datasources/id_datasource.go index e8ec25bcd232..ea05d4c1663a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/datasources/id_datasource.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/datasources/id_datasource.go @@ -38,23 +38,9 @@ func ParseDataSourceID(input string) (*DataSourceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataSourceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.DataSourceName, ok = parsed.Parsed["dataSourceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataSourceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDataSourceIDInsensitively(input string) (*DataSourceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataSourceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DataSourceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.DataSourceName, ok = parsed.Parsed["dataSourceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataSourceName", *parsed) + if id.DataSourceName, ok = input.Parsed["dataSourceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dataSourceName", input) } - return &id, nil + return nil } // ValidateDataSourceID checks that 'input' can be parsed as a Data Source ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/datasources/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/datasources/id_workspace.go index 2a37fcd6fe29..4c7ecbd55b33 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/datasources/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/datasources/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedservices/id_linkedservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedservices/id_linkedservice.go index da344f5ca422..dda349a66607 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedservices/id_linkedservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedservices/id_linkedservice.go @@ -38,23 +38,9 @@ func ParseLinkedServiceID(input string) (*LinkedServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LinkedServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.LinkedServiceName, ok = parsed.Parsed["linkedServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "linkedServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLinkedServiceIDInsensitively(input string) (*LinkedServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LinkedServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LinkedServiceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.LinkedServiceName, ok = parsed.Parsed["linkedServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "linkedServiceName", *parsed) + if id.LinkedServiceName, ok = input.Parsed["linkedServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "linkedServiceName", input) } - return &id, nil + return nil } // ValidateLinkedServiceID checks that 'input' can be parsed as a Linked Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedservices/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedservices/id_workspace.go index 3762a7ba8f5e..5c55053c3a31 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedservices/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedservices/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/id_datasourcetype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/id_datasourcetype.go index 1bd4a05c633a..a231c9e1bf32 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/id_datasourcetype.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/id_datasourcetype.go @@ -38,31 +38,9 @@ func ParseDataSourceTypeID(input string) (*DataSourceTypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataSourceTypeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if v, ok := parsed.Parsed["dataSourceType"]; true { - if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataSourceType", *parsed) - } - - dataSourceType, err := parseDataSourceType(v) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) - } - id.DataSourceType = *dataSourceType + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -77,34 +55,42 @@ func ParseDataSourceTypeIDInsensitively(input string) (*DataSourceTypeId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataSourceTypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *DataSourceTypeId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if v, ok := parsed.Parsed["dataSourceType"]; true { + if v, ok := input.Parsed["dataSourceType"]; true { if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataSourceType", *parsed) + return resourceids.NewSegmentNotSpecifiedError(id, "dataSourceType", input) } dataSourceType, err := parseDataSourceType(v) if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) + return fmt.Errorf("parsing %q: %+v", v, err) } id.DataSourceType = *dataSourceType } - return &id, nil + return nil } // ValidateDataSourceTypeID checks that 'input' can be parsed as a Data Source Type ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/id_workspace.go index 06b07396b158..bb97dbb2bdad 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/savedsearches/id_savedsearch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/savedsearches/id_savedsearch.go index 2b4c59de1e53..9abbca51a60f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/savedsearches/id_savedsearch.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/savedsearches/id_savedsearch.go @@ -38,23 +38,9 @@ func ParseSavedSearchID(input string) (*SavedSearchId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SavedSearchId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.SavedSearchId, ok = parsed.Parsed["savedSearchId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "savedSearchId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSavedSearchIDInsensitively(input string) (*SavedSearchId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SavedSearchId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SavedSearchId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.SavedSearchId, ok = parsed.Parsed["savedSearchId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "savedSearchId", *parsed) + if id.SavedSearchId, ok = input.Parsed["savedSearchId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "savedSearchId", input) } - return &id, nil + return nil } // ValidateSavedSearchID checks that 'input' can be parsed as a Saved Search ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/savedsearches/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/savedsearches/id_workspace.go index 94ac6d69ecac..940760cbc7f8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/savedsearches/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/savedsearches/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/storageinsights/id_storageinsightconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/storageinsights/id_storageinsightconfig.go index 495e236211b0..68f7df9b8865 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/storageinsights/id_storageinsightconfig.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/storageinsights/id_storageinsightconfig.go @@ -38,23 +38,9 @@ func ParseStorageInsightConfigID(input string) (*StorageInsightConfigId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageInsightConfigId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.StorageInsightConfigName, ok = parsed.Parsed["storageInsightConfigName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageInsightConfigName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseStorageInsightConfigIDInsensitively(input string) (*StorageInsightConf return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageInsightConfigId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *StorageInsightConfigId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.StorageInsightConfigName, ok = parsed.Parsed["storageInsightConfigName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageInsightConfigName", *parsed) + if id.StorageInsightConfigName, ok = input.Parsed["storageInsightConfigName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageInsightConfigName", input) } - return &id, nil + return nil } // ValidateStorageInsightConfigID checks that 'input' can be parsed as a Storage Insight Config ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/storageinsights/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/storageinsights/id_workspace.go index bbbd6239380a..6bb83125763e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/storageinsights/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/storageinsights/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces/id_gateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces/id_gateway.go index 527fb24cf2df..a59c574ed57e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces/id_gateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces/id_gateway.go @@ -38,23 +38,9 @@ func ParseGatewayID(input string) (*GatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.GatewayId, ok = parsed.Parsed["gatewayId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *GatewayId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.GatewayId, ok = parsed.Parsed["gatewayId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", *parsed) + if id.GatewayId, ok = input.Parsed["gatewayId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "gatewayId", input) } - return &id, nil + return nil } // ValidateGatewayID checks that 'input' can be parsed as a Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces/id_intelligencepack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces/id_intelligencepack.go index 102fc88c7a14..d8839c8d39ba 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces/id_intelligencepack.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces/id_intelligencepack.go @@ -38,23 +38,9 @@ func ParseIntelligencePackID(input string) (*IntelligencePackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntelligencePackId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.IntelligencePackName, ok = parsed.Parsed["intelligencePackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "intelligencePackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseIntelligencePackIDInsensitively(input string) (*IntelligencePackId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IntelligencePackId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *IntelligencePackId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.IntelligencePackName, ok = parsed.Parsed["intelligencePackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "intelligencePackName", *parsed) + if id.IntelligencePackName, ok = input.Parsed["intelligencePackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "intelligencePackName", input) } - return &id, nil + return nil } // ValidateIntelligencePackID checks that 'input' can be parsed as a Intelligence Pack ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces/id_operation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces/id_operation.go index bb10ceb91c9c..11e6f0ee6e36 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces/id_operation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces/id_operation.go @@ -38,23 +38,9 @@ func ParseOperationID(input string) (*OperationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OperationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.PurgeId, ok = parsed.Parsed["purgeId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "purgeId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OperationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *OperationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.PurgeId, ok = parsed.Parsed["purgeId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "purgeId", *parsed) + if id.PurgeId, ok = input.Parsed["purgeId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "purgeId", input) } - return &id, nil + return nil } // ValidateOperationID checks that 'input' can be parsed as a Operation ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces/id_workspace.go index 9836aaf5b26c..005b06a756dc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2022-10-01/workspaces/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2022-10-01/workspaces/id_workspace.go index 9836aaf5b26c..005b06a756dc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2022-10-01/workspaces/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2022-10-01/workspaces/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationsmanagement/2015-11-01-preview/solution/id_solution.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationsmanagement/2015-11-01-preview/solution/id_solution.go index 78d2b342de00..50e1e4a6a32b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationsmanagement/2015-11-01-preview/solution/id_solution.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/operationsmanagement/2015-11-01-preview/solution/id_solution.go @@ -36,19 +36,9 @@ func ParseSolutionID(input string) (*SolutionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SolutionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SolutionName, ok = parsed.Parsed["solutionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "solutionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSolutionIDInsensitively(input string) (*SolutionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SolutionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SolutionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SolutionName, ok = parsed.Parsed["solutionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "solutionName", *parsed) + if id.SolutionName, ok = input.Parsed["solutionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "solutionName", input) } - return &id, nil + return nil } // ValidateSolutionID checks that 'input' can be parsed as a Solution ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/contact/id_contact.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/contact/id_contact.go index 3ba0c0260d37..e3f3c49abe01 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/contact/id_contact.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/contact/id_contact.go @@ -38,23 +38,9 @@ func ParseContactID(input string) (*ContactId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContactId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpacecraftName, ok = parsed.Parsed["spacecraftName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "spacecraftName", *parsed) - } - - if id.ContactName, ok = parsed.Parsed["contactName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "contactName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseContactIDInsensitively(input string) (*ContactId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContactId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ContactId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpacecraftName, ok = parsed.Parsed["spacecraftName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "spacecraftName", *parsed) + if id.SpacecraftName, ok = input.Parsed["spacecraftName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "spacecraftName", input) } - if id.ContactName, ok = parsed.Parsed["contactName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "contactName", *parsed) + if id.ContactName, ok = input.Parsed["contactName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "contactName", input) } - return &id, nil + return nil } // ValidateContactID checks that 'input' can be parsed as a Contact ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/contact/id_spacecraft.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/contact/id_spacecraft.go index 8eb861c5bf9d..05374500aa47 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/contact/id_spacecraft.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/contact/id_spacecraft.go @@ -36,19 +36,9 @@ func ParseSpacecraftID(input string) (*SpacecraftId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SpacecraftId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpacecraftName, ok = parsed.Parsed["spacecraftName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "spacecraftName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSpacecraftIDInsensitively(input string) (*SpacecraftId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SpacecraftId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SpacecraftId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpacecraftName, ok = parsed.Parsed["spacecraftName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "spacecraftName", *parsed) + if id.SpacecraftName, ok = input.Parsed["spacecraftName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "spacecraftName", input) } - return &id, nil + return nil } // ValidateSpacecraftID checks that 'input' can be parsed as a Spacecraft ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/contactprofile/id_contactprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/contactprofile/id_contactprofile.go index 4586037714b4..11d09616a46b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/contactprofile/id_contactprofile.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/contactprofile/id_contactprofile.go @@ -36,19 +36,9 @@ func ParseContactProfileID(input string) (*ContactProfileId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContactProfileId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ContactProfileName, ok = parsed.Parsed["contactProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "contactProfileName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseContactProfileIDInsensitively(input string) (*ContactProfileId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ContactProfileId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ContactProfileId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ContactProfileName, ok = parsed.Parsed["contactProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "contactProfileName", *parsed) + if id.ContactProfileName, ok = input.Parsed["contactProfileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "contactProfileName", input) } - return &id, nil + return nil } // ValidateContactProfileID checks that 'input' can be parsed as a Contact Profile ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/spacecraft/id_spacecraft.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/spacecraft/id_spacecraft.go index e0e34ffff83d..ec488a659352 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/spacecraft/id_spacecraft.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/spacecraft/id_spacecraft.go @@ -36,19 +36,9 @@ func ParseSpacecraftID(input string) (*SpacecraftId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SpacecraftId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SpacecraftName, ok = parsed.Parsed["spacecraftName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "spacecraftName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSpacecraftIDInsensitively(input string) (*SpacecraftId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SpacecraftId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SpacecraftId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SpacecraftName, ok = parsed.Parsed["spacecraftName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "spacecraftName", *parsed) + if id.SpacecraftName, ok = input.Parsed["spacecraftName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "spacecraftName", input) } - return &id, nil + return nil } // ValidateSpacecraftID checks that 'input' can be parsed as a Spacecraft ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/id_certificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/id_certificate.go index e82e0b4e8438..0679b5b6867d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/id_certificate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/id_certificate.go @@ -34,15 +34,9 @@ func ParseCertificateID(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} - - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) - } - - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) + return &id, nil +} + +func (id *CertificateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.GlobalRulestackName, ok = input.Parsed["globalRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", input) } - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if id.CertificateName, ok = input.Parsed["certificateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "certificateName", input) } - return &id, nil + return nil } // ValidateCertificateID checks that 'input' can be parsed as a Certificate ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/id_globalrulestack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/id_globalrulestack.go index 090306d87a09..b93138721f7d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/id_globalrulestack.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/id_globalrulestack.go @@ -32,11 +32,9 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GlobalRulestackId{} - - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GlobalRulestackId{} - - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *GlobalRulestackId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.GlobalRulestackName, ok = input.Parsed["globalRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", input) + } + + return nil +} + // ValidateGlobalRulestackID checks that 'input' can be parsed as a Global Rulestack ID func ValidateGlobalRulestackID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/id_localrulestack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/id_localrulestack.go index 22edb8f8f152..f7c9ca3e513f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/id_localrulestack.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/id_localrulestack.go @@ -36,19 +36,9 @@ func ParseLocalRulestackID(input string) (*LocalRulestackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRulestackId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLocalRulestackIDInsensitively(input string) (*LocalRulestackId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRulestackId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LocalRulestackId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) + if id.LocalRulestackName, ok = input.Parsed["localRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", input) } - return &id, nil + return nil } // ValidateLocalRulestackID checks that 'input' can be parsed as a Local Rulestack ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/id_localrulestackcertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/id_localrulestackcertificate.go index 0113f5a68a1e..78f8eebe8b73 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/id_localrulestackcertificate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/id_localrulestackcertificate.go @@ -38,23 +38,9 @@ func ParseLocalRulestackCertificateID(input string) (*LocalRulestackCertificateI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRulestackCertificateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) - } - - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLocalRulestackCertificateIDInsensitively(input string) (*LocalRulestac return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRulestackCertificateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LocalRulestackCertificateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) + if id.LocalRulestackName, ok = input.Parsed["localRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", input) } - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if id.CertificateName, ok = input.Parsed["certificateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "certificateName", input) } - return &id, nil + return nil } // ValidateLocalRulestackCertificateID checks that 'input' can be parsed as a Local Rulestack Certificate ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/firewalls/id_firewall.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/firewalls/id_firewall.go index 2e460652130f..b531f7aba3c7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/firewalls/id_firewall.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/firewalls/id_firewall.go @@ -36,19 +36,9 @@ func ParseFirewallID(input string) (*FirewallId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FirewallName, ok = parsed.Parsed["firewallName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFirewallIDInsensitively(input string) (*FirewallId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FirewallId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FirewallName, ok = parsed.Parsed["firewallName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallName", *parsed) + if id.FirewallName, ok = input.Parsed["firewallName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "firewallName", input) } - return &id, nil + return nil } // ValidateFirewallID checks that 'input' can be parsed as a Firewall ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/id_firewall.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/id_firewall.go index 975c7d9c9dd5..a45aa650afa7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/id_firewall.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/id_firewall.go @@ -36,19 +36,9 @@ func ParseFirewallID(input string) (*FirewallId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FirewallName, ok = parsed.Parsed["firewallName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFirewallIDInsensitively(input string) (*FirewallId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FirewallId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FirewallName, ok = parsed.Parsed["firewallName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallName", *parsed) + if id.FirewallName, ok = input.Parsed["firewallName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "firewallName", input) } - return &id, nil + return nil } // ValidateFirewallID checks that 'input' can be parsed as a Firewall ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/id_fqdnlist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/id_fqdnlist.go index c649e37898f3..0427cc7af395 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/id_fqdnlist.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/id_fqdnlist.go @@ -34,15 +34,9 @@ func ParseFqdnListID(input string) (*FqdnListId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FqdnListId{} - - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) - } - - if id.FqdnListName, ok = parsed.Parsed["fqdnListName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fqdnListName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseFqdnListIDInsensitively(input string) (*FqdnListId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FqdnListId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) + return &id, nil +} + +func (id *FqdnListId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.GlobalRulestackName, ok = input.Parsed["globalRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", input) } - if id.FqdnListName, ok = parsed.Parsed["fqdnListName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fqdnListName", *parsed) + if id.FqdnListName, ok = input.Parsed["fqdnListName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "fqdnListName", input) } - return &id, nil + return nil } // ValidateFqdnListID checks that 'input' can be parsed as a Fqdn List ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/id_globalrulestack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/id_globalrulestack.go index 42c770e5b8d9..bbcd9689098b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/id_globalrulestack.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/id_globalrulestack.go @@ -32,11 +32,9 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GlobalRulestackId{} - - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GlobalRulestackId{} - - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *GlobalRulestackId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.GlobalRulestackName, ok = input.Parsed["globalRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", input) + } + + return nil +} + // ValidateGlobalRulestackID checks that 'input' can be parsed as a Global Rulestack ID func ValidateGlobalRulestackID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/id_localrulestack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/id_localrulestack.go index dcf74d99154a..eb6c82494993 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/id_localrulestack.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/id_localrulestack.go @@ -36,19 +36,9 @@ func ParseLocalRulestackID(input string) (*LocalRulestackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRulestackId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLocalRulestackIDInsensitively(input string) (*LocalRulestackId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRulestackId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LocalRulestackId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) + if id.LocalRulestackName, ok = input.Parsed["localRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", input) } - return &id, nil + return nil } // ValidateLocalRulestackID checks that 'input' can be parsed as a Local Rulestack ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/id_localrulestackfqdnlist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/id_localrulestackfqdnlist.go index a088885391d8..5484ffc44f08 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/id_localrulestackfqdnlist.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/id_localrulestackfqdnlist.go @@ -38,23 +38,9 @@ func ParseLocalRulestackFqdnListID(input string) (*LocalRulestackFqdnListId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRulestackFqdnListId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) - } - - if id.FqdnListName, ok = parsed.Parsed["fqdnListName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fqdnListName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLocalRulestackFqdnListIDInsensitively(input string) (*LocalRulestackFq return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRulestackFqdnListId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LocalRulestackFqdnListId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) + if id.LocalRulestackName, ok = input.Parsed["localRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", input) } - if id.FqdnListName, ok = parsed.Parsed["fqdnListName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "fqdnListName", *parsed) + if id.FqdnListName, ok = input.Parsed["fqdnListName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "fqdnListName", input) } - return &id, nil + return nil } // ValidateLocalRulestackFqdnListID checks that 'input' can be parsed as a Local Rulestack Fqdn List ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/id_globalrulestack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/id_globalrulestack.go index 9de874ca6426..4fad054dd3c6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/id_globalrulestack.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/id_globalrulestack.go @@ -32,11 +32,9 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GlobalRulestackId{} - - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GlobalRulestackId{} - - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *GlobalRulestackId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.GlobalRulestackName, ok = input.Parsed["globalRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", input) + } + + return nil +} + // ValidateGlobalRulestackID checks that 'input' can be parsed as a Global Rulestack ID func ValidateGlobalRulestackID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/localrules/id_localrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/localrules/id_localrule.go index 4baa8a275f4d..ac5666e081c5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/localrules/id_localrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/localrules/id_localrule.go @@ -38,23 +38,9 @@ func ParseLocalRuleID(input string) (*LocalRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) - } - - if id.LocalRuleName, ok = parsed.Parsed["localRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLocalRuleIDInsensitively(input string) (*LocalRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LocalRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) + if id.LocalRulestackName, ok = input.Parsed["localRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", input) } - if id.LocalRuleName, ok = parsed.Parsed["localRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRuleName", *parsed) + if id.LocalRuleName, ok = input.Parsed["localRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "localRuleName", input) } - return &id, nil + return nil } // ValidateLocalRuleID checks that 'input' can be parsed as a Local Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/localrules/id_localrulestack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/localrules/id_localrulestack.go index 54f5af9056b6..d2598cbdb33d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/localrules/id_localrulestack.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/localrules/id_localrulestack.go @@ -36,19 +36,9 @@ func ParseLocalRulestackID(input string) (*LocalRulestackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRulestackId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLocalRulestackIDInsensitively(input string) (*LocalRulestackId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRulestackId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LocalRulestackId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) + if id.LocalRulestackName, ok = input.Parsed["localRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", input) } - return &id, nil + return nil } // ValidateLocalRulestackID checks that 'input' can be parsed as a Local Rulestack ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/id_localrulestack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/id_localrulestack.go index 7aaf9d556ac5..42ef8ed4d216 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/id_localrulestack.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/id_localrulestack.go @@ -36,19 +36,9 @@ func ParseLocalRulestackID(input string) (*LocalRulestackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRulestackId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLocalRulestackIDInsensitively(input string) (*LocalRulestackId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRulestackId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LocalRulestackId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) + if id.LocalRulestackName, ok = input.Parsed["localRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", input) } - return &id, nil + return nil } // ValidateLocalRulestackID checks that 'input' can be parsed as a Local Rulestack ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/postrules/id_globalrulestack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/postrules/id_globalrulestack.go index 3c52aa067751..9da5b7060e11 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/postrules/id_globalrulestack.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/postrules/id_globalrulestack.go @@ -32,11 +32,9 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GlobalRulestackId{} - - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GlobalRulestackId{} - - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *GlobalRulestackId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.GlobalRulestackName, ok = input.Parsed["globalRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", input) + } + + return nil +} + // ValidateGlobalRulestackID checks that 'input' can be parsed as a Global Rulestack ID func ValidateGlobalRulestackID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/postrules/id_postrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/postrules/id_postrule.go index 5a4b0b7ac51c..6ab38de94230 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/postrules/id_postrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/postrules/id_postrule.go @@ -34,15 +34,9 @@ func ParsePostRuleID(input string) (*PostRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PostRuleId{} - - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) - } - - if id.PostRuleName, ok = parsed.Parsed["postRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "postRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParsePostRuleIDInsensitively(input string) (*PostRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PostRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) + return &id, nil +} + +func (id *PostRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.GlobalRulestackName, ok = input.Parsed["globalRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", input) } - if id.PostRuleName, ok = parsed.Parsed["postRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "postRuleName", *parsed) + if id.PostRuleName, ok = input.Parsed["postRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "postRuleName", input) } - return &id, nil + return nil } // ValidatePostRuleID checks that 'input' can be parsed as a Post Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/id_globalrulestack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/id_globalrulestack.go index 0786f30daa54..ea6f31f5a189 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/id_globalrulestack.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/id_globalrulestack.go @@ -32,11 +32,9 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GlobalRulestackId{} - - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GlobalRulestackId{} - - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *GlobalRulestackId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.GlobalRulestackName, ok = input.Parsed["globalRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", input) + } + + return nil +} + // ValidateGlobalRulestackID checks that 'input' can be parsed as a Global Rulestack ID func ValidateGlobalRulestackID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/id_prefixlist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/id_prefixlist.go index 652e439b6628..238efee3bd30 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/id_prefixlist.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/id_prefixlist.go @@ -34,15 +34,9 @@ func ParsePrefixListID(input string) (*PrefixListId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrefixListId{} - - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) - } - - if id.PrefixListName, ok = parsed.Parsed["prefixListName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "prefixListName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParsePrefixListIDInsensitively(input string) (*PrefixListId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrefixListId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) + return &id, nil +} + +func (id *PrefixListId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.GlobalRulestackName, ok = input.Parsed["globalRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", input) } - if id.PrefixListName, ok = parsed.Parsed["prefixListName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "prefixListName", *parsed) + if id.PrefixListName, ok = input.Parsed["prefixListName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "prefixListName", input) } - return &id, nil + return nil } // ValidatePrefixListID checks that 'input' can be parsed as a Prefix List ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/id_localrulestack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/id_localrulestack.go index 5e1569f83873..9ef234186909 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/id_localrulestack.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/id_localrulestack.go @@ -36,19 +36,9 @@ func ParseLocalRulestackID(input string) (*LocalRulestackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRulestackId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseLocalRulestackIDInsensitively(input string) (*LocalRulestackId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRulestackId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *LocalRulestackId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) + if id.LocalRulestackName, ok = input.Parsed["localRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", input) } - return &id, nil + return nil } // ValidateLocalRulestackID checks that 'input' can be parsed as a Local Rulestack ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/id_localrulestackprefixlist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/id_localrulestackprefixlist.go index a67aab6ae7d7..67fa4a971b62 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/id_localrulestackprefixlist.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/id_localrulestackprefixlist.go @@ -38,23 +38,9 @@ func ParseLocalRulestackPrefixListID(input string) (*LocalRulestackPrefixListId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRulestackPrefixListId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) - } - - if id.PrefixListName, ok = parsed.Parsed["prefixListName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "prefixListName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLocalRulestackPrefixListIDInsensitively(input string) (*LocalRulestack return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalRulestackPrefixListId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LocalRulestackPrefixListId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LocalRulestackName, ok = parsed.Parsed["localRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", *parsed) + if id.LocalRulestackName, ok = input.Parsed["localRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "localRulestackName", input) } - if id.PrefixListName, ok = parsed.Parsed["prefixListName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "prefixListName", *parsed) + if id.PrefixListName, ok = input.Parsed["prefixListName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "prefixListName", input) } - return &id, nil + return nil } // ValidateLocalRulestackPrefixListID checks that 'input' can be parsed as a Local Rulestack Prefix List ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prerules/id_globalrulestack.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prerules/id_globalrulestack.go index 1d44ae375c7e..2214bd08aca5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prerules/id_globalrulestack.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prerules/id_globalrulestack.go @@ -32,11 +32,9 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GlobalRulestackId{} - - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := GlobalRulestackId{} - - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *GlobalRulestackId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.GlobalRulestackName, ok = input.Parsed["globalRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", input) + } + + return nil +} + // ValidateGlobalRulestackID checks that 'input' can be parsed as a Global Rulestack ID func ValidateGlobalRulestackID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prerules/id_prerule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prerules/id_prerule.go index 03ef0a9c8b62..35bfe3b4c5c4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prerules/id_prerule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prerules/id_prerule.go @@ -34,15 +34,9 @@ func ParsePreRuleID(input string) (*PreRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PreRuleId{} - - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) - } - - if id.PreRuleName, ok = parsed.Parsed["preRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "preRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParsePreRuleIDInsensitively(input string) (*PreRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PreRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.GlobalRulestackName, ok = parsed.Parsed["globalRulestackName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", *parsed) + return &id, nil +} + +func (id *PreRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.GlobalRulestackName, ok = input.Parsed["globalRulestackName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "globalRulestackName", input) } - if id.PreRuleName, ok = parsed.Parsed["preRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "preRuleName", *parsed) + if id.PreRuleName, ok = input.Parsed["preRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "preRuleName", input) } - return &id, nil + return nil } // ValidatePreRuleID checks that 'input' can be parsed as a Pre Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_managementgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_managementgroup.go index b0919b86f251..7269223e3702 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_managementgroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_managementgroup.go @@ -32,11 +32,9 @@ func ParseManagementGroupID(input string) (*ManagementGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagementGroupId{} - - if id.ManagementGroupId, ok = parsed.Parsed["managementGroupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managementGroupId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseManagementGroupIDInsensitively(input string) (*ManagementGroupId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagementGroupId{} - - if id.ManagementGroupId, ok = parsed.Parsed["managementGroupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managementGroupId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *ManagementGroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ManagementGroupId, ok = input.Parsed["managementGroupId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managementGroupId", input) + } + + return nil +} + // ValidateManagementGroupID checks that 'input' can be parsed as a Management Group ID func ValidateManagementGroupID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_providerremediation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_providerremediation.go index f9418db5cc99..99ee5c1a66ae 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_providerremediation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_providerremediation.go @@ -36,19 +36,9 @@ func ParseProviderRemediationID(input string) (*ProviderRemediationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderRemediationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RemediationName, ok = parsed.Parsed["remediationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "remediationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProviderRemediationIDInsensitively(input string) (*ProviderRemediation return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderRemediationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProviderRemediationId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RemediationName, ok = parsed.Parsed["remediationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "remediationName", *parsed) + if id.RemediationName, ok = input.Parsed["remediationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "remediationName", input) } - return &id, nil + return nil } // ValidateProviderRemediationID checks that 'input' can be parsed as a Provider Remediation ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_providers2remediation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_providers2remediation.go index a0a141d3b8d6..6ce9068e5c3c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_providers2remediation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_providers2remediation.go @@ -34,15 +34,9 @@ func ParseProviders2RemediationID(input string) (*Providers2RemediationId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Providers2RemediationId{} - - if id.ManagementGroupId, ok = parsed.Parsed["managementGroupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managementGroupId", *parsed) - } - - if id.RemediationName, ok = parsed.Parsed["remediationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "remediationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseProviders2RemediationIDInsensitively(input string) (*Providers2Remedia return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Providers2RemediationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.ManagementGroupId, ok = parsed.Parsed["managementGroupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managementGroupId", *parsed) + return &id, nil +} + +func (id *Providers2RemediationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ManagementGroupId, ok = input.Parsed["managementGroupId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managementGroupId", input) } - if id.RemediationName, ok = parsed.Parsed["remediationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "remediationName", *parsed) + if id.RemediationName, ok = input.Parsed["remediationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "remediationName", input) } - return &id, nil + return nil } // ValidateProviders2RemediationID checks that 'input' can be parsed as a Providers 2 Remediation ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_remediation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_remediation.go index 93603cb07202..0d47bc1d8a51 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_remediation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_remediation.go @@ -34,15 +34,9 @@ func ParseRemediationID(input string) (*RemediationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RemediationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.RemediationName, ok = parsed.Parsed["remediationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "remediationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseRemediationIDInsensitively(input string) (*RemediationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RemediationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *RemediationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.RemediationName, ok = parsed.Parsed["remediationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "remediationName", *parsed) + if id.RemediationName, ok = input.Parsed["remediationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "remediationName", input) } - return &id, nil + return nil } // ValidateRemediationID checks that 'input' can be parsed as a Remediation ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_scopedremediation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_scopedremediation.go index c94dee0b549d..76201f165f55 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_scopedremediation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations/id_scopedremediation.go @@ -34,15 +34,9 @@ func ParseScopedRemediationID(input string) (*ScopedRemediationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRemediationId{} - - if id.ResourceId, ok = parsed.Parsed["resourceId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceId", *parsed) - } - - if id.RemediationName, ok = parsed.Parsed["remediationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "remediationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedRemediationIDInsensitively(input string) (*ScopedRemediationId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedRemediationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.ResourceId, ok = parsed.Parsed["resourceId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceId", *parsed) + return &id, nil +} + +func (id *ScopedRemediationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ResourceId, ok = input.Parsed["resourceId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceId", input) } - if id.RemediationName, ok = parsed.Parsed["remediationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "remediationName", *parsed) + if id.RemediationName, ok = input.Parsed["remediationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "remediationName", input) } - return &id, nil + return nil } // ValidateScopedRemediationID checks that 'input' can be parsed as a Scoped Remediation ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/id_dashboard.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/id_dashboard.go index 43f9698da254..128e091fa5ab 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/id_dashboard.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard/id_dashboard.go @@ -36,19 +36,9 @@ func ParseDashboardID(input string) (*DashboardId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DashboardId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DashboardName, ok = parsed.Parsed["dashboardName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dashboardName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDashboardIDInsensitively(input string) (*DashboardId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DashboardId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DashboardId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DashboardName, ok = parsed.Parsed["dashboardName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dashboardName", *parsed) + if id.DashboardName, ok = input.Parsed["dashboardName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dashboardName", input) } - return &id, nil + return nil } // ValidateDashboardID checks that 'input' can be parsed as a Dashboard ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurations/id_configuration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurations/id_configuration.go index 5f2dc735ca96..65383a3e6382 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurations/id_configuration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurations/id_configuration.go @@ -38,23 +38,9 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) - } - - if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + if id.ConfigurationName, ok = input.Parsed["configurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "configurationName", input) } - return &id, nil + return nil } // ValidateConfigurationID checks that 'input' can be parsed as a Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurations/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurations/id_server.go index fab0d426cc85..f6fb993ddd54 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurations/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurations/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/databases/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/databases/id_database.go index 7fd3d541bcb0..3c92ebbedcf9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/databases/id_database.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/databases/id_database.go @@ -38,23 +38,9 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool 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 = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - return &id, nil + return nil } // ValidateDatabaseID checks that 'input' can be parsed as a Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/databases/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/databases/id_server.go index d355696c4786..9dd20bf64e36 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/databases/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/databases/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/firewallrules/id_firewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/firewallrules/id_firewallrule.go index 6be3e99e0076..f48c17b4ad1d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/firewallrules/id_firewallrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/firewallrules/id_firewallrule.go @@ -38,23 +38,9 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) - } - - if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FirewallRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", *parsed) + if id.FirewallRuleName, ok = input.Parsed["firewallRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", input) } - return &id, nil + return nil } // ValidateFirewallRuleID checks that 'input' can be parsed as a Firewall Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/firewallrules/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/firewallrules/id_server.go index 1fbb75bfe25e..4d705865300b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/firewallrules/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/firewallrules/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/replicas/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/replicas/id_server.go index c9077c10e095..212537d87846 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/replicas/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/replicas/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serveradministrators/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serveradministrators/id_server.go index 9c560e120c14..d8bd12393a31 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serveradministrators/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serveradministrators/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers/id_server.go index 54edc87ec536..e45954bade9c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/id_server.go index 1d4d380e6695..f0945312f4c3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules/id_server.go index 9d107ebec747..6db668beeea5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules/id_virtualnetworkrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules/id_virtualnetworkrule.go index bafcd3659fb9..64906c05d7b3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules/id_virtualnetworkrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules/id_virtualnetworkrule.go @@ -38,23 +38,9 @@ func ParseVirtualNetworkRuleID(input string) (*VirtualNetworkRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) - } - - if id.VirtualNetworkRuleName, ok = parsed.Parsed["virtualNetworkRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseVirtualNetworkRuleIDInsensitively(input string) (*VirtualNetworkRuleId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VirtualNetworkRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - if id.VirtualNetworkRuleName, ok = parsed.Parsed["virtualNetworkRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkRuleName", *parsed) + if id.VirtualNetworkRuleName, ok = input.Parsed["virtualNetworkRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkRuleName", input) } - return &id, nil + return nil } // ValidateVirtualNetworkRuleID checks that 'input' can be parsed as a Virtual Network Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2020-01-01/serverkeys/id_key.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2020-01-01/serverkeys/id_key.go index d18f225f49e9..1d7dd0bc8be2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2020-01-01/serverkeys/id_key.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2020-01-01/serverkeys/id_key.go @@ -38,23 +38,9 @@ func ParseKeyID(input string) (*KeyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := KeyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) - } - - if id.KeyName, ok = parsed.Parsed["keyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "keyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseKeyIDInsensitively(input string) (*KeyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := KeyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *KeyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - if id.KeyName, ok = parsed.Parsed["keyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "keyName", *parsed) + if id.KeyName, ok = input.Parsed["keyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "keyName", input) } - return &id, nil + return nil } // ValidateKeyID checks that 'input' can be parsed as a Key ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2020-01-01/serverkeys/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2020-01-01/serverkeys/id_server.go index d0ad03177e29..9cfe370fe78e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2020-01-01/serverkeys/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2020-01-01/serverkeys/id_server.go @@ -36,19 +36,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/configurations/id_configuration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/configurations/id_configuration.go index 637b38893181..13ccace66cab 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/configurations/id_configuration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/configurations/id_configuration.go @@ -38,23 +38,9 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) - } - - if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + if id.ConfigurationName, ok = input.Parsed["configurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "configurationName", input) } - return &id, nil + return nil } // ValidateConfigurationID checks that 'input' can be parsed as a Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/configurations/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/configurations/id_flexibleserver.go index e46d806c603c..14ca470c4faf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/configurations/id_flexibleserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/configurations/id_flexibleserver.go @@ -36,19 +36,9 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FlexibleServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - return &id, nil + return nil } // ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/serverrestart/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/serverrestart/id_flexibleserver.go index fbcd5eee0627..c5ee5c5b5eca 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/serverrestart/id_flexibleserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/serverrestart/id_flexibleserver.go @@ -36,19 +36,9 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FlexibleServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - return &id, nil + return nil } // ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/administrators/id_administrator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/administrators/id_administrator.go index d425b96cbc12..6155faf52a23 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/administrators/id_administrator.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/administrators/id_administrator.go @@ -38,23 +38,9 @@ func ParseAdministratorID(input string) (*AdministratorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AdministratorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) - } - - if id.ObjectId, ok = parsed.Parsed["objectId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "objectId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAdministratorIDInsensitively(input string) (*AdministratorId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AdministratorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AdministratorId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - if id.ObjectId, ok = parsed.Parsed["objectId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "objectId", *parsed) + if id.ObjectId, ok = input.Parsed["objectId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "objectId", input) } - return &id, nil + return nil } // ValidateAdministratorID checks that 'input' can be parsed as a Administrator ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/administrators/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/administrators/id_flexibleserver.go index 9dc1595e3658..49eb38e5bd9a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/administrators/id_flexibleserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/administrators/id_flexibleserver.go @@ -36,19 +36,9 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FlexibleServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - return &id, nil + return nil } // ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/databases/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/databases/id_database.go index 7c12e7e56378..55faf833ac64 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/databases/id_database.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/databases/id_database.go @@ -38,23 +38,9 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool 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 = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - return &id, nil + return nil } // ValidateDatabaseID checks that 'input' can be parsed as a Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/databases/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/databases/id_flexibleserver.go index 27e57057dc22..a1dc8d0a72e4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/databases/id_flexibleserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/databases/id_flexibleserver.go @@ -36,19 +36,9 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FlexibleServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - return &id, nil + return nil } // ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/firewallrules/id_firewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/firewallrules/id_firewallrule.go index 54e67084ed7e..ec1737321768 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/firewallrules/id_firewallrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/firewallrules/id_firewallrule.go @@ -38,23 +38,9 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) - } - - if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FirewallRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", *parsed) + if id.FirewallRuleName, ok = input.Parsed["firewallRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", input) } - return &id, nil + return nil } // ValidateFirewallRuleID checks that 'input' can be parsed as a Firewall Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/firewallrules/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/firewallrules/id_flexibleserver.go index 4f87c5d46203..42d9408afac5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/firewallrules/id_flexibleserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/firewallrules/id_flexibleserver.go @@ -36,19 +36,9 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FlexibleServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - return &id, nil + return nil } // ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/servers/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/servers/id_flexibleserver.go index 10f7db4ca369..61acacfe3543 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/servers/id_flexibleserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/servers/id_flexibleserver.go @@ -36,19 +36,9 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FlexibleServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FlexibleServerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.FlexibleServerName, ok = parsed.Parsed["flexibleServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", *parsed) + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) } - return &id, nil + return nil } // ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/clusters/id_servergroupsv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/clusters/id_servergroupsv2.go index 1a0dc0bfa704..30f891f9c23f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/clusters/id_servergroupsv2.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/clusters/id_servergroupsv2.go @@ -36,19 +36,9 @@ func ParseServerGroupsv2ID(input string) (*ServerGroupsv2Id, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerGroupsv2Id{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerGroupsv2IDInsensitively(input string) (*ServerGroupsv2Id, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerGroupsv2Id{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerGroupsv2Id) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) + if id.ServerGroupsv2Name, ok = input.Parsed["serverGroupsv2Name"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", input) } - return &id, nil + return nil } // ValidateServerGroupsv2ID checks that 'input' can be parsed as a Server Groupsv 2 ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_configuration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_configuration.go index 5fb83ba41cfb..5191a5aef04e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_configuration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_configuration.go @@ -38,23 +38,9 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) - } - - if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) + if id.ServerGroupsv2Name, ok = input.Parsed["serverGroupsv2Name"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", input) } - if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + if id.ConfigurationName, ok = input.Parsed["configurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "configurationName", input) } - return &id, nil + return nil } // ValidateConfigurationID checks that 'input' can be parsed as a Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_coordinatorconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_coordinatorconfiguration.go index 9cefaa8d4e82..ccadaba503d1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_coordinatorconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_coordinatorconfiguration.go @@ -38,23 +38,9 @@ func ParseCoordinatorConfigurationID(input string) (*CoordinatorConfigurationId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CoordinatorConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) - } - - if id.CoordinatorConfigurationName, ok = parsed.Parsed["coordinatorConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "coordinatorConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCoordinatorConfigurationIDInsensitively(input string) (*CoordinatorCon return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CoordinatorConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CoordinatorConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) + if id.ServerGroupsv2Name, ok = input.Parsed["serverGroupsv2Name"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", input) } - if id.CoordinatorConfigurationName, ok = parsed.Parsed["coordinatorConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "coordinatorConfigurationName", *parsed) + if id.CoordinatorConfigurationName, ok = input.Parsed["coordinatorConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "coordinatorConfigurationName", input) } - return &id, nil + return nil } // ValidateCoordinatorConfigurationID checks that 'input' can be parsed as a Coordinator Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_nodeconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_nodeconfiguration.go index c95b371bc778..f3dc23ea09ff 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_nodeconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_nodeconfiguration.go @@ -38,23 +38,9 @@ func ParseNodeConfigurationID(input string) (*NodeConfigurationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NodeConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) - } - - if id.NodeConfigurationName, ok = parsed.Parsed["nodeConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "nodeConfigurationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseNodeConfigurationIDInsensitively(input string) (*NodeConfigurationId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NodeConfigurationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *NodeConfigurationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) + if id.ServerGroupsv2Name, ok = input.Parsed["serverGroupsv2Name"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", input) } - if id.NodeConfigurationName, ok = parsed.Parsed["nodeConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "nodeConfigurationName", *parsed) + if id.NodeConfigurationName, ok = input.Parsed["nodeConfigurationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "nodeConfigurationName", input) } - return &id, nil + return nil } // ValidateNodeConfigurationID checks that 'input' can be parsed as a Node Configuration ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_server.go index 049f8ba9b1a4..4ea73c6605b8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_server.go @@ -38,23 +38,9 @@ func ParseServerID(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ServerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) + if id.ServerGroupsv2Name, ok = input.Parsed["serverGroupsv2Name"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - return &id, nil + return nil } // ValidateServerID checks that 'input' can be parsed as a Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_servergroupsv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_servergroupsv2.go index fbc2b0a6f81b..7cfeb1439d0d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_servergroupsv2.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations/id_servergroupsv2.go @@ -36,19 +36,9 @@ func ParseServerGroupsv2ID(input string) (*ServerGroupsv2Id, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerGroupsv2Id{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerGroupsv2IDInsensitively(input string) (*ServerGroupsv2Id, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerGroupsv2Id{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerGroupsv2Id) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) + if id.ServerGroupsv2Name, ok = input.Parsed["serverGroupsv2Name"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", input) } - return &id, nil + return nil } // ValidateServerGroupsv2ID checks that 'input' can be parsed as a Server Groupsv 2 ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/firewallrules/id_firewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/firewallrules/id_firewallrule.go index 0d6e2664f118..068affce5bf8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/firewallrules/id_firewallrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/firewallrules/id_firewallrule.go @@ -38,23 +38,9 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) - } - - if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FirewallRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) + if id.ServerGroupsv2Name, ok = input.Parsed["serverGroupsv2Name"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", input) } - if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", *parsed) + if id.FirewallRuleName, ok = input.Parsed["firewallRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", input) } - return &id, nil + return nil } // ValidateFirewallRuleID checks that 'input' can be parsed as a Firewall Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/firewallrules/id_servergroupsv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/firewallrules/id_servergroupsv2.go index 1deaf523b0e8..6745d0d82d6e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/firewallrules/id_servergroupsv2.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/firewallrules/id_servergroupsv2.go @@ -36,19 +36,9 @@ func ParseServerGroupsv2ID(input string) (*ServerGroupsv2Id, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerGroupsv2Id{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerGroupsv2IDInsensitively(input string) (*ServerGroupsv2Id, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerGroupsv2Id{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerGroupsv2Id) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) + if id.ServerGroupsv2Name, ok = input.Parsed["serverGroupsv2Name"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", input) } - return &id, nil + return nil } // ValidateServerGroupsv2ID checks that 'input' can be parsed as a Server Groupsv 2 ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/roles/id_role.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/roles/id_role.go index e5677738fce3..847158f1723d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/roles/id_role.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/roles/id_role.go @@ -38,23 +38,9 @@ func ParseRoleID(input string) (*RoleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RoleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) - } - - if id.RoleName, ok = parsed.Parsed["roleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRoleIDInsensitively(input string) (*RoleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RoleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RoleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) + if id.ServerGroupsv2Name, ok = input.Parsed["serverGroupsv2Name"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", input) } - if id.RoleName, ok = parsed.Parsed["roleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleName", *parsed) + if id.RoleName, ok = input.Parsed["roleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "roleName", input) } - return &id, nil + return nil } // ValidateRoleID checks that 'input' can be parsed as a Role ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/roles/id_servergroupsv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/roles/id_servergroupsv2.go index 50c509ce71a6..aa87f75ff856 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/roles/id_servergroupsv2.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/roles/id_servergroupsv2.go @@ -36,19 +36,9 @@ func ParseServerGroupsv2ID(input string) (*ServerGroupsv2Id, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerGroupsv2Id{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseServerGroupsv2IDInsensitively(input string) (*ServerGroupsv2Id, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ServerGroupsv2Id{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ServerGroupsv2Id) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerGroupsv2Name, ok = parsed.Parsed["serverGroupsv2Name"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", *parsed) + if id.ServerGroupsv2Name, ok = input.Parsed["serverGroupsv2Name"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverGroupsv2Name", input) } - return &id, nil + return nil } // ValidateServerGroupsv2ID checks that 'input' can be parsed as a Server Groupsv 2 ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/id_capacity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/id_capacity.go index 0b34e0a59e6b..ebeda4140776 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/id_capacity.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/id_capacity.go @@ -36,19 +36,9 @@ func ParseCapacityID(input string) (*CapacityId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CapacityId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CapacityName, ok = parsed.Parsed["capacityName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseCapacityIDInsensitively(input string) (*CapacityId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CapacityId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *CapacityId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CapacityName, ok = parsed.Parsed["capacityName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "capacityName", *parsed) + if id.CapacityName, ok = input.Parsed["capacityName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "capacityName", input) } - return &id, nil + return nil } // ValidateCapacityID checks that 'input' can be parsed as a Capacity ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/id_location.go index 93d78bb2d8c8..846a6816f7a9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/privatezones/id_privatednszone.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/privatezones/id_privatednszone.go index f548d0aa35b7..546d3ef5518c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/privatezones/id_privatednszone.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/privatezones/id_privatednszone.go @@ -36,19 +36,9 @@ func ParsePrivateDnsZoneID(input string) (*PrivateDnsZoneId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateDnsZoneId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateDnsZoneName, ok = parsed.Parsed["privateDnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePrivateDnsZoneIDInsensitively(input string) (*PrivateDnsZoneId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateDnsZoneId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PrivateDnsZoneId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateDnsZoneName, ok = parsed.Parsed["privateDnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", *parsed) + if id.PrivateDnsZoneName, ok = input.Parsed["privateDnsZoneName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", input) } - return &id, nil + return nil } // ValidatePrivateDnsZoneID checks that 'input' can be parsed as a Private Dns Zone ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/recordsets/id_privatednszone.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/recordsets/id_privatednszone.go index f3f6b0522018..62b602a631f2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/recordsets/id_privatednszone.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/recordsets/id_privatednszone.go @@ -36,19 +36,9 @@ func ParsePrivateDnsZoneID(input string) (*PrivateDnsZoneId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateDnsZoneId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateDnsZoneName, ok = parsed.Parsed["privateDnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePrivateDnsZoneIDInsensitively(input string) (*PrivateDnsZoneId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateDnsZoneId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PrivateDnsZoneId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateDnsZoneName, ok = parsed.Parsed["privateDnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", *parsed) + if id.PrivateDnsZoneName, ok = input.Parsed["privateDnsZoneName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", input) } - return &id, nil + return nil } // ValidatePrivateDnsZoneID checks that 'input' can be parsed as a Private Dns Zone ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/recordsets/id_privatezone.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/recordsets/id_privatezone.go index da8be2cda85a..4c41d1495064 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/recordsets/id_privatezone.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/recordsets/id_privatezone.go @@ -38,31 +38,9 @@ func ParsePrivateZoneID(input string) (*PrivateZoneId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateZoneId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateDnsZoneName, ok = parsed.Parsed["privateDnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", *parsed) - } - - if v, ok := parsed.Parsed["recordType"]; true { - if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "recordType", *parsed) - } - - recordType, err := parseRecordType(v) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) - } - id.RecordType = *recordType + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -77,34 +55,42 @@ func ParsePrivateZoneIDInsensitively(input string) (*PrivateZoneId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateZoneId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *PrivateZoneId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateDnsZoneName, ok = parsed.Parsed["privateDnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", *parsed) + if id.PrivateDnsZoneName, ok = input.Parsed["privateDnsZoneName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", input) } - if v, ok := parsed.Parsed["recordType"]; true { + if v, ok := input.Parsed["recordType"]; true { if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "recordType", *parsed) + return resourceids.NewSegmentNotSpecifiedError(id, "recordType", input) } recordType, err := parseRecordType(v) if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) + return fmt.Errorf("parsing %q: %+v", v, err) } id.RecordType = *recordType } - return &id, nil + return nil } // ValidatePrivateZoneID checks that 'input' can be parsed as a Private Zone ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/recordsets/id_recordtype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/recordsets/id_recordtype.go index db7c0e39823e..51a924f7478c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/recordsets/id_recordtype.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/recordsets/id_recordtype.go @@ -40,35 +40,9 @@ func ParseRecordTypeID(input string) (*RecordTypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RecordTypeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateDnsZoneName, ok = parsed.Parsed["privateDnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", *parsed) - } - - if v, ok := parsed.Parsed["recordType"]; true { - if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "recordType", *parsed) - } - - recordType, err := parseRecordType(v) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) - } - id.RecordType = *recordType - } - - if id.RelativeRecordSetName, ok = parsed.Parsed["relativeRecordSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "relativeRecordSetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -83,38 +57,46 @@ func ParseRecordTypeIDInsensitively(input string) (*RecordTypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RecordTypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *RecordTypeId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateDnsZoneName, ok = parsed.Parsed["privateDnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", *parsed) + if id.PrivateDnsZoneName, ok = input.Parsed["privateDnsZoneName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", input) } - if v, ok := parsed.Parsed["recordType"]; true { + if v, ok := input.Parsed["recordType"]; true { if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "recordType", *parsed) + return resourceids.NewSegmentNotSpecifiedError(id, "recordType", input) } recordType, err := parseRecordType(v) if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) + return fmt.Errorf("parsing %q: %+v", v, err) } id.RecordType = *recordType } - if id.RelativeRecordSetName, ok = parsed.Parsed["relativeRecordSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "relativeRecordSetName", *parsed) + if id.RelativeRecordSetName, ok = input.Parsed["relativeRecordSetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "relativeRecordSetName", input) } - return &id, nil + return nil } // ValidateRecordTypeID checks that 'input' can be parsed as a Record Type ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/virtualnetworklinks/id_privatednszone.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/virtualnetworklinks/id_privatednszone.go index 8caf9a57f3d2..0c5fa87c2afb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/virtualnetworklinks/id_privatednszone.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/virtualnetworklinks/id_privatednszone.go @@ -36,19 +36,9 @@ func ParsePrivateDnsZoneID(input string) (*PrivateDnsZoneId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateDnsZoneId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateDnsZoneName, ok = parsed.Parsed["privateDnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePrivateDnsZoneIDInsensitively(input string) (*PrivateDnsZoneId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateDnsZoneId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PrivateDnsZoneId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateDnsZoneName, ok = parsed.Parsed["privateDnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", *parsed) + if id.PrivateDnsZoneName, ok = input.Parsed["privateDnsZoneName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", input) } - return &id, nil + return nil } // ValidatePrivateDnsZoneID checks that 'input' can be parsed as a Private Dns Zone ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/virtualnetworklinks/id_virtualnetworklink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/virtualnetworklinks/id_virtualnetworklink.go index b3e1ee6396bb..644ade97786a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/virtualnetworklinks/id_virtualnetworklink.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/virtualnetworklinks/id_virtualnetworklink.go @@ -38,23 +38,9 @@ func ParseVirtualNetworkLinkID(input string) (*VirtualNetworkLinkId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkLinkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateDnsZoneName, ok = parsed.Parsed["privateDnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", *parsed) - } - - if id.VirtualNetworkLinkName, ok = parsed.Parsed["virtualNetworkLinkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkLinkName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseVirtualNetworkLinkIDInsensitively(input string) (*VirtualNetworkLinkId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VirtualNetworkLinkId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VirtualNetworkLinkId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateDnsZoneName, ok = parsed.Parsed["privateDnsZoneName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", *parsed) + if id.PrivateDnsZoneName, ok = input.Parsed["privateDnsZoneName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneName", input) } - if id.VirtualNetworkLinkName, ok = parsed.Parsed["virtualNetworkLinkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkLinkName", *parsed) + if id.VirtualNetworkLinkName, ok = input.Parsed["virtualNetworkLinkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkLinkName", input) } - return &id, nil + return nil } // ValidateVirtualNetworkLinkID checks that 'input' can be parsed as a Virtual Network Link ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/id_account.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/id_account.go index abb56d58728f..03f4e5c969df 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/id_account.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/id_account.go @@ -36,19 +36,9 @@ func ParseAccountID(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AccountId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AccountName, ok = parsed.Parsed["accountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accountName", *parsed) + if id.AccountName, ok = input.Parsed["accountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accountName", input) } - return &id, nil + return nil } // ValidateAccountID checks that 'input' can be parsed as a Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/id_certificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/id_certificate.go index 56dd60171f78..be70b62e4cac 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/id_certificate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates/id_certificate.go @@ -38,23 +38,9 @@ func ParseCertificateID(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CertificateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CertificateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + if id.CertificateName, ok = input.Parsed["certificateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "certificateName", input) } - return &id, nil + return nil } // ValidateCertificateID checks that 'input' can be parsed as a Certificate ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/id_vault.go index c436e8031c6c..e5a807d164d9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/id_vault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults/id_vault.go @@ -36,19 +36,9 @@ func ParseVaultID(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - return &id, nil + return nil } // ValidateVaultID checks that 'input' can be parsed as a Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/id_vault.go index ff2ce7574033..634cfb3c0cd0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/id_vault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/id_vault.go @@ -36,19 +36,9 @@ func ParseVaultID(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - return &id, nil + return nil } // ValidateVaultID checks that 'input' can be parsed as a Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/id_vault.go index c573dda4a654..f05c3b2777bd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/id_vault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/id_vault.go @@ -36,19 +36,9 @@ func ParseVaultID(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - return &id, nil + return nil } // ValidateVaultID checks that 'input' can be parsed as a Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/id_vault.go index 2340c5636565..c6bd079c1969 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/id_vault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/id_vault.go @@ -36,19 +36,9 @@ func ParseVaultID(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - return &id, nil + return nil } // ValidateVaultID checks that 'input' can be parsed as a Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/id_vault.go index 090ed67cb898..9e57d094359c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/id_vault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/id_vault.go @@ -36,19 +36,9 @@ func ParseVaultID(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - return &id, nil + return nil } // ValidateVaultID checks that 'input' can be parsed as a Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/id_protecteditem.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/id_protecteditem.go index f3fdb99d86cf..e1e53a96b1f6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/id_protecteditem.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/id_protecteditem.go @@ -42,31 +42,9 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProtectedItemId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.BackupFabricName, ok = parsed.Parsed["backupFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupFabricName", *parsed) - } - - if id.ProtectionContainerName, ok = parsed.Parsed["protectionContainerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "protectionContainerName", *parsed) - } - - if id.ProtectedItemName, ok = parsed.Parsed["protectedItemName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "protectedItemName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProtectedItemId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProtectedItemId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.BackupFabricName, ok = parsed.Parsed["backupFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupFabricName", *parsed) + if id.BackupFabricName, ok = input.Parsed["backupFabricName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupFabricName", input) } - if id.ProtectionContainerName, ok = parsed.Parsed["protectionContainerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "protectionContainerName", *parsed) + if id.ProtectionContainerName, ok = input.Parsed["protectionContainerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "protectionContainerName", input) } - if id.ProtectedItemName, ok = parsed.Parsed["protectedItemName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "protectedItemName", *parsed) + if id.ProtectedItemName, ok = input.Parsed["protectedItemName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "protectedItemName", input) } - return &id, nil + return nil } // ValidateProtectedItemID checks that 'input' can be parsed as a Protected Item ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/id_backupfabric.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/id_backupfabric.go index f929acd11e97..bcbc12430625 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/id_backupfabric.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/id_backupfabric.go @@ -38,23 +38,9 @@ func ParseBackupFabricID(input string) (*BackupFabricId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupFabricId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.BackupFabricName, ok = parsed.Parsed["backupFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupFabricName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseBackupFabricIDInsensitively(input string) (*BackupFabricId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupFabricId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BackupFabricId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.BackupFabricName, ok = parsed.Parsed["backupFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupFabricName", *parsed) + if id.BackupFabricName, ok = input.Parsed["backupFabricName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupFabricName", input) } - return &id, nil + return nil } // ValidateBackupFabricID checks that 'input' can be parsed as a Backup Fabric ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/id_protectioncontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/id_protectioncontainer.go index bc3b402d92cd..bd6c7e47669a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/id_protectioncontainer.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/id_protectioncontainer.go @@ -40,27 +40,9 @@ func ParseProtectionContainerID(input string) (*ProtectionContainerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProtectionContainerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.BackupFabricName, ok = parsed.Parsed["backupFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupFabricName", *parsed) - } - - if id.ProtectionContainerName, ok = parsed.Parsed["protectionContainerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "protectionContainerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseProtectionContainerIDInsensitively(input string) (*ProtectionContainer return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProtectionContainerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ProtectionContainerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.BackupFabricName, ok = parsed.Parsed["backupFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupFabricName", *parsed) + if id.BackupFabricName, ok = input.Parsed["backupFabricName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupFabricName", input) } - if id.ProtectionContainerName, ok = parsed.Parsed["protectionContainerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "protectionContainerName", *parsed) + if id.ProtectionContainerName, ok = input.Parsed["protectionContainerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "protectionContainerName", input) } - return &id, nil + return nil } // ValidateProtectionContainerID checks that 'input' can be parsed as a Protection Container ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/id_backuppolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/id_backuppolicy.go index 320ce51eb8ef..0496c1a87bc0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/id_backuppolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/id_backuppolicy.go @@ -38,23 +38,9 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.BackupPolicyName, ok = parsed.Parsed["backupPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BackupPolicyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.BackupPolicyName, ok = parsed.Parsed["backupPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupPolicyName", *parsed) + if id.BackupPolicyName, ok = input.Parsed["backupPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupPolicyName", input) } - return &id, nil + return nil } // ValidateBackupPolicyID checks that 'input' can be parsed as a Backup Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy/id_backupresourceguardproxy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy/id_backupresourceguardproxy.go index a05bd4a2c999..8fe87a680091 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy/id_backupresourceguardproxy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy/id_backupresourceguardproxy.go @@ -38,23 +38,9 @@ func ParseBackupResourceGuardProxyID(input string) (*BackupResourceGuardProxyId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupResourceGuardProxyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.BackupResourceGuardProxyName, ok = parsed.Parsed["backupResourceGuardProxyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupResourceGuardProxyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseBackupResourceGuardProxyIDInsensitively(input string) (*BackupResource return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BackupResourceGuardProxyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BackupResourceGuardProxyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.BackupResourceGuardProxyName, ok = parsed.Parsed["backupResourceGuardProxyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backupResourceGuardProxyName", *parsed) + if id.BackupResourceGuardProxyName, ok = input.Parsed["backupResourceGuardProxyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupResourceGuardProxyName", input) } - return &id, nil + return nil } // ValidateBackupResourceGuardProxyID checks that 'input' can be parsed as a Backup Resource Guard Proxy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_replicationfabric.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_replicationfabric.go index db5f8d7ab5e9..72935507a8ca 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_replicationfabric.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_replicationfabric.go @@ -38,23 +38,9 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationFabricId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationFabricId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ReplicationFabricId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) + if id.ReplicationFabricName, ok = input.Parsed["replicationFabricName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", input) } - return &id, nil + return nil } // ValidateReplicationFabricID checks that 'input' can be parsed as a Replication Fabric ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_vault.go index 2a58d893c0e6..b88ddbb8e338 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_vault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_vault.go @@ -36,19 +36,9 @@ func ParseVaultID(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - return &id, nil + return nil } // ValidateVaultID checks that 'input' can be parsed as a Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetwork.go index 8f65b4f0ffdc..521fb241bedd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetwork.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetwork.go @@ -40,27 +40,9 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationNetworkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) - } - - if id.ReplicationNetworkName, ok = parsed.Parsed["replicationNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationNetworkName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationNetworkId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ReplicationNetworkId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) + if id.ReplicationFabricName, ok = input.Parsed["replicationFabricName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", input) } - if id.ReplicationNetworkName, ok = parsed.Parsed["replicationNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationNetworkName", *parsed) + if id.ReplicationNetworkName, ok = input.Parsed["replicationNetworkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationNetworkName", input) } - return &id, nil + return nil } // ValidateReplicationNetworkID checks that 'input' can be parsed as a Replication Network ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetworkmapping.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetworkmapping.go index e67c61eed514..5705f27e9b73 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetworkmapping.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetworkmapping.go @@ -42,31 +42,9 @@ func ParseReplicationNetworkMappingID(input string) (*ReplicationNetworkMappingI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationNetworkMappingId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) - } - - if id.ReplicationNetworkName, ok = parsed.Parsed["replicationNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationNetworkName", *parsed) - } - - if id.ReplicationNetworkMappingName, ok = parsed.Parsed["replicationNetworkMappingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationNetworkMappingName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseReplicationNetworkMappingIDInsensitively(input string) (*ReplicationNe return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationNetworkMappingId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ReplicationNetworkMappingId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) + if id.ReplicationFabricName, ok = input.Parsed["replicationFabricName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", input) } - if id.ReplicationNetworkName, ok = parsed.Parsed["replicationNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationNetworkName", *parsed) + if id.ReplicationNetworkName, ok = input.Parsed["replicationNetworkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationNetworkName", input) } - if id.ReplicationNetworkMappingName, ok = parsed.Parsed["replicationNetworkMappingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationNetworkMappingName", *parsed) + if id.ReplicationNetworkMappingName, ok = input.Parsed["replicationNetworkMappingName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationNetworkMappingName", input) } - return &id, nil + return nil } // ValidateReplicationNetworkMappingID checks that 'input' can be parsed as a Replication Network Mapping ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_vault.go index 192509d68b9b..e154527e540e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_vault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_vault.go @@ -36,19 +36,9 @@ func ParseVaultID(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - return &id, nil + return nil } // ValidateVaultID checks that 'input' can be parsed as a Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationfabric.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationfabric.go index 73c02b723eee..c46331fc5f77 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationfabric.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationfabric.go @@ -38,23 +38,9 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationFabricId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationFabricId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ReplicationFabricId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) + if id.ReplicationFabricName, ok = input.Parsed["replicationFabricName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", input) } - return &id, nil + return nil } // ValidateReplicationFabricID checks that 'input' can be parsed as a Replication Fabric ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationnetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationnetwork.go index e1869f6fb0d3..e9f54c2f47ad 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationnetwork.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationnetwork.go @@ -40,27 +40,9 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationNetworkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) - } - - if id.ReplicationNetworkName, ok = parsed.Parsed["replicationNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationNetworkName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationNetworkId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ReplicationNetworkId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) + if id.ReplicationFabricName, ok = input.Parsed["replicationFabricName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", input) } - if id.ReplicationNetworkName, ok = parsed.Parsed["replicationNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationNetworkName", *parsed) + if id.ReplicationNetworkName, ok = input.Parsed["replicationNetworkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationNetworkName", input) } - return &id, nil + return nil } // ValidateReplicationNetworkID checks that 'input' can be parsed as a Replication Network ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_vault.go index 0bfde13c55de..6e0f3a3d4a3d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_vault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_vault.go @@ -36,19 +36,9 @@ func ParseVaultID(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - return &id, nil + return nil } // ValidateVaultID checks that 'input' can be parsed as a Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_replicationpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_replicationpolicy.go index c9d0ad0e634f..a75a6de5d563 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_replicationpolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_replicationpolicy.go @@ -38,23 +38,9 @@ func ParseReplicationPolicyID(input string) (*ReplicationPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.ReplicationPolicyName, ok = parsed.Parsed["replicationPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseReplicationPolicyIDInsensitively(input string) (*ReplicationPolicyId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ReplicationPolicyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.ReplicationPolicyName, ok = parsed.Parsed["replicationPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationPolicyName", *parsed) + if id.ReplicationPolicyName, ok = input.Parsed["replicationPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationPolicyName", input) } - return &id, nil + return nil } // ValidateReplicationPolicyID checks that 'input' can be parsed as a Replication Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_vault.go index f4a5bf6b711f..6a89bd687a52 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_vault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_vault.go @@ -36,19 +36,9 @@ func ParseVaultID(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - return &id, nil + return nil } // ValidateVaultID checks that 'input' can be parsed as a Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotecteditem.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotecteditem.go index 557ea1c29ea0..1857f1b1c6d3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotecteditem.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotecteditem.go @@ -42,31 +42,9 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationProtectedItemId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) - } - - if id.ReplicationProtectionContainerName, ok = parsed.Parsed["replicationProtectionContainerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerName", *parsed) - } - - if id.ReplicationProtectedItemName, ok = parsed.Parsed["replicationProtectedItemName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectedItemName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationProtectedItemId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ReplicationProtectedItemId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) + if id.ReplicationFabricName, ok = input.Parsed["replicationFabricName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", input) } - if id.ReplicationProtectionContainerName, ok = parsed.Parsed["replicationProtectionContainerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerName", *parsed) + if id.ReplicationProtectionContainerName, ok = input.Parsed["replicationProtectionContainerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerName", input) } - if id.ReplicationProtectedItemName, ok = parsed.Parsed["replicationProtectedItemName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectedItemName", *parsed) + if id.ReplicationProtectedItemName, ok = input.Parsed["replicationProtectedItemName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectedItemName", input) } - return &id, nil + return nil } // ValidateReplicationProtectedItemID checks that 'input' can be parsed as a Replication Protected Item ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotectioncontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotectioncontainer.go index 4c5b4524f126..8f0abd62b2cf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotectioncontainer.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotectioncontainer.go @@ -40,27 +40,9 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationProtectionContainerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) - } - - if id.ReplicationProtectionContainerName, ok = parsed.Parsed["replicationProtectionContainerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationProtectionContainerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ReplicationProtectionContainerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) + if id.ReplicationFabricName, ok = input.Parsed["replicationFabricName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", input) } - if id.ReplicationProtectionContainerName, ok = parsed.Parsed["replicationProtectionContainerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerName", *parsed) + if id.ReplicationProtectionContainerName, ok = input.Parsed["replicationProtectionContainerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerName", input) } - return &id, nil + return nil } // ValidateReplicationProtectionContainerID checks that 'input' can be parsed as a Replication Protection Container ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_vault.go index 1e669936aab2..dbbb913e4247 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_vault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_vault.go @@ -36,19 +36,9 @@ func ParseVaultID(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - return &id, nil + return nil } // ValidateVaultID checks that 'input' can be parsed as a Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go index c1b2a09565de..0c905cb402a5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go @@ -40,27 +40,9 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationProtectionContainerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) - } - - if id.ReplicationProtectionContainerName, ok = parsed.Parsed["replicationProtectionContainerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationProtectionContainerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ReplicationProtectionContainerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) + if id.ReplicationFabricName, ok = input.Parsed["replicationFabricName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", input) } - if id.ReplicationProtectionContainerName, ok = parsed.Parsed["replicationProtectionContainerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerName", *parsed) + if id.ReplicationProtectionContainerName, ok = input.Parsed["replicationProtectionContainerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerName", input) } - return &id, nil + return nil } // ValidateReplicationProtectionContainerID checks that 'input' can be parsed as a Replication Protection Container ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go index 3a5c8ab08a93..7c3363810065 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go @@ -42,31 +42,9 @@ func ParseReplicationProtectionContainerMappingID(input string) (*ReplicationPro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationProtectionContainerMappingId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) - } - - if id.ReplicationProtectionContainerName, ok = parsed.Parsed["replicationProtectionContainerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerName", *parsed) - } - - if id.ReplicationProtectionContainerMappingName, ok = parsed.Parsed["replicationProtectionContainerMappingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerMappingName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseReplicationProtectionContainerMappingIDInsensitively(input string) (*R return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationProtectionContainerMappingId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ReplicationProtectionContainerMappingId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) + if id.ReplicationFabricName, ok = input.Parsed["replicationFabricName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", input) } - if id.ReplicationProtectionContainerName, ok = parsed.Parsed["replicationProtectionContainerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerName", *parsed) + if id.ReplicationProtectionContainerName, ok = input.Parsed["replicationProtectionContainerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerName", input) } - if id.ReplicationProtectionContainerMappingName, ok = parsed.Parsed["replicationProtectionContainerMappingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerMappingName", *parsed) + if id.ReplicationProtectionContainerMappingName, ok = input.Parsed["replicationProtectionContainerMappingName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerMappingName", input) } - return &id, nil + return nil } // ValidateReplicationProtectionContainerMappingID checks that 'input' can be parsed as a Replication Protection Container Mapping ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_vault.go index 7aa36b783ff2..2a63a1f32996 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_vault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_vault.go @@ -36,19 +36,9 @@ func ParseVaultID(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - return &id, nil + return nil } // ValidateVaultID checks that 'input' can be parsed as a Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationfabric.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationfabric.go index c8c5de12a393..7668b03a5716 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationfabric.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationfabric.go @@ -38,23 +38,9 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationFabricId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationFabricId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ReplicationFabricId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) + if id.ReplicationFabricName, ok = input.Parsed["replicationFabricName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", input) } - return &id, nil + return nil } // ValidateReplicationFabricID checks that 'input' can be parsed as a Replication Fabric ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go index 41b97b229a15..e5ac027a57ae 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go @@ -40,27 +40,9 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationProtectionContainerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) - } - - if id.ReplicationProtectionContainerName, ok = parsed.Parsed["replicationProtectionContainerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationProtectionContainerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ReplicationProtectionContainerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) + if id.ReplicationFabricName, ok = input.Parsed["replicationFabricName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", input) } - if id.ReplicationProtectionContainerName, ok = parsed.Parsed["replicationProtectionContainerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerName", *parsed) + if id.ReplicationProtectionContainerName, ok = input.Parsed["replicationProtectionContainerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationProtectionContainerName", input) } - return &id, nil + return nil } // ValidateReplicationProtectionContainerID checks that 'input' can be parsed as a Replication Protection Container ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_vault.go index 6e73b89bd304..123feaadd447 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_vault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_vault.go @@ -36,19 +36,9 @@ func ParseVaultID(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - return &id, nil + return nil } // ValidateVaultID checks that 'input' can be parsed as a Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_replicationrecoveryplan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_replicationrecoveryplan.go index f99b2d54f2b4..b7787ae706b6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_replicationrecoveryplan.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_replicationrecoveryplan.go @@ -38,23 +38,9 @@ func ParseReplicationRecoveryPlanID(input string) (*ReplicationRecoveryPlanId, e return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationRecoveryPlanId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.ReplicationRecoveryPlanName, ok = parsed.Parsed["replicationRecoveryPlanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationRecoveryPlanName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseReplicationRecoveryPlanIDInsensitively(input string) (*ReplicationReco return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationRecoveryPlanId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ReplicationRecoveryPlanId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.ReplicationRecoveryPlanName, ok = parsed.Parsed["replicationRecoveryPlanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationRecoveryPlanName", *parsed) + if id.ReplicationRecoveryPlanName, ok = input.Parsed["replicationRecoveryPlanName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationRecoveryPlanName", input) } - return &id, nil + return nil } // ValidateReplicationRecoveryPlanID checks that 'input' can be parsed as a Replication Recovery Plan ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_vault.go index 2682100c6307..b15709cdd0f4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_vault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_vault.go @@ -36,19 +36,9 @@ func ParseVaultID(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - return &id, nil + return nil } // ValidateVaultID checks that 'input' can be parsed as a Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationfabric.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationfabric.go index 34d30092c2e3..12020d9804c2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationfabric.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationfabric.go @@ -38,23 +38,9 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationFabricId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationFabricId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ReplicationFabricId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) + if id.ReplicationFabricName, ok = input.Parsed["replicationFabricName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", input) } - return &id, nil + return nil } // ValidateReplicationFabricID checks that 'input' can be parsed as a Replication Fabric ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go index 7afec8d9785a..2edeccae53a4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go @@ -40,27 +40,9 @@ func ParseReplicationRecoveryServicesProviderID(input string) (*ReplicationRecov return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationRecoveryServicesProviderId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) - } - - if id.ReplicationRecoveryServicesProviderName, ok = parsed.Parsed["replicationRecoveryServicesProviderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationRecoveryServicesProviderName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseReplicationRecoveryServicesProviderIDInsensitively(input string) (*Rep return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationRecoveryServicesProviderId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ReplicationRecoveryServicesProviderId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.ReplicationFabricName, ok = parsed.Parsed["replicationFabricName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", *parsed) + if id.ReplicationFabricName, ok = input.Parsed["replicationFabricName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationFabricName", input) } - if id.ReplicationRecoveryServicesProviderName, ok = parsed.Parsed["replicationRecoveryServicesProviderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationRecoveryServicesProviderName", *parsed) + if id.ReplicationRecoveryServicesProviderName, ok = input.Parsed["replicationRecoveryServicesProviderName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationRecoveryServicesProviderName", input) } - return &id, nil + return nil } // ValidateReplicationRecoveryServicesProviderID checks that 'input' can be parsed as a Replication Recovery Services Provider ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_vault.go index a80d2f9b1b31..c2d20a2cf826 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_vault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_vault.go @@ -36,19 +36,9 @@ func ParseVaultID(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - return &id, nil + return nil } // ValidateVaultID checks that 'input' can be parsed as a Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_replicationvaultsetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_replicationvaultsetting.go index 26e25501d51c..806eee37993d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_replicationvaultsetting.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_replicationvaultsetting.go @@ -38,23 +38,9 @@ func ParseReplicationVaultSettingID(input string) (*ReplicationVaultSettingId, e return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationVaultSettingId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) - } - - if id.ReplicationVaultSettingName, ok = parsed.Parsed["replicationVaultSettingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationVaultSettingName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseReplicationVaultSettingIDInsensitively(input string) (*ReplicationVaul return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationVaultSettingId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ReplicationVaultSettingId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - if id.ReplicationVaultSettingName, ok = parsed.Parsed["replicationVaultSettingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "replicationVaultSettingName", *parsed) + if id.ReplicationVaultSettingName, ok = input.Parsed["replicationVaultSettingName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "replicationVaultSettingName", input) } - return &id, nil + return nil } // ValidateReplicationVaultSettingID checks that 'input' can be parsed as a Replication Vault Setting ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_vault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_vault.go index accb6845a982..879a3742af7d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_vault.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_vault.go @@ -36,19 +36,9 @@ func ParseVaultID(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VaultId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VaultId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VaultName, ok = parsed.Parsed["vaultName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vaultName", *parsed) + if id.VaultName, ok = input.Parsed["vaultName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "vaultName", input) } - return &id, nil + return nil } // ValidateVaultID checks that 'input' can be parsed as a Vault ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/aad/id_accesspolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/aad/id_accesspolicy.go index cffea9db453d..cfe0f68c7446 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/aad/id_accesspolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/aad/id_accesspolicy.go @@ -38,23 +38,9 @@ func ParseAccessPolicyID(input string) (*AccessPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) - } - - if id.AccessPolicyName, ok = parsed.Parsed["accessPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAccessPolicyIDInsensitively(input string) (*AccessPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AccessPolicyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if id.RedisName, ok = input.Parsed["redisName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisName", input) } - if id.AccessPolicyName, ok = parsed.Parsed["accessPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessPolicyName", *parsed) + if id.AccessPolicyName, ok = input.Parsed["accessPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accessPolicyName", input) } - return &id, nil + return nil } // ValidateAccessPolicyID checks that 'input' can be parsed as a Access Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/aad/id_accesspolicyassignment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/aad/id_accesspolicyassignment.go index c3d4cd8bc390..7314beb871f6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/aad/id_accesspolicyassignment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/aad/id_accesspolicyassignment.go @@ -38,23 +38,9 @@ func ParseAccessPolicyAssignmentID(input string) (*AccessPolicyAssignmentId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessPolicyAssignmentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) - } - - if id.AccessPolicyAssignmentName, ok = parsed.Parsed["accessPolicyAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessPolicyAssignmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAccessPolicyAssignmentIDInsensitively(input string) (*AccessPolicyAssi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessPolicyAssignmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AccessPolicyAssignmentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if id.RedisName, ok = input.Parsed["redisName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisName", input) } - if id.AccessPolicyAssignmentName, ok = parsed.Parsed["accessPolicyAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessPolicyAssignmentName", *parsed) + if id.AccessPolicyAssignmentName, ok = input.Parsed["accessPolicyAssignmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accessPolicyAssignmentName", input) } - return &id, nil + return nil } // ValidateAccessPolicyAssignmentID checks that 'input' can be parsed as a Access Policy Assignment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/aad/id_redi.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/aad/id_redi.go index deefc7bac862..0879efbbfb52 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/aad/id_redi.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/aad/id_redi.go @@ -36,19 +36,9 @@ func ParseRediID(input string) (*RediId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RediId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RediId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RediId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if id.RedisName, ok = input.Parsed["redisName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisName", input) } - return &id, nil + return nil } // ValidateRediID checks that 'input' can be parsed as a Redi ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/firewallrules/id_firewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/firewallrules/id_firewallrule.go index a92dffc4cbf9..19aa6548ac14 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/firewallrules/id_firewallrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/firewallrules/id_firewallrule.go @@ -38,23 +38,9 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) - } - - if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FirewallRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if id.RedisName, ok = input.Parsed["redisName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisName", input) } - if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", *parsed) + if id.FirewallRuleName, ok = input.Parsed["firewallRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", input) } - return &id, nil + return nil } // ValidateFirewallRuleID checks that 'input' can be parsed as a Firewall Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/firewallrules/id_redi.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/firewallrules/id_redi.go index 90adc337e6eb..5f583373f30f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/firewallrules/id_redi.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/firewallrules/id_redi.go @@ -36,19 +36,9 @@ func ParseRediID(input string) (*RediId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RediId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RediId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RediId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if id.RedisName, ok = input.Parsed["redisName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisName", input) } - return &id, nil + return nil } // ValidateRediID checks that 'input' can be parsed as a Redi ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/patchschedules/id_redi.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/patchschedules/id_redi.go index 3a640ebcc7ae..44cdebe15dfa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/patchschedules/id_redi.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/patchschedules/id_redi.go @@ -36,19 +36,9 @@ func ParseRediID(input string) (*RediId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RediId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RediId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RediId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if id.RedisName, ok = input.Parsed["redisName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisName", input) } - return &id, nil + return nil } // ValidateRediID checks that 'input' can be parsed as a Redi ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/privateendpointconnections/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/privateendpointconnections/id_privateendpointconnection.go index 63dcecdbc451..12f9f1417e75 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/privateendpointconnections/id_privateendpointconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/privateendpointconnections/id_privateendpointconnection.go @@ -38,23 +38,9 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if id.RedisName, ok = input.Parsed["redisName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisName", input) } - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", input) } - return &id, nil + return nil } // ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/privateendpointconnections/id_redi.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/privateendpointconnections/id_redi.go index ee213d740a55..e285878e35a9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/privateendpointconnections/id_redi.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/privateendpointconnections/id_redi.go @@ -36,19 +36,9 @@ func ParseRediID(input string) (*RediId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RediId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RediId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RediId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if id.RedisName, ok = input.Parsed["redisName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisName", input) } - return &id, nil + return nil } // ValidateRediID checks that 'input' can be parsed as a Redi ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/privatelinkresources/id_redi.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/privatelinkresources/id_redi.go index f7f3511b26ed..4eb8643565bc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/privatelinkresources/id_redi.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/privatelinkresources/id_redi.go @@ -36,19 +36,9 @@ func ParseRediID(input string) (*RediId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RediId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RediId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RediId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if id.RedisName, ok = input.Parsed["redisName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisName", input) } - return &id, nil + return nil } // ValidateRediID checks that 'input' can be parsed as a Redi ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_accesspolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_accesspolicy.go index 511bbf9c56c2..33477cac8ce5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_accesspolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_accesspolicy.go @@ -38,23 +38,9 @@ func ParseAccessPolicyID(input string) (*AccessPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) - } - - if id.AccessPolicyName, ok = parsed.Parsed["accessPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAccessPolicyIDInsensitively(input string) (*AccessPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AccessPolicyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if id.RedisName, ok = input.Parsed["redisName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisName", input) } - if id.AccessPolicyName, ok = parsed.Parsed["accessPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessPolicyName", *parsed) + if id.AccessPolicyName, ok = input.Parsed["accessPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accessPolicyName", input) } - return &id, nil + return nil } // ValidateAccessPolicyID checks that 'input' can be parsed as a Access Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_accesspolicyassignment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_accesspolicyassignment.go index ee52831a8b01..6068730f0ce4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_accesspolicyassignment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_accesspolicyassignment.go @@ -38,23 +38,9 @@ func ParseAccessPolicyAssignmentID(input string) (*AccessPolicyAssignmentId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessPolicyAssignmentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) - } - - if id.AccessPolicyAssignmentName, ok = parsed.Parsed["accessPolicyAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessPolicyAssignmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAccessPolicyAssignmentIDInsensitively(input string) (*AccessPolicyAssi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessPolicyAssignmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AccessPolicyAssignmentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if id.RedisName, ok = input.Parsed["redisName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisName", input) } - if id.AccessPolicyAssignmentName, ok = parsed.Parsed["accessPolicyAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessPolicyAssignmentName", *parsed) + if id.AccessPolicyAssignmentName, ok = input.Parsed["accessPolicyAssignmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accessPolicyAssignmentName", input) } - return &id, nil + return nil } // ValidateAccessPolicyAssignmentID checks that 'input' can be parsed as a Access Policy Assignment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_firewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_firewallrule.go index 149f043538a4..ded86547cd39 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_firewallrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_firewallrule.go @@ -38,23 +38,9 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) - } - - if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FirewallRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FirewallRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if id.RedisName, ok = input.Parsed["redisName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisName", input) } - if id.FirewallRuleName, ok = parsed.Parsed["firewallRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", *parsed) + if id.FirewallRuleName, ok = input.Parsed["firewallRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", input) } - return &id, nil + return nil } // ValidateFirewallRuleID checks that 'input' can be parsed as a Firewall Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_linkedserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_linkedserver.go index ffc24ebb3277..730e770e6947 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_linkedserver.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_linkedserver.go @@ -38,23 +38,9 @@ func ParseLinkedServerID(input string) (*LinkedServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LinkedServerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) - } - - if id.LinkedServerName, ok = parsed.Parsed["linkedServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "linkedServerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLinkedServerIDInsensitively(input string) (*LinkedServerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LinkedServerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LinkedServerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if id.RedisName, ok = input.Parsed["redisName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisName", input) } - if id.LinkedServerName, ok = parsed.Parsed["linkedServerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "linkedServerName", *parsed) + if id.LinkedServerName, ok = input.Parsed["linkedServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "linkedServerName", input) } - return &id, nil + return nil } // ValidateLinkedServerID checks that 'input' can be parsed as a Linked Server ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_redi.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_redi.go index 1097358b4163..ea56d7792a26 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_redi.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis/id_redi.go @@ -36,19 +36,9 @@ func ParseRediID(input string) (*RediId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RediId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RediId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RediId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisName, ok = parsed.Parsed["redisName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisName", *parsed) + if id.RedisName, ok = input.Parsed["redisName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisName", input) } - return &id, nil + return nil } // ValidateRediID checks that 'input' can be parsed as a Redi ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-07-01/databases/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-07-01/databases/id_database.go index 19bbd6567281..21e4bea2d103 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-07-01/databases/id_database.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-07-01/databases/id_database.go @@ -38,23 +38,9 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisEnterpriseName, ok = parsed.Parsed["redisEnterpriseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool 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 = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisEnterpriseName, ok = parsed.Parsed["redisEnterpriseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", *parsed) + if id.RedisEnterpriseName, ok = input.Parsed["redisEnterpriseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - return &id, nil + return nil } // ValidateDatabaseID checks that 'input' can be parsed as a Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-07-01/databases/id_redisenterprise.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-07-01/databases/id_redisenterprise.go index 839c5f526e55..9326189d33a6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-07-01/databases/id_redisenterprise.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-07-01/databases/id_redisenterprise.go @@ -36,19 +36,9 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RedisEnterpriseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisEnterpriseName, ok = parsed.Parsed["redisEnterpriseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RedisEnterpriseId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RedisEnterpriseId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisEnterpriseName, ok = parsed.Parsed["redisEnterpriseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", *parsed) + if id.RedisEnterpriseName, ok = input.Parsed["redisEnterpriseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", input) } - return &id, nil + return nil } // ValidateRedisEnterpriseID checks that 'input' can be parsed as a Redis Enterprise ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/id_database.go index c5e7720c8184..066b2f009343 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/id_database.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/id_database.go @@ -38,23 +38,9 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisEnterpriseName, ok = parsed.Parsed["redisEnterpriseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool 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 = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisEnterpriseName, ok = parsed.Parsed["redisEnterpriseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", *parsed) + if id.RedisEnterpriseName, ok = input.Parsed["redisEnterpriseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - return &id, nil + return nil } // ValidateDatabaseID checks that 'input' can be parsed as a Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/id_redisenterprise.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/id_redisenterprise.go index 28197291defd..90b26f43be01 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/id_redisenterprise.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/id_redisenterprise.go @@ -36,19 +36,9 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RedisEnterpriseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RedisEnterpriseName, ok = parsed.Parsed["redisEnterpriseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RedisEnterpriseId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RedisEnterpriseId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.RedisEnterpriseName, ok = parsed.Parsed["redisEnterpriseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", *parsed) + if id.RedisEnterpriseName, ok = input.Parsed["redisEnterpriseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", input) } - return &id, nil + return nil } // ValidateRedisEnterpriseID checks that 'input' can be parsed as a Redis Enterprise ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/hybridconnections/id_hybridconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/hybridconnections/id_hybridconnection.go index 0dd0a312f30b..473b07e4866b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/hybridconnections/id_hybridconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/hybridconnections/id_hybridconnection.go @@ -38,23 +38,9 @@ func ParseHybridConnectionID(input string) (*HybridConnectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HybridConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.HybridConnectionName, ok = parsed.Parsed["hybridConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hybridConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseHybridConnectionIDInsensitively(input string) (*HybridConnectionId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HybridConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *HybridConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.HybridConnectionName, ok = parsed.Parsed["hybridConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hybridConnectionName", *parsed) + if id.HybridConnectionName, ok = input.Parsed["hybridConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hybridConnectionName", input) } - return &id, nil + return nil } // ValidateHybridConnectionID checks that 'input' can be parsed as a Hybrid Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/hybridconnections/id_hybridconnectionauthorizationrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/hybridconnections/id_hybridconnectionauthorizationrule.go index 69f70ac68766..2f7a9de16bea 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/hybridconnections/id_hybridconnectionauthorizationrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/hybridconnections/id_hybridconnectionauthorizationrule.go @@ -40,27 +40,9 @@ func ParseHybridConnectionAuthorizationRuleID(input string) (*HybridConnectionAu return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HybridConnectionAuthorizationRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.HybridConnectionName, ok = parsed.Parsed["hybridConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hybridConnectionName", *parsed) - } - - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseHybridConnectionAuthorizationRuleIDInsensitively(input string) (*Hybri return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HybridConnectionAuthorizationRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *HybridConnectionAuthorizationRuleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.HybridConnectionName, ok = parsed.Parsed["hybridConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hybridConnectionName", *parsed) + if id.HybridConnectionName, ok = input.Parsed["hybridConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hybridConnectionName", input) } - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if id.AuthorizationRuleName, ok = input.Parsed["authorizationRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", input) } - return &id, nil + return nil } // ValidateHybridConnectionAuthorizationRuleID checks that 'input' can be parsed as a Hybrid Connection Authorization Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/hybridconnections/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/hybridconnections/id_namespace.go index 4425ae0f7a22..937df43fba0a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/hybridconnections/id_namespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/hybridconnections/id_namespace.go @@ -36,19 +36,9 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - return &id, nil + return nil } // ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/namespaces/id_authorizationrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/namespaces/id_authorizationrule.go index 352941df666f..ade3efe8465d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/namespaces/id_authorizationrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/namespaces/id_authorizationrule.go @@ -38,23 +38,9 @@ func ParseAuthorizationRuleID(input string) (*AuthorizationRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AuthorizationRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAuthorizationRuleIDInsensitively(input string) (*AuthorizationRuleId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AuthorizationRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AuthorizationRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if id.AuthorizationRuleName, ok = input.Parsed["authorizationRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", input) } - return &id, nil + return nil } // ValidateAuthorizationRuleID checks that 'input' can be parsed as a Authorization Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/namespaces/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/namespaces/id_namespace.go index 0e384766a50d..9f6f076e48e1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/namespaces/id_namespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/namespaces/id_namespace.go @@ -36,19 +36,9 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - return &id, nil + return nil } // ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resourceconnector/2022-10-27/appliances/id_appliance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resourceconnector/2022-10-27/appliances/id_appliance.go index c8eb093b3a03..b2e2be1e6948 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resourceconnector/2022-10-27/appliances/id_appliance.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resourceconnector/2022-10-27/appliances/id_appliance.go @@ -36,19 +36,9 @@ func ParseApplianceID(input string) (*ApplianceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplianceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplianceName, ok = parsed.Parsed["applianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applianceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseApplianceIDInsensitively(input string) (*ApplianceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ApplianceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ApplianceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ApplianceName, ok = parsed.Parsed["applianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applianceName", *parsed) + if id.ApplianceName, ok = input.Parsed["applianceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applianceName", input) } - return &id, nil + return nil } // ValidateApplianceID checks that 'input' can be parsed as a Appliance ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resourceconnector/2022-10-27/appliances/id_upgradegraph.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resourceconnector/2022-10-27/appliances/id_upgradegraph.go index 02d88d9c97c1..c767441bc5ea 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resourceconnector/2022-10-27/appliances/id_upgradegraph.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resourceconnector/2022-10-27/appliances/id_upgradegraph.go @@ -38,23 +38,9 @@ func ParseUpgradeGraphID(input string) (*UpgradeGraphId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UpgradeGraphId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplianceName, ok = parsed.Parsed["applianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applianceName", *parsed) - } - - if id.UpgradeGraphName, ok = parsed.Parsed["upgradeGraphName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "upgradeGraphName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseUpgradeGraphIDInsensitively(input string) (*UpgradeGraphId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := UpgradeGraphId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *UpgradeGraphId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ApplianceName, ok = parsed.Parsed["applianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applianceName", *parsed) + if id.ApplianceName, ok = input.Parsed["applianceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "applianceName", input) } - if id.UpgradeGraphName, ok = parsed.Parsed["upgradeGraphName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "upgradeGraphName", *parsed) + if id.UpgradeGraphName, ok = input.Parsed["upgradeGraphName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "upgradeGraphName", input) } - return &id, nil + return nil } // ValidateUpgradeGraphID checks that 'input' can be parsed as a Upgrade Graph ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/managementlocks/id_lock.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/managementlocks/id_lock.go index b3f7f84f605b..f79253dd68b4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/managementlocks/id_lock.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/managementlocks/id_lock.go @@ -34,15 +34,9 @@ func ParseLockID(input string) (*LockId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LockId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LockName, ok = parsed.Parsed["lockName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "lockName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLockIDInsensitively(input string) (*LockId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LockId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LockId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LockName, ok = parsed.Parsed["lockName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "lockName", *parsed) + if id.LockName, ok = input.Parsed["lockName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "lockName", input) } - return &id, nil + return nil } // ValidateLockID checks that 'input' can be parsed as a Lock ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/managementlocks/id_providerlock.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/managementlocks/id_providerlock.go index 7ab2b52649c7..5749fc0593ab 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/managementlocks/id_providerlock.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/managementlocks/id_providerlock.go @@ -36,19 +36,9 @@ func ParseProviderLockID(input string) (*ProviderLockId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLockId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LockName, ok = parsed.Parsed["lockName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "lockName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseProviderLockIDInsensitively(input string) (*ProviderLockId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderLockId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ProviderLockId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.LockName, ok = parsed.Parsed["lockName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "lockName", *parsed) + if id.LockName, ok = input.Parsed["lockName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "lockName", input) } - return &id, nil + return nil } // ValidateProviderLockID checks that 'input' can be parsed as a Provider Lock ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/managementlocks/id_scopedlock.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/managementlocks/id_scopedlock.go index e196d67bfe86..5a6ac02bc68e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/managementlocks/id_scopedlock.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/managementlocks/id_scopedlock.go @@ -34,15 +34,9 @@ func ParseScopedLockID(input string) (*ScopedLockId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedLockId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.LockName, ok = parsed.Parsed["lockName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "lockName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedLockIDInsensitively(input string) (*ScopedLockId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedLockId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedLockId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.LockName, ok = parsed.Parsed["lockName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "lockName", *parsed) + if id.LockName, ok = input.Parsed["lockName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "lockName", input) } - return &id, nil + return nil } // ValidateScopedLockID checks that 'input' can be parsed as a Scoped Lock ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/privatelinkassociation/id_privatelinkassociation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/privatelinkassociation/id_privatelinkassociation.go index 4b93814fbc4c..516ba26750d4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/privatelinkassociation/id_privatelinkassociation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/privatelinkassociation/id_privatelinkassociation.go @@ -34,15 +34,9 @@ func ParsePrivateLinkAssociationID(input string) (*PrivateLinkAssociationId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateLinkAssociationId{} - - if id.GroupId, ok = parsed.Parsed["groupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "groupId", *parsed) - } - - if id.PlaId, ok = parsed.Parsed["plaId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "plaId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParsePrivateLinkAssociationIDInsensitively(input string) (*PrivateLinkAssoc return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateLinkAssociationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.GroupId, ok = parsed.Parsed["groupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "groupId", *parsed) + return &id, nil +} + +func (id *PrivateLinkAssociationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.GroupId, ok = input.Parsed["groupId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "groupId", input) } - if id.PlaId, ok = parsed.Parsed["plaId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "plaId", *parsed) + if id.PlaId, ok = input.Parsed["plaId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "plaId", input) } - return &id, nil + return nil } // ValidatePrivateLinkAssociationID checks that 'input' can be parsed as a Private Link Association ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/id_resourcemanagementprivatelink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/id_resourcemanagementprivatelink.go index c02c6039a451..144a94e4f160 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/id_resourcemanagementprivatelink.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/id_resourcemanagementprivatelink.go @@ -36,19 +36,9 @@ func ParseResourceManagementPrivateLinkID(input string) (*ResourceManagementPriv return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ResourceManagementPrivateLinkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ResourceManagementPrivateLinkName, ok = parsed.Parsed["resourceManagementPrivateLinkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceManagementPrivateLinkName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseResourceManagementPrivateLinkIDInsensitively(input string) (*ResourceM return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ResourceManagementPrivateLinkId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ResourceManagementPrivateLinkId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ResourceManagementPrivateLinkName, ok = parsed.Parsed["resourceManagementPrivateLinkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceManagementPrivateLinkName", *parsed) + if id.ResourceManagementPrivateLinkName, ok = input.Parsed["resourceManagementPrivateLinkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceManagementPrivateLinkName", input) } - return &id, nil + return nil } // ValidateResourceManagementPrivateLinkID checks that 'input' can be parsed as a Resource Management Private Link ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/id_deploymentscript.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/id_deploymentscript.go index 984a05168d43..b687535330b4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/id_deploymentscript.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts/id_deploymentscript.go @@ -36,19 +36,9 @@ func ParseDeploymentScriptID(input string) (*DeploymentScriptId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeploymentScriptId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DeploymentScriptName, ok = parsed.Parsed["deploymentScriptName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deploymentScriptName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDeploymentScriptIDInsensitively(input string) (*DeploymentScriptId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeploymentScriptId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DeploymentScriptId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DeploymentScriptName, ok = parsed.Parsed["deploymentScriptName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deploymentScriptName", *parsed) + if id.DeploymentScriptName, ok = input.Parsed["deploymentScriptName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "deploymentScriptName", input) } - return &id, nil + return nil } // ValidateDeploymentScriptID checks that 'input' can be parsed as a Deployment Script ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2021-07-01/features/id_feature.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2021-07-01/features/id_feature.go index 9023d1d55195..66724aafa93b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2021-07-01/features/id_feature.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2021-07-01/features/id_feature.go @@ -36,19 +36,9 @@ func ParseFeatureID(input string) (*FeatureId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FeatureId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ProviderName, ok = parsed.Parsed["providerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "providerName", *parsed) - } - - if id.FeatureName, ok = parsed.Parsed["featureName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "featureName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseFeatureIDInsensitively(input string) (*FeatureId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FeatureId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *FeatureId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ProviderName, ok = parsed.Parsed["providerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "providerName", *parsed) + if id.ProviderName, ok = input.Parsed["providerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "providerName", input) } - if id.FeatureName, ok = parsed.Parsed["featureName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "featureName", *parsed) + if id.FeatureName, ok = input.Parsed["featureName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "featureName", input) } - return &id, nil + return nil } // ValidateFeatureID checks that 'input' can be parsed as a Feature ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2021-07-01/features/id_providers2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2021-07-01/features/id_providers2.go index 7345618cb9be..789159676fab 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2021-07-01/features/id_providers2.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2021-07-01/features/id_providers2.go @@ -34,15 +34,9 @@ func ParseProviders2ID(input string) (*Providers2Id, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Providers2Id{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ProviderName, ok = parsed.Parsed["providerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "providerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseProviders2IDInsensitively(input string) (*Providers2Id, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Providers2Id{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *Providers2Id) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ProviderName, ok = parsed.Parsed["providerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "providerName", *parsed) + if id.ProviderName, ok = input.Parsed["providerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "providerName", input) } - return &id, nil + return nil } // ValidateProviders2ID checks that 'input' can be parsed as a Providers 2 ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecversions/id_builtintemplatespec.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecversions/id_builtintemplatespec.go index b15fe7c5a640..1581e7552996 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecversions/id_builtintemplatespec.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecversions/id_builtintemplatespec.go @@ -32,11 +32,9 @@ func ParseBuiltInTemplateSpecID(input string) (*BuiltInTemplateSpecId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BuiltInTemplateSpecId{} - - if id.BuiltInTemplateSpecName, ok = parsed.Parsed["builtInTemplateSpecName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "builtInTemplateSpecName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseBuiltInTemplateSpecIDInsensitively(input string) (*BuiltInTemplateSpec return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BuiltInTemplateSpecId{} - - if id.BuiltInTemplateSpecName, ok = parsed.Parsed["builtInTemplateSpecName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "builtInTemplateSpecName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *BuiltInTemplateSpecId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.BuiltInTemplateSpecName, ok = input.Parsed["builtInTemplateSpecName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "builtInTemplateSpecName", input) + } + + return nil +} + // ValidateBuiltInTemplateSpecID checks that 'input' can be parsed as a Built In Template Spec ID func ValidateBuiltInTemplateSpecID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecversions/id_templatespec.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecversions/id_templatespec.go index 3a93eb9eb3a5..c469944dcbc6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecversions/id_templatespec.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecversions/id_templatespec.go @@ -36,19 +36,9 @@ func ParseTemplateSpecID(input string) (*TemplateSpecId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TemplateSpecId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.TemplateSpecName, ok = parsed.Parsed["templateSpecName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "templateSpecName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseTemplateSpecIDInsensitively(input string) (*TemplateSpecId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TemplateSpecId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *TemplateSpecId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.TemplateSpecName, ok = parsed.Parsed["templateSpecName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "templateSpecName", *parsed) + if id.TemplateSpecName, ok = input.Parsed["templateSpecName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "templateSpecName", input) } - return &id, nil + return nil } // ValidateTemplateSpecID checks that 'input' can be parsed as a Template Spec ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecversions/id_templatespecversion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecversions/id_templatespecversion.go index 5fb30a5f89cc..31aeae60af2b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecversions/id_templatespecversion.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecversions/id_templatespecversion.go @@ -38,23 +38,9 @@ func ParseTemplateSpecVersionID(input string) (*TemplateSpecVersionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TemplateSpecVersionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.TemplateSpecName, ok = parsed.Parsed["templateSpecName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "templateSpecName", *parsed) - } - - if id.VersionName, ok = parsed.Parsed["versionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "versionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTemplateSpecVersionIDInsensitively(input string) (*TemplateSpecVersion return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TemplateSpecVersionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TemplateSpecVersionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.TemplateSpecName, ok = parsed.Parsed["templateSpecName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "templateSpecName", *parsed) + if id.TemplateSpecName, ok = input.Parsed["templateSpecName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "templateSpecName", input) } - if id.VersionName, ok = parsed.Parsed["versionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "versionName", *parsed) + if id.VersionName, ok = input.Parsed["versionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "versionName", input) } - return &id, nil + return nil } // ValidateTemplateSpecVersionID checks that 'input' can be parsed as a Template Spec Version ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecversions/id_version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecversions/id_version.go index 64b6b101dcc1..31d2b8426fa6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecversions/id_version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecversions/id_version.go @@ -34,15 +34,9 @@ func ParseVersionID(input string) (*VersionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VersionId{} - - if id.BuiltInTemplateSpecName, ok = parsed.Parsed["builtInTemplateSpecName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "builtInTemplateSpecName", *parsed) - } - - if id.VersionName, ok = parsed.Parsed["versionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "versionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VersionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.BuiltInTemplateSpecName, ok = parsed.Parsed["builtInTemplateSpecName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "builtInTemplateSpecName", *parsed) + return &id, nil +} + +func (id *VersionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.BuiltInTemplateSpecName, ok = input.Parsed["builtInTemplateSpecName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "builtInTemplateSpecName", input) } - if id.VersionName, ok = parsed.Parsed["versionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "versionName", *parsed) + if id.VersionName, ok = input.Parsed["versionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "versionName", input) } - return &id, nil + return nil } // ValidateVersionID checks that 'input' can be parsed as a Version ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-06-01/policyassignments/id_policyassignmentid.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-06-01/policyassignments/id_policyassignmentid.go index 08be41779d3a..ff9fc39e80c3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-06-01/policyassignments/id_policyassignmentid.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-06-01/policyassignments/id_policyassignmentid.go @@ -32,11 +32,9 @@ func ParsePolicyAssignmentIdID(input string) (*PolicyAssignmentIdId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PolicyAssignmentIdId{} - - if id.PolicyAssignmentId, ok = parsed.Parsed["policyAssignmentId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "policyAssignmentId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParsePolicyAssignmentIdIDInsensitively(input string) (*PolicyAssignmentIdId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PolicyAssignmentIdId{} - - if id.PolicyAssignmentId, ok = parsed.Parsed["policyAssignmentId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "policyAssignmentId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *PolicyAssignmentIdId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.PolicyAssignmentId, ok = input.Parsed["policyAssignmentId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "policyAssignmentId", input) + } + + return nil +} + // ValidatePolicyAssignmentIdID checks that 'input' can be parsed as a Policy Assignment Id ID func ValidatePolicyAssignmentIdID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-06-01/policyassignments/id_scopedpolicyassignment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-06-01/policyassignments/id_scopedpolicyassignment.go index 3f3e0c845009..da25eae20ddd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-06-01/policyassignments/id_scopedpolicyassignment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-06-01/policyassignments/id_scopedpolicyassignment.go @@ -34,15 +34,9 @@ func ParseScopedPolicyAssignmentID(input string) (*ScopedPolicyAssignmentId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedPolicyAssignmentId{} - - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) - } - - if id.PolicyAssignmentName, ok = parsed.Parsed["policyAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "policyAssignmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedPolicyAssignmentIDInsensitively(input string) (*ScopedPolicyAssi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedPolicyAssignmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.Scope, ok = parsed.Parsed["scope"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scope", *parsed) + return &id, nil +} + +func (id *ScopedPolicyAssignmentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.Scope, ok = input.Parsed["scope"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "scope", input) } - if id.PolicyAssignmentName, ok = parsed.Parsed["policyAssignmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "policyAssignmentName", *parsed) + if id.PolicyAssignmentName, ok = input.Parsed["policyAssignmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "policyAssignmentName", input) } - return &id, nil + return nil } // ValidateScopedPolicyAssignmentID checks that 'input' can be parsed as a Scoped Policy Assignment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/providers/id_provider.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/providers/id_provider.go index 07ca7ca6019f..0b86127bf7b2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/providers/id_provider.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/providers/id_provider.go @@ -32,11 +32,9 @@ func ParseProviderID(input string) (*ProviderId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderId{} - - if id.ProviderName, ok = parsed.Parsed["providerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "providerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseProviderIDInsensitively(input string) (*ProviderId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderId{} - - if id.ProviderName, ok = parsed.Parsed["providerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "providerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *ProviderId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ProviderName, ok = input.Parsed["providerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "providerName", input) + } + + return nil +} + // ValidateProviderID checks that 'input' can be parsed as a Provider ID func ValidateProviderID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/providers/id_providers2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/providers/id_providers2.go index 58c356b00ef6..af2005474ea6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/providers/id_providers2.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/providers/id_providers2.go @@ -34,15 +34,9 @@ func ParseProviders2ID(input string) (*Providers2Id, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Providers2Id{} - - if id.GroupId, ok = parsed.Parsed["groupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "groupId", *parsed) - } - - if id.ProviderName, ok = parsed.Parsed["providerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "providerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseProviders2IDInsensitively(input string) (*Providers2Id, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Providers2Id{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.GroupId, ok = parsed.Parsed["groupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "groupId", *parsed) + return &id, nil +} + +func (id *Providers2Id) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.GroupId, ok = input.Parsed["groupId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "groupId", input) } - if id.ProviderName, ok = parsed.Parsed["providerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "providerName", *parsed) + if id.ProviderName, ok = input.Parsed["providerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "providerName", input) } - return &id, nil + return nil } // ValidateProviders2ID checks that 'input' can be parsed as a Providers 2 ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/providers/id_subscriptionprovider.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/providers/id_subscriptionprovider.go index 17226acbe6ea..6a3dfa8cc748 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/providers/id_subscriptionprovider.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/providers/id_subscriptionprovider.go @@ -34,15 +34,9 @@ func ParseSubscriptionProviderID(input string) (*SubscriptionProviderId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SubscriptionProviderId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ProviderName, ok = parsed.Parsed["providerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "providerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseSubscriptionProviderIDInsensitively(input string) (*SubscriptionProvid return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SubscriptionProviderId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *SubscriptionProviderId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ProviderName, ok = parsed.Parsed["providerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "providerName", *parsed) + if id.ProviderName, ok = input.Parsed["providerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "providerName", input) } - return &id, nil + return nil } // ValidateSubscriptionProviderID checks that 'input' can be parsed as a Subscription Provider ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2022-09-01/services/id_searchservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2022-09-01/services/id_searchservice.go index 9b7242e2895f..d54a4687b898 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2022-09-01/services/id_searchservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2022-09-01/services/id_searchservice.go @@ -36,19 +36,9 @@ func ParseSearchServiceID(input string) (*SearchServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SearchServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSearchServiceIDInsensitively(input string) (*SearchServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SearchServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SearchServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) + if id.SearchServiceName, ok = input.Parsed["searchServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", input) } - return &id, nil + return nil } // ValidateSearchServiceID checks that 'input' can be parsed as a Search Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/adminkeys/id_keykind.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/adminkeys/id_keykind.go index f5d2c5335cdc..b76846ebd533 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/adminkeys/id_keykind.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/adminkeys/id_keykind.go @@ -38,31 +38,9 @@ func ParseKeyKindID(input string) (*KeyKindId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := KeyKindId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) - } - - if v, ok := parsed.Parsed["keyKind"]; true { - if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "keyKind", *parsed) - } - - keyKind, err := parseAdminKeyKind(v) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) - } - id.KeyKind = *keyKind + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -77,34 +55,42 @@ func ParseKeyKindIDInsensitively(input string) (*KeyKindId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := KeyKindId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *KeyKindId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) + if id.SearchServiceName, ok = input.Parsed["searchServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", input) } - if v, ok := parsed.Parsed["keyKind"]; true { + if v, ok := input.Parsed["keyKind"]; true { if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "keyKind", *parsed) + return resourceids.NewSegmentNotSpecifiedError(id, "keyKind", input) } keyKind, err := parseAdminKeyKind(v) if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) + return fmt.Errorf("parsing %q: %+v", v, err) } id.KeyKind = *keyKind } - return &id, nil + return nil } // ValidateKeyKindID checks that 'input' can be parsed as a Key Kind ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/adminkeys/id_searchservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/adminkeys/id_searchservice.go index c62719ecaa4c..fa5b971e776f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/adminkeys/id_searchservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/adminkeys/id_searchservice.go @@ -36,19 +36,9 @@ func ParseSearchServiceID(input string) (*SearchServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SearchServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSearchServiceIDInsensitively(input string) (*SearchServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SearchServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SearchServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) + if id.SearchServiceName, ok = input.Parsed["searchServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", input) } - return &id, nil + return nil } // ValidateSearchServiceID checks that 'input' can be parsed as a Search Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/querykeys/id_createquerykey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/querykeys/id_createquerykey.go index 5b47f8aad8c1..5ee1bec00532 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/querykeys/id_createquerykey.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/querykeys/id_createquerykey.go @@ -38,23 +38,9 @@ func ParseCreateQueryKeyID(input string) (*CreateQueryKeyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CreateQueryKeyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) - } - - if id.CreateQueryKeyName, ok = parsed.Parsed["createQueryKeyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "createQueryKeyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCreateQueryKeyIDInsensitively(input string) (*CreateQueryKeyId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CreateQueryKeyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CreateQueryKeyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) + if id.SearchServiceName, ok = input.Parsed["searchServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", input) } - if id.CreateQueryKeyName, ok = parsed.Parsed["createQueryKeyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "createQueryKeyName", *parsed) + if id.CreateQueryKeyName, ok = input.Parsed["createQueryKeyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "createQueryKeyName", input) } - return &id, nil + return nil } // ValidateCreateQueryKeyID checks that 'input' can be parsed as a Create Query Key ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/querykeys/id_deletequerykey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/querykeys/id_deletequerykey.go index cbd94213da6e..080ddfd6d46a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/querykeys/id_deletequerykey.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/querykeys/id_deletequerykey.go @@ -38,23 +38,9 @@ func ParseDeleteQueryKeyID(input string) (*DeleteQueryKeyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeleteQueryKeyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) - } - - if id.DeleteQueryKeyName, ok = parsed.Parsed["deleteQueryKeyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deleteQueryKeyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDeleteQueryKeyIDInsensitively(input string) (*DeleteQueryKeyId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeleteQueryKeyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DeleteQueryKeyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) + if id.SearchServiceName, ok = input.Parsed["searchServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", input) } - if id.DeleteQueryKeyName, ok = parsed.Parsed["deleteQueryKeyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deleteQueryKeyName", *parsed) + if id.DeleteQueryKeyName, ok = input.Parsed["deleteQueryKeyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "deleteQueryKeyName", input) } - return &id, nil + return nil } // ValidateDeleteQueryKeyID checks that 'input' can be parsed as a Delete Query Key ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/querykeys/id_searchservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/querykeys/id_searchservice.go index 20baa3be4160..c37091c17ae3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/querykeys/id_searchservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/querykeys/id_searchservice.go @@ -36,19 +36,9 @@ func ParseSearchServiceID(input string) (*SearchServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SearchServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSearchServiceIDInsensitively(input string) (*SearchServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SearchServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SearchServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) + if id.SearchServiceName, ok = input.Parsed["searchServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", input) } - return &id, nil + return nil } // ValidateSearchServiceID checks that 'input' can be parsed as a Search Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/services/id_searchservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/services/id_searchservice.go index 9b7242e2895f..d54a4687b898 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/services/id_searchservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/services/id_searchservice.go @@ -36,19 +36,9 @@ func ParseSearchServiceID(input string) (*SearchServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SearchServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSearchServiceIDInsensitively(input string) (*SearchServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SearchServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SearchServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) + if id.SearchServiceName, ok = input.Parsed["searchServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", input) } - return &id, nil + return nil } // ValidateSearchServiceID checks that 'input' can be parsed as a Search Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/sharedprivatelinkresources/id_searchservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/sharedprivatelinkresources/id_searchservice.go index c017137b6597..e06109815241 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/sharedprivatelinkresources/id_searchservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/sharedprivatelinkresources/id_searchservice.go @@ -36,19 +36,9 @@ func ParseSearchServiceID(input string) (*SearchServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SearchServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSearchServiceIDInsensitively(input string) (*SearchServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SearchServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SearchServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) + if id.SearchServiceName, ok = input.Parsed["searchServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", input) } - return &id, nil + return nil } // ValidateSearchServiceID checks that 'input' can be parsed as a Search Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/sharedprivatelinkresources/id_sharedprivatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/sharedprivatelinkresources/id_sharedprivatelinkresource.go index c2ea84a8c566..6b8edeb61645 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/sharedprivatelinkresources/id_sharedprivatelinkresource.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/sharedprivatelinkresources/id_sharedprivatelinkresource.go @@ -38,23 +38,9 @@ func ParseSharedPrivateLinkResourceID(input string) (*SharedPrivateLinkResourceI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SharedPrivateLinkResourceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) - } - - if id.SharedPrivateLinkResourceName, ok = parsed.Parsed["sharedPrivateLinkResourceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sharedPrivateLinkResourceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSharedPrivateLinkResourceIDInsensitively(input string) (*SharedPrivate return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SharedPrivateLinkResourceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SharedPrivateLinkResourceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SearchServiceName, ok = parsed.Parsed["searchServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", *parsed) + if id.SearchServiceName, ok = input.Parsed["searchServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "searchServiceName", input) } - if id.SharedPrivateLinkResourceName, ok = parsed.Parsed["sharedPrivateLinkResourceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sharedPrivateLinkResourceName", *parsed) + if id.SharedPrivateLinkResourceName, ok = input.Parsed["sharedPrivateLinkResourceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sharedPrivateLinkResourceName", input) } - return &id, nil + return nil } // ValidateSharedPrivateLinkResourceID checks that 'input' can be parsed as a Shared Private Link Resource ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/security/2021-06-01/assessmentsmetadata/id_assessmentmetadata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/security/2021-06-01/assessmentsmetadata/id_assessmentmetadata.go index b5fa77a50d3b..6445a34e05ec 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/security/2021-06-01/assessmentsmetadata/id_assessmentmetadata.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/security/2021-06-01/assessmentsmetadata/id_assessmentmetadata.go @@ -32,11 +32,9 @@ func ParseAssessmentMetadataID(input string) (*AssessmentMetadataId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AssessmentMetadataId{} - - if id.AssessmentMetadataName, ok = parsed.Parsed["assessmentMetadataName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assessmentMetadataName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseAssessmentMetadataIDInsensitively(input string) (*AssessmentMetadataId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AssessmentMetadataId{} - - if id.AssessmentMetadataName, ok = parsed.Parsed["assessmentMetadataName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assessmentMetadataName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *AssessmentMetadataId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.AssessmentMetadataName, ok = input.Parsed["assessmentMetadataName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "assessmentMetadataName", input) + } + + return nil +} + // ValidateAssessmentMetadataID checks that 'input' can be parsed as a Assessment Metadata ID func ValidateAssessmentMetadataID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/security/2021-06-01/assessmentsmetadata/id_providerassessmentmetadata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/security/2021-06-01/assessmentsmetadata/id_providerassessmentmetadata.go index e0957f9874e5..1aebf390200d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/security/2021-06-01/assessmentsmetadata/id_providerassessmentmetadata.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/security/2021-06-01/assessmentsmetadata/id_providerassessmentmetadata.go @@ -34,15 +34,9 @@ func ParseProviderAssessmentMetadataID(input string) (*ProviderAssessmentMetadat return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderAssessmentMetadataId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.AssessmentMetadataName, ok = parsed.Parsed["assessmentMetadataName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assessmentMetadataName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseProviderAssessmentMetadataIDInsensitively(input string) (*ProviderAsse return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderAssessmentMetadataId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ProviderAssessmentMetadataId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.AssessmentMetadataName, ok = parsed.Parsed["assessmentMetadataName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "assessmentMetadataName", *parsed) + if id.AssessmentMetadataName, ok = input.Parsed["assessmentMetadataName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "assessmentMetadataName", input) } - return &id, nil + return nil } // ValidateProviderAssessmentMetadataID checks that 'input' can be parsed as a Provider Assessment Metadata ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/security/2023-01-01/pricings/id_pricing.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/security/2023-01-01/pricings/id_pricing.go index 7ad6d7986ca1..a13cccd5def9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/security/2023-01-01/pricings/id_pricing.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/security/2023-01-01/pricings/id_pricing.go @@ -34,15 +34,9 @@ func ParsePricingID(input string) (*PricingId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PricingId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.PricingName, ok = parsed.Parsed["pricingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "pricingName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParsePricingIDInsensitively(input string) (*PricingId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PricingId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *PricingId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.PricingName, ok = parsed.Parsed["pricingName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "pricingName", *parsed) + if id.PricingName, ok = input.Parsed["pricingName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "pricingName", input) } - return &id, nil + return nil } // ValidatePricingID checks that 'input' can be parsed as a Pricing ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/alertrules/id_alertrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/alertrules/id_alertrule.go index f7731588a47c..5dcc3bbe13f4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/alertrules/id_alertrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/alertrules/id_alertrule.go @@ -38,23 +38,9 @@ func ParseAlertRuleID(input string) (*AlertRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AlertRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.RuleId, ok = parsed.Parsed["ruleId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAlertRuleIDInsensitively(input string) (*AlertRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AlertRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AlertRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.RuleId, ok = parsed.Parsed["ruleId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleId", *parsed) + if id.RuleId, ok = input.Parsed["ruleId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ruleId", input) } - return &id, nil + return nil } // ValidateAlertRuleID checks that 'input' can be parsed as a Alert Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/alertrules/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/alertrules/id_workspace.go index 0baa3a56a8a5..185da699926f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/alertrules/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/alertrules/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/automationrules/id_automationrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/automationrules/id_automationrule.go index f69f6c204f24..1364c18fcfd3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/automationrules/id_automationrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/automationrules/id_automationrule.go @@ -38,23 +38,9 @@ func ParseAutomationRuleID(input string) (*AutomationRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.AutomationRuleId, ok = parsed.Parsed["automationRuleId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationRuleId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAutomationRuleIDInsensitively(input string) (*AutomationRuleId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AutomationRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AutomationRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.AutomationRuleId, ok = parsed.Parsed["automationRuleId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "automationRuleId", *parsed) + if id.AutomationRuleId, ok = input.Parsed["automationRuleId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "automationRuleId", input) } - return &id, nil + return nil } // ValidateAutomationRuleID checks that 'input' can be parsed as a Automation Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/automationrules/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/automationrules/id_workspace.go index 70e4df1da200..587424efc391 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/automationrules/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/automationrules/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/metadata/id_metadata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/metadata/id_metadata.go index 63879af6a87b..b6841ed239a6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/metadata/id_metadata.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/metadata/id_metadata.go @@ -38,23 +38,9 @@ func ParseMetadataID(input string) (*MetadataId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MetadataId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.MetadataName, ok = parsed.Parsed["metadataName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "metadataName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseMetadataIDInsensitively(input string) (*MetadataId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := MetadataId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MetadataId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.MetadataName, ok = parsed.Parsed["metadataName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "metadataName", *parsed) + if id.MetadataName, ok = input.Parsed["metadataName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "metadataName", input) } - return &id, nil + return nil } // ValidateMetadataID checks that 'input' can be parsed as a Metadata ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/metadata/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/metadata/id_workspace.go index d3a3931c2b9e..7270d5a38cee 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/metadata/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/metadata/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/id_onboardingstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/id_onboardingstate.go index 2b3c490aeed3..b35b4a4b9506 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/id_onboardingstate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/id_onboardingstate.go @@ -38,23 +38,9 @@ func ParseOnboardingStateID(input string) (*OnboardingStateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OnboardingStateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.OnboardingStateName, ok = parsed.Parsed["onboardingStateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "onboardingStateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseOnboardingStateIDInsensitively(input string) (*OnboardingStateId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OnboardingStateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *OnboardingStateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.OnboardingStateName, ok = parsed.Parsed["onboardingStateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "onboardingStateName", *parsed) + if id.OnboardingStateName, ok = input.Parsed["onboardingStateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "onboardingStateName", input) } - return &id, nil + return nil } // ValidateOnboardingStateID checks that 'input' can be parsed as a Onboarding State ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/id_workspace.go index 62eb4e2432ac..de0041001bd2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlistitems/id_watchlist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlistitems/id_watchlist.go index c2ad57d7be48..3c33d154f640 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlistitems/id_watchlist.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlistitems/id_watchlist.go @@ -38,23 +38,9 @@ func ParseWatchlistID(input string) (*WatchlistId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WatchlistId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.WatchlistAlias, ok = parsed.Parsed["watchlistAlias"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "watchlistAlias", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseWatchlistIDInsensitively(input string) (*WatchlistId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WatchlistId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *WatchlistId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.WatchlistAlias, ok = parsed.Parsed["watchlistAlias"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "watchlistAlias", *parsed) + if id.WatchlistAlias, ok = input.Parsed["watchlistAlias"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "watchlistAlias", input) } - return &id, nil + return nil } // ValidateWatchlistID checks that 'input' can be parsed as a Watchlist ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlistitems/id_watchlistitem.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlistitems/id_watchlistitem.go index d816793fdbb0..25bc13474965 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlistitems/id_watchlistitem.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlistitems/id_watchlistitem.go @@ -40,27 +40,9 @@ func ParseWatchlistItemID(input string) (*WatchlistItemId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WatchlistItemId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.WatchlistAlias, ok = parsed.Parsed["watchlistAlias"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "watchlistAlias", *parsed) - } - - if id.WatchlistItemId, ok = parsed.Parsed["watchlistItemId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "watchlistItemId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseWatchlistItemIDInsensitively(input string) (*WatchlistItemId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WatchlistItemId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *WatchlistItemId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.WatchlistAlias, ok = parsed.Parsed["watchlistAlias"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "watchlistAlias", *parsed) + if id.WatchlistAlias, ok = input.Parsed["watchlistAlias"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "watchlistAlias", input) } - if id.WatchlistItemId, ok = parsed.Parsed["watchlistItemId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "watchlistItemId", *parsed) + if id.WatchlistItemId, ok = input.Parsed["watchlistItemId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "watchlistItemId", input) } - return &id, nil + return nil } // ValidateWatchlistItemID checks that 'input' can be parsed as a Watchlist Item ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlists/id_watchlist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlists/id_watchlist.go index 7d34645a0671..6a04c91dc05f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlists/id_watchlist.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlists/id_watchlist.go @@ -38,23 +38,9 @@ func ParseWatchlistID(input string) (*WatchlistId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WatchlistId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) - } - - if id.WatchlistAlias, ok = parsed.Parsed["watchlistAlias"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "watchlistAlias", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseWatchlistIDInsensitively(input string) (*WatchlistId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WatchlistId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *WatchlistId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - if id.WatchlistAlias, ok = parsed.Parsed["watchlistAlias"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "watchlistAlias", *parsed) + if id.WatchlistAlias, ok = input.Parsed["watchlistAlias"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "watchlistAlias", input) } - return &id, nil + return nil } // ValidateWatchlistID checks that 'input' can be parsed as a Watchlist ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlists/id_workspace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlists/id_workspace.go index 488ed03ba59b..0b9bb49429f2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlists/id_workspace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlists/id_workspace.go @@ -36,19 +36,9 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WorkspaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WorkspaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WorkspaceName, ok = parsed.Parsed["workspaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", *parsed) + if id.WorkspaceName, ok = input.Parsed["workspaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "workspaceName", input) } - return &id, nil + return nil } // ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go index a92302146e1f..cf12ba2d6a84 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go @@ -38,23 +38,9 @@ func ParseDisasterRecoveryConfigID(input string) (*DisasterRecoveryConfigId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DisasterRecoveryConfigId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.DisasterRecoveryConfigName, ok = parsed.Parsed["disasterRecoveryConfigName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "disasterRecoveryConfigName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseDisasterRecoveryConfigIDInsensitively(input string) (*DisasterRecovery return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DisasterRecoveryConfigId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DisasterRecoveryConfigId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.DisasterRecoveryConfigName, ok = parsed.Parsed["disasterRecoveryConfigName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "disasterRecoveryConfigName", *parsed) + if id.DisasterRecoveryConfigName, ok = input.Parsed["disasterRecoveryConfigName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "disasterRecoveryConfigName", input) } - return &id, nil + return nil } // ValidateDisasterRecoveryConfigID checks that 'input' can be parsed as a Disaster Recovery Config ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go index 303919d360f7..3d722d5c40a0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go @@ -40,27 +40,9 @@ func ParseDisasterRecoveryConfigAuthorizationRuleID(input string) (*DisasterReco return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DisasterRecoveryConfigAuthorizationRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.DisasterRecoveryConfigName, ok = parsed.Parsed["disasterRecoveryConfigName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "disasterRecoveryConfigName", *parsed) - } - - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseDisasterRecoveryConfigAuthorizationRuleIDInsensitively(input string) ( return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DisasterRecoveryConfigAuthorizationRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *DisasterRecoveryConfigAuthorizationRuleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.DisasterRecoveryConfigName, ok = parsed.Parsed["disasterRecoveryConfigName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "disasterRecoveryConfigName", *parsed) + if id.DisasterRecoveryConfigName, ok = input.Parsed["disasterRecoveryConfigName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "disasterRecoveryConfigName", input) } - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if id.AuthorizationRuleName, ok = input.Parsed["authorizationRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", input) } - return &id, nil + return nil } // ValidateDisasterRecoveryConfigAuthorizationRuleID checks that 'input' can be parsed as a Disaster Recovery Config Authorization Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_namespace.go index 4d69695f309e..33cc170a8399 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_namespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_namespace.go @@ -36,19 +36,9 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - return &id, nil + return nil } // ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/id_authorizationrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/id_authorizationrule.go index 64322aa236d2..681f4ec82321 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/id_authorizationrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/id_authorizationrule.go @@ -38,23 +38,9 @@ func ParseAuthorizationRuleID(input string) (*AuthorizationRuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AuthorizationRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAuthorizationRuleIDInsensitively(input string) (*AuthorizationRuleId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AuthorizationRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AuthorizationRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if id.AuthorizationRuleName, ok = input.Parsed["authorizationRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", input) } - return &id, nil + return nil } // ValidateAuthorizationRuleID checks that 'input' can be parsed as a Authorization Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/id_namespace.go index 9b51ad2b6e6a..8658cd576eaf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/id_namespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/id_namespace.go @@ -36,19 +36,9 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - return &id, nil + return nil } // ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/id_namespace.go index 67a0908584bf..255b1b339e51 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/id_namespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/id_namespace.go @@ -36,19 +36,9 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - return &id, nil + return nil } // ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/id_queue.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/id_queue.go index 848018d12dbf..34b652098a28 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/id_queue.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues/id_queue.go @@ -38,23 +38,9 @@ func ParseQueueID(input string) (*QueueId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := QueueId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.QueueName, ok = parsed.Parsed["queueName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "queueName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseQueueIDInsensitively(input string) (*QueueId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := QueueId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *QueueId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.QueueName, ok = parsed.Parsed["queueName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "queueName", *parsed) + if id.QueueName, ok = input.Parsed["queueName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "queueName", input) } - return &id, nil + return nil } // ValidateQueueID checks that 'input' can be parsed as a Queue ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/id_queue.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/id_queue.go index 7e7b1def535e..de1e9a946d8f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/id_queue.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/id_queue.go @@ -38,23 +38,9 @@ func ParseQueueID(input string) (*QueueId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := QueueId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.QueueName, ok = parsed.Parsed["queueName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "queueName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseQueueIDInsensitively(input string) (*QueueId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := QueueId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *QueueId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.QueueName, ok = parsed.Parsed["queueName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "queueName", *parsed) + if id.QueueName, ok = input.Parsed["queueName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "queueName", input) } - return &id, nil + return nil } // ValidateQueueID checks that 'input' can be parsed as a Queue ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/id_queueauthorizationrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/id_queueauthorizationrule.go index 2c5d813f3551..d0b0d85e535d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/id_queueauthorizationrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/id_queueauthorizationrule.go @@ -40,27 +40,9 @@ func ParseQueueAuthorizationRuleID(input string) (*QueueAuthorizationRuleId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := QueueAuthorizationRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.QueueName, ok = parsed.Parsed["queueName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "queueName", *parsed) - } - - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseQueueAuthorizationRuleIDInsensitively(input string) (*QueueAuthorizati return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := QueueAuthorizationRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *QueueAuthorizationRuleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.QueueName, ok = parsed.Parsed["queueName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "queueName", *parsed) + if id.QueueName, ok = input.Parsed["queueName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "queueName", input) } - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if id.AuthorizationRuleName, ok = input.Parsed["authorizationRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", input) } - return &id, nil + return nil } // ValidateQueueAuthorizationRuleID checks that 'input' can be parsed as a Queue Authorization Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/id_rule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/id_rule.go index 75b5c4685c29..be243db643e4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/id_rule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/id_rule.go @@ -42,31 +42,9 @@ func ParseRuleID(input string) (*RuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) - } - - if id.SubscriptionName, ok = parsed.Parsed["subscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", *parsed) - } - - if id.RuleName, ok = parsed.Parsed["ruleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RuleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if id.TopicName, ok = input.Parsed["topicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicName", input) } - if id.SubscriptionName, ok = parsed.Parsed["subscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", *parsed) + if id.SubscriptionName, ok = input.Parsed["subscriptionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", input) } - if id.RuleName, ok = parsed.Parsed["ruleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleName", *parsed) + if id.RuleName, ok = input.Parsed["ruleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ruleName", input) } - return &id, nil + return nil } // ValidateRuleID checks that 'input' can be parsed as a Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/id_subscriptions2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/id_subscriptions2.go index 82ab917e49f3..0bfa80e29764 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/id_subscriptions2.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules/id_subscriptions2.go @@ -40,27 +40,9 @@ func ParseSubscriptions2ID(input string) (*Subscriptions2Id, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Subscriptions2Id{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) - } - - if id.SubscriptionName, ok = parsed.Parsed["subscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseSubscriptions2IDInsensitively(input string) (*Subscriptions2Id, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Subscriptions2Id{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *Subscriptions2Id) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if id.TopicName, ok = input.Parsed["topicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicName", input) } - if id.SubscriptionName, ok = parsed.Parsed["subscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", *parsed) + if id.SubscriptionName, ok = input.Parsed["subscriptionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", input) } - return &id, nil + return nil } // ValidateSubscriptions2ID checks that 'input' can be parsed as a Subscriptions 2 ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_rule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_rule.go index 0b6ed31a168f..08f779cc463e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_rule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_rule.go @@ -42,31 +42,9 @@ func ParseRuleID(input string) (*RuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) - } - - if id.SubscriptionName, ok = parsed.Parsed["subscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", *parsed) - } - - if id.RuleName, ok = parsed.Parsed["ruleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -81,34 +59,42 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *RuleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if id.TopicName, ok = input.Parsed["topicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicName", input) } - if id.SubscriptionName, ok = parsed.Parsed["subscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", *parsed) + if id.SubscriptionName, ok = input.Parsed["subscriptionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", input) } - if id.RuleName, ok = parsed.Parsed["ruleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleName", *parsed) + if id.RuleName, ok = input.Parsed["ruleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ruleName", input) } - return &id, nil + return nil } // ValidateRuleID checks that 'input' can be parsed as a Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_subscriptions2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_subscriptions2.go index 593edab62035..4b8c9e658bae 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_subscriptions2.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_subscriptions2.go @@ -40,27 +40,9 @@ func ParseSubscriptions2ID(input string) (*Subscriptions2Id, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Subscriptions2Id{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) - } - - if id.SubscriptionName, ok = parsed.Parsed["subscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseSubscriptions2IDInsensitively(input string) (*Subscriptions2Id, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := Subscriptions2Id{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *Subscriptions2Id) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if id.TopicName, ok = input.Parsed["topicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicName", input) } - if id.SubscriptionName, ok = parsed.Parsed["subscriptionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", *parsed) + if id.SubscriptionName, ok = input.Parsed["subscriptionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionName", input) } - return &id, nil + return nil } // ValidateSubscriptions2ID checks that 'input' can be parsed as a Subscriptions 2 ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_topic.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_topic.go index 221ab83019f4..d5d7209b582c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_topic.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_topic.go @@ -38,23 +38,9 @@ func ParseTopicID(input string) (*TopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TopicId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TopicId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TopicId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if id.TopicName, ok = input.Parsed["topicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicName", input) } - return &id, nil + return nil } // ValidateTopicID checks that 'input' can be parsed as a Topic ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/id_namespace.go index 87dc792fd92f..e495261108ef 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/id_namespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/id_namespace.go @@ -36,19 +36,9 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - return &id, nil + return nil } // ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/id_topic.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/id_topic.go index a3b6c9326185..bba4a71f8a36 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/id_topic.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics/id_topic.go @@ -38,23 +38,9 @@ func ParseTopicID(input string) (*TopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TopicId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TopicId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TopicId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if id.TopicName, ok = input.Parsed["topicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicName", input) } - return &id, nil + return nil } // ValidateTopicID checks that 'input' can be parsed as a Topic ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/id_topic.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/id_topic.go index 953b74da019c..f5fbf6da299c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/id_topic.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/id_topic.go @@ -38,23 +38,9 @@ func ParseTopicID(input string) (*TopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TopicId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TopicId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TopicId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if id.TopicName, ok = input.Parsed["topicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicName", input) } - return &id, nil + return nil } // ValidateTopicID checks that 'input' can be parsed as a Topic ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/id_topicauthorizationrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/id_topicauthorizationrule.go index 8de5466ad9c3..722549331033 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/id_topicauthorizationrule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/id_topicauthorizationrule.go @@ -40,27 +40,9 @@ func ParseTopicAuthorizationRuleID(input string) (*TopicAuthorizationRuleId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TopicAuthorizationRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) - } - - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) - } - - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseTopicAuthorizationRuleIDInsensitively(input string) (*TopicAuthorizati return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TopicAuthorizationRuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *TopicAuthorizationRuleId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - if id.TopicName, ok = parsed.Parsed["topicName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "topicName", *parsed) + if id.TopicName, ok = input.Parsed["topicName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "topicName", input) } - if id.AuthorizationRuleName, ok = parsed.Parsed["authorizationRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", *parsed) + if id.AuthorizationRuleName, ok = input.Parsed["authorizationRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "authorizationRuleName", input) } - return &id, nil + return nil } // ValidateTopicAuthorizationRuleID checks that 'input' can be parsed as a Topic Authorization Rule ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-01-01-preview/namespaces/id_namespace.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-01-01-preview/namespaces/id_namespace.go index 7fcca1198a84..c01beabeef4d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-01-01-preview/namespaces/id_namespace.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-01-01-preview/namespaces/id_namespace.go @@ -36,19 +36,9 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NamespaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *NamespaceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.NamespaceName, ok = parsed.Parsed["namespaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", *parsed) + if id.NamespaceName, ok = input.Parsed["namespaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "namespaceName", input) } - return &id, nil + return nil } // ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabric/2021-06-01/cluster/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabric/2021-06-01/cluster/id_cluster.go index 55d741f3bedd..8153bd524a6a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabric/2021-06-01/cluster/id_cluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabric/2021-06-01/cluster/id_cluster.go @@ -36,19 +36,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/id_managedcluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/id_managedcluster.go index 927e73b856aa..913563355d43 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/id_managedcluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/id_managedcluster.go @@ -36,19 +36,9 @@ func ParseManagedClusterID(input string) (*ManagedClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseManagedClusterIDInsensitively(input string) (*ManagedClusterId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ManagedClusterId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - return &id, nil + return nil } // ValidateManagedClusterID checks that 'input' can be parsed as a Managed Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/id_managedcluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/id_managedcluster.go index f39389e79855..90d876cc53ee 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/id_managedcluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/id_managedcluster.go @@ -36,19 +36,9 @@ func ParseManagedClusterID(input string) (*ManagedClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseManagedClusterIDInsensitively(input string) (*ManagedClusterId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ManagedClusterId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - return &id, nil + return nil } // ValidateManagedClusterID checks that 'input' can be parsed as a Managed Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/id_nodetype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/id_nodetype.go index f9a967392053..0a7caddb96ce 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/id_nodetype.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/id_nodetype.go @@ -38,23 +38,9 @@ func ParseNodeTypeID(input string) (*NodeTypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NodeTypeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) - } - - if id.NodeTypeName, ok = parsed.Parsed["nodeTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "nodeTypeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseNodeTypeIDInsensitively(input string) (*NodeTypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := NodeTypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *NodeTypeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ManagedClusterName, ok = parsed.Parsed["managedClusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", *parsed) + if id.ManagedClusterName, ok = input.Parsed["managedClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedClusterName", input) } - if id.NodeTypeName, ok = parsed.Parsed["nodeTypeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "nodeTypeName", *parsed) + if id.NodeTypeName, ok = input.Parsed["nodeTypeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "nodeTypeName", input) } - return &id, nil + return nil } // ValidateNodeTypeID checks that 'input' can be parsed as a Node Type ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicelinker/2022-05-01/links/id_scopedlinker.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicelinker/2022-05-01/links/id_scopedlinker.go index 7d1699e16482..59c74d4def91 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicelinker/2022-05-01/links/id_scopedlinker.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicelinker/2022-05-01/links/id_scopedlinker.go @@ -34,15 +34,9 @@ func ParseScopedLinkerID(input string) (*ScopedLinkerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedLinkerId{} - - if id.ResourceUri, ok = parsed.Parsed["resourceUri"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", *parsed) - } - - if id.LinkerName, ok = parsed.Parsed["linkerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "linkerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedLinkerIDInsensitively(input string) (*ScopedLinkerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedLinkerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.ResourceUri, ok = parsed.Parsed["resourceUri"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", *parsed) + return &id, nil +} + +func (id *ScopedLinkerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ResourceUri, ok = input.Parsed["resourceUri"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", input) } - if id.LinkerName, ok = parsed.Parsed["linkerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "linkerName", *parsed) + if id.LinkerName, ok = input.Parsed["linkerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "linkerName", input) } - return &id, nil + return nil } // ValidateScopedLinkerID checks that 'input' can be parsed as a Scoped Linker ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicelinker/2022-05-01/servicelinker/id_scopedlinker.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicelinker/2022-05-01/servicelinker/id_scopedlinker.go index ecf9ae4abc56..b2df806fc4d5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicelinker/2022-05-01/servicelinker/id_scopedlinker.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicelinker/2022-05-01/servicelinker/id_scopedlinker.go @@ -34,15 +34,9 @@ func ParseScopedLinkerID(input string) (*ScopedLinkerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedLinkerId{} - - if id.ResourceUri, ok = parsed.Parsed["resourceUri"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", *parsed) - } - - if id.LinkerName, ok = parsed.Parsed["linkerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "linkerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseScopedLinkerIDInsensitively(input string) (*ScopedLinkerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ScopedLinkerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.ResourceUri, ok = parsed.Parsed["resourceUri"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", *parsed) + return &id, nil +} + +func (id *ScopedLinkerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ResourceUri, ok = input.Parsed["resourceUri"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", input) } - if id.LinkerName, ok = parsed.Parsed["linkerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "linkerName", *parsed) + if id.LinkerName, ok = input.Parsed["linkerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "linkerName", input) } - return &id, nil + return nil } // ValidateScopedLinkerID checks that 'input' can be parsed as a Scoped Linker ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/id_association.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/id_association.go index 4d1f84f46dda..91742745b6aa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/id_association.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/id_association.go @@ -38,23 +38,9 @@ func ParseAssociationID(input string) (*AssociationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AssociationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.TrafficControllerName, ok = parsed.Parsed["trafficControllerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trafficControllerName", *parsed) - } - - if id.AssociationName, ok = parsed.Parsed["associationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "associationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAssociationIDInsensitively(input string) (*AssociationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AssociationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AssociationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.TrafficControllerName, ok = parsed.Parsed["trafficControllerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trafficControllerName", *parsed) + if id.TrafficControllerName, ok = input.Parsed["trafficControllerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "trafficControllerName", input) } - if id.AssociationName, ok = parsed.Parsed["associationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "associationName", *parsed) + if id.AssociationName, ok = input.Parsed["associationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "associationName", input) } - return &id, nil + return nil } // ValidateAssociationID checks that 'input' can be parsed as a Association ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/id_trafficcontroller.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/id_trafficcontroller.go index 11c2580cb1ad..74a603e04a35 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/id_trafficcontroller.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/id_trafficcontroller.go @@ -36,19 +36,9 @@ func ParseTrafficControllerID(input string) (*TrafficControllerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TrafficControllerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.TrafficControllerName, ok = parsed.Parsed["trafficControllerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trafficControllerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseTrafficControllerIDInsensitively(input string) (*TrafficControllerId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TrafficControllerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *TrafficControllerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.TrafficControllerName, ok = parsed.Parsed["trafficControllerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trafficControllerName", *parsed) + if id.TrafficControllerName, ok = input.Parsed["trafficControllerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "trafficControllerName", input) } - return &id, nil + return nil } // ValidateTrafficControllerID checks that 'input' can be parsed as a Traffic Controller ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/id_frontend.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/id_frontend.go index b7e579d0a72a..809da87fc19a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/id_frontend.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/id_frontend.go @@ -38,23 +38,9 @@ func ParseFrontendID(input string) (*FrontendId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FrontendId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.TrafficControllerName, ok = parsed.Parsed["trafficControllerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trafficControllerName", *parsed) - } - - if id.FrontendName, ok = parsed.Parsed["frontendName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontendName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseFrontendIDInsensitively(input string) (*FrontendId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FrontendId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FrontendId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.TrafficControllerName, ok = parsed.Parsed["trafficControllerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trafficControllerName", *parsed) + if id.TrafficControllerName, ok = input.Parsed["trafficControllerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "trafficControllerName", input) } - if id.FrontendName, ok = parsed.Parsed["frontendName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontendName", *parsed) + if id.FrontendName, ok = input.Parsed["frontendName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "frontendName", input) } - return &id, nil + return nil } // ValidateFrontendID checks that 'input' can be parsed as a Frontend ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/id_trafficcontroller.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/id_trafficcontroller.go index 8b8821e6174d..182e5b0dffd2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/id_trafficcontroller.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/id_trafficcontroller.go @@ -36,19 +36,9 @@ func ParseTrafficControllerID(input string) (*TrafficControllerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TrafficControllerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.TrafficControllerName, ok = parsed.Parsed["trafficControllerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trafficControllerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseTrafficControllerIDInsensitively(input string) (*TrafficControllerId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TrafficControllerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *TrafficControllerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.TrafficControllerName, ok = parsed.Parsed["trafficControllerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trafficControllerName", *parsed) + if id.TrafficControllerName, ok = input.Parsed["trafficControllerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "trafficControllerName", input) } - return &id, nil + return nil } // ValidateTrafficControllerID checks that 'input' can be parsed as a Traffic Controller ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/id_trafficcontroller.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/id_trafficcontroller.go index 785e137e8451..dfcd4f99e5fa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/id_trafficcontroller.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/id_trafficcontroller.go @@ -36,19 +36,9 @@ func ParseTrafficControllerID(input string) (*TrafficControllerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TrafficControllerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.TrafficControllerName, ok = parsed.Parsed["trafficControllerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trafficControllerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseTrafficControllerIDInsensitively(input string) (*TrafficControllerId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TrafficControllerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *TrafficControllerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.TrafficControllerName, ok = parsed.Parsed["trafficControllerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trafficControllerName", *parsed) + if id.TrafficControllerName, ok = input.Parsed["trafficControllerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "trafficControllerName", input) } - return &id, nil + return nil } // ValidateTrafficControllerID checks that 'input' can be parsed as a Traffic Controller ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_customcertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_customcertificate.go index 6424254251d7..38ea1784daac 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_customcertificate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_customcertificate.go @@ -38,23 +38,9 @@ func ParseCustomCertificateID(input string) (*CustomCertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CustomCertificateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SignalRName, ok = parsed.Parsed["signalRName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "signalRName", *parsed) - } - - if id.CustomCertificateName, ok = parsed.Parsed["customCertificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "customCertificateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCustomCertificateIDInsensitively(input string) (*CustomCertificateId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CustomCertificateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CustomCertificateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SignalRName, ok = parsed.Parsed["signalRName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "signalRName", *parsed) + if id.SignalRName, ok = input.Parsed["signalRName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "signalRName", input) } - if id.CustomCertificateName, ok = parsed.Parsed["customCertificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "customCertificateName", *parsed) + if id.CustomCertificateName, ok = input.Parsed["customCertificateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "customCertificateName", input) } - return &id, nil + return nil } // ValidateCustomCertificateID checks that 'input' can be parsed as a Custom Certificate ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_customdomain.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_customdomain.go index 25482a5f7b15..123492a05da7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_customdomain.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_customdomain.go @@ -38,23 +38,9 @@ func ParseCustomDomainID(input string) (*CustomDomainId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CustomDomainId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SignalRName, ok = parsed.Parsed["signalRName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "signalRName", *parsed) - } - - if id.CustomDomainName, ok = parsed.Parsed["customDomainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "customDomainName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCustomDomainIDInsensitively(input string) (*CustomDomainId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CustomDomainId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CustomDomainId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SignalRName, ok = parsed.Parsed["signalRName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "signalRName", *parsed) + if id.SignalRName, ok = input.Parsed["signalRName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "signalRName", input) } - if id.CustomDomainName, ok = parsed.Parsed["customDomainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "customDomainName", *parsed) + if id.CustomDomainName, ok = input.Parsed["customDomainName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "customDomainName", input) } - return &id, nil + return nil } // ValidateCustomDomainID checks that 'input' can be parsed as a Custom Domain ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_location.go index dac4b26bdf49..5ddab9b3ca8f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_privateendpointconnection.go index 32d06a6eb4ac..d555ded5a8bd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_privateendpointconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_privateendpointconnection.go @@ -38,23 +38,9 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SignalRName, ok = parsed.Parsed["signalRName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "signalRName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SignalRName, ok = parsed.Parsed["signalRName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "signalRName", *parsed) + if id.SignalRName, ok = input.Parsed["signalRName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "signalRName", input) } - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", input) } - return &id, nil + return nil } // ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_sharedprivatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_sharedprivatelinkresource.go index dfa3f093c6af..c7cbd49245db 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_sharedprivatelinkresource.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_sharedprivatelinkresource.go @@ -38,23 +38,9 @@ func ParseSharedPrivateLinkResourceID(input string) (*SharedPrivateLinkResourceI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SharedPrivateLinkResourceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SignalRName, ok = parsed.Parsed["signalRName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "signalRName", *parsed) - } - - if id.SharedPrivateLinkResourceName, ok = parsed.Parsed["sharedPrivateLinkResourceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sharedPrivateLinkResourceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSharedPrivateLinkResourceIDInsensitively(input string) (*SharedPrivate return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SharedPrivateLinkResourceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SharedPrivateLinkResourceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SignalRName, ok = parsed.Parsed["signalRName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "signalRName", *parsed) + if id.SignalRName, ok = input.Parsed["signalRName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "signalRName", input) } - if id.SharedPrivateLinkResourceName, ok = parsed.Parsed["sharedPrivateLinkResourceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sharedPrivateLinkResourceName", *parsed) + if id.SharedPrivateLinkResourceName, ok = input.Parsed["sharedPrivateLinkResourceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sharedPrivateLinkResourceName", input) } - return &id, nil + return nil } // ValidateSharedPrivateLinkResourceID checks that 'input' can be parsed as a Shared Private Link Resource ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_signalr.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_signalr.go index 92adc9f8eb52..4fb596db6058 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_signalr.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr/id_signalr.go @@ -36,19 +36,9 @@ func ParseSignalRID(input string) (*SignalRId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SignalRId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SignalRName, ok = parsed.Parsed["signalRName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "signalRName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSignalRIDInsensitively(input string) (*SignalRId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SignalRId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SignalRId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SignalRName, ok = parsed.Parsed["signalRName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "signalRName", *parsed) + if id.SignalRName, ok = input.Parsed["signalRName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "signalRName", input) } - return &id, nil + return nil } // ValidateSignalRID checks that 'input' can be parsed as a Signal R ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/id_replicationlink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/id_replicationlink.go index b52b0a8cddef..53030897c0c9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/id_replicationlink.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/id_replicationlink.go @@ -40,27 +40,9 @@ func ParseReplicationLinkID(input string) (*ReplicationLinkId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationLinkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) - } - - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) - } - - if id.LinkId, ok = parsed.Parsed["linkId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "linkId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseReplicationLinkIDInsensitively(input string) (*ReplicationLinkId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReplicationLinkId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *ReplicationLinkId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - if id.DatabaseName, ok = parsed.Parsed["databaseName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "databaseName", *parsed) + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) } - if id.LinkId, ok = parsed.Parsed["linkId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "linkId", *parsed) + if id.LinkId, ok = input.Parsed["linkId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "linkId", input) } - return &id, nil + return nil } // ValidateReplicationLinkID checks that 'input' can be parsed as a Replication Link ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go index e74c7485a1a4..24938893ff81 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go @@ -38,23 +38,9 @@ func ParseRestorableDroppedDatabaseID(input string) (*RestorableDroppedDatabaseI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RestorableDroppedDatabaseId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) - } - - if id.RestorableDroppedDatabaseId, ok = parsed.Parsed["restorableDroppedDatabaseId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "restorableDroppedDatabaseId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseRestorableDroppedDatabaseIDInsensitively(input string) (*RestorableDro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := RestorableDroppedDatabaseId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RestorableDroppedDatabaseId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ServerName, ok = parsed.Parsed["serverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serverName", *parsed) + if id.ServerName, ok = input.Parsed["serverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "serverName", input) } - if id.RestorableDroppedDatabaseId, ok = parsed.Parsed["restorableDroppedDatabaseId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "restorableDroppedDatabaseId", *parsed) + if id.RestorableDroppedDatabaseId, ok = input.Parsed["restorableDroppedDatabaseId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "restorableDroppedDatabaseId", input) } - return &id, nil + return nil } // ValidateRestorableDroppedDatabaseID checks that 'input' can be parsed as a Restorable Dropped Database ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/id_availabilitygrouplistener.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/id_availabilitygrouplistener.go index 4836dca5df5b..bdbc8e2ef36f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/id_availabilitygrouplistener.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/id_availabilitygrouplistener.go @@ -38,23 +38,9 @@ func ParseAvailabilityGroupListenerID(input string) (*AvailabilityGroupListenerI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AvailabilityGroupListenerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SqlVirtualMachineGroupName, ok = parsed.Parsed["sqlVirtualMachineGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlVirtualMachineGroupName", *parsed) - } - - if id.AvailabilityGroupListenerName, ok = parsed.Parsed["availabilityGroupListenerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "availabilityGroupListenerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAvailabilityGroupListenerIDInsensitively(input string) (*AvailabilityG return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AvailabilityGroupListenerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AvailabilityGroupListenerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SqlVirtualMachineGroupName, ok = parsed.Parsed["sqlVirtualMachineGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlVirtualMachineGroupName", *parsed) + if id.SqlVirtualMachineGroupName, ok = input.Parsed["sqlVirtualMachineGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sqlVirtualMachineGroupName", input) } - if id.AvailabilityGroupListenerName, ok = parsed.Parsed["availabilityGroupListenerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "availabilityGroupListenerName", *parsed) + if id.AvailabilityGroupListenerName, ok = input.Parsed["availabilityGroupListenerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "availabilityGroupListenerName", input) } - return &id, nil + return nil } // ValidateAvailabilityGroupListenerID checks that 'input' can be parsed as a Availability Group Listener ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/id_sqlvirtualmachinegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/id_sqlvirtualmachinegroup.go index b2f7143c89fa..953aee5c76a0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/id_sqlvirtualmachinegroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/id_sqlvirtualmachinegroup.go @@ -36,19 +36,9 @@ func ParseSqlVirtualMachineGroupID(input string) (*SqlVirtualMachineGroupId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SqlVirtualMachineGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SqlVirtualMachineGroupName, ok = parsed.Parsed["sqlVirtualMachineGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlVirtualMachineGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSqlVirtualMachineGroupIDInsensitively(input string) (*SqlVirtualMachin return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SqlVirtualMachineGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SqlVirtualMachineGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SqlVirtualMachineGroupName, ok = parsed.Parsed["sqlVirtualMachineGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlVirtualMachineGroupName", *parsed) + if id.SqlVirtualMachineGroupName, ok = input.Parsed["sqlVirtualMachineGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sqlVirtualMachineGroupName", input) } - return &id, nil + return nil } // ValidateSqlVirtualMachineGroupID checks that 'input' can be parsed as a Sql Virtual Machine Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/id_sqlvirtualmachinegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/id_sqlvirtualmachinegroup.go index 9893b19ac616..ee4e2e02038b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/id_sqlvirtualmachinegroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/id_sqlvirtualmachinegroup.go @@ -36,19 +36,9 @@ func ParseSqlVirtualMachineGroupID(input string) (*SqlVirtualMachineGroupId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SqlVirtualMachineGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SqlVirtualMachineGroupName, ok = parsed.Parsed["sqlVirtualMachineGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlVirtualMachineGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSqlVirtualMachineGroupIDInsensitively(input string) (*SqlVirtualMachin return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SqlVirtualMachineGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SqlVirtualMachineGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SqlVirtualMachineGroupName, ok = parsed.Parsed["sqlVirtualMachineGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlVirtualMachineGroupName", *parsed) + if id.SqlVirtualMachineGroupName, ok = input.Parsed["sqlVirtualMachineGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sqlVirtualMachineGroupName", input) } - return &id, nil + return nil } // ValidateSqlVirtualMachineGroupID checks that 'input' can be parsed as a Sql Virtual Machine Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/id_sqlvirtualmachine.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/id_sqlvirtualmachine.go index cc893b1911d3..6b344a86c299 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/id_sqlvirtualmachine.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/id_sqlvirtualmachine.go @@ -36,19 +36,9 @@ func ParseSqlVirtualMachineID(input string) (*SqlVirtualMachineId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SqlVirtualMachineId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SqlVirtualMachineName, ok = parsed.Parsed["sqlVirtualMachineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlVirtualMachineName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSqlVirtualMachineIDInsensitively(input string) (*SqlVirtualMachineId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SqlVirtualMachineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SqlVirtualMachineId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SqlVirtualMachineName, ok = parsed.Parsed["sqlVirtualMachineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlVirtualMachineName", *parsed) + if id.SqlVirtualMachineName, ok = input.Parsed["sqlVirtualMachineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sqlVirtualMachineName", input) } - return &id, nil + return nil } // ValidateSqlVirtualMachineID checks that 'input' can be parsed as a Sql Virtual Machine ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/id_sqlvirtualmachinegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/id_sqlvirtualmachinegroup.go index f13e46a78c07..1c438a89b178 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/id_sqlvirtualmachinegroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/id_sqlvirtualmachinegroup.go @@ -36,19 +36,9 @@ func ParseSqlVirtualMachineGroupID(input string) (*SqlVirtualMachineGroupId, err return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SqlVirtualMachineGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SqlVirtualMachineGroupName, ok = parsed.Parsed["sqlVirtualMachineGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlVirtualMachineGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseSqlVirtualMachineGroupIDInsensitively(input string) (*SqlVirtualMachin return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SqlVirtualMachineGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *SqlVirtualMachineGroupId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.SqlVirtualMachineGroupName, ok = parsed.Parsed["sqlVirtualMachineGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sqlVirtualMachineGroupName", *parsed) + if id.SqlVirtualMachineGroupName, ok = input.Parsed["sqlVirtualMachineGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sqlVirtualMachineGroupName", input) } - return &id, nil + return nil } // ValidateSqlVirtualMachineGroupID checks that 'input' can be parsed as a Sql Virtual Machine Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/deletedaccounts/id_deletedaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/deletedaccounts/id_deletedaccount.go index b3972fbbe05a..2323db580a48 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/deletedaccounts/id_deletedaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/deletedaccounts/id_deletedaccount.go @@ -36,19 +36,9 @@ func ParseDeletedAccountID(input string) (*DeletedAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeletedAccountId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - if id.DeletedAccountName, ok = parsed.Parsed["deletedAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deletedAccountName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDeletedAccountIDInsensitively(input string) (*DeletedAccountId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DeletedAccountId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DeletedAccountId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - if id.DeletedAccountName, ok = parsed.Parsed["deletedAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "deletedAccountName", *parsed) + if id.DeletedAccountName, ok = input.Parsed["deletedAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "deletedAccountName", input) } - return &id, nil + return nil } // ValidateDeletedAccountID checks that 'input' can be parsed as a Deleted Account ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/encryptionscopes/id_encryptionscope.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/encryptionscopes/id_encryptionscope.go index 54b7e3815341..da98ff39db3c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/encryptionscopes/id_encryptionscope.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/encryptionscopes/id_encryptionscope.go @@ -38,23 +38,9 @@ func ParseEncryptionScopeID(input string) (*EncryptionScopeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EncryptionScopeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageAccountName, ok = parsed.Parsed["storageAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", *parsed) - } - - if id.EncryptionScopeName, ok = parsed.Parsed["encryptionScopeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "encryptionScopeName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseEncryptionScopeIDInsensitively(input string) (*EncryptionScopeId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EncryptionScopeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *EncryptionScopeId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageAccountName, ok = parsed.Parsed["storageAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", *parsed) + if id.StorageAccountName, ok = input.Parsed["storageAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", input) } - if id.EncryptionScopeName, ok = parsed.Parsed["encryptionScopeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "encryptionScopeName", *parsed) + if id.EncryptionScopeName, ok = input.Parsed["encryptionScopeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "encryptionScopeName", input) } - return &id, nil + return nil } // ValidateEncryptionScopeID checks that 'input' can be parsed as a Encryption Scope ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/fileshares/id_share.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/fileshares/id_share.go index 9f7c310e5060..df8a4e04b33d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/fileshares/id_share.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/fileshares/id_share.go @@ -38,23 +38,9 @@ func ParseShareID(input string) (*ShareId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ShareId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageAccountName, ok = parsed.Parsed["storageAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", *parsed) - } - - if id.ShareName, ok = parsed.Parsed["shareName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "shareName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseShareIDInsensitively(input string) (*ShareId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ShareId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ShareId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageAccountName, ok = parsed.Parsed["storageAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", *parsed) + if id.StorageAccountName, ok = input.Parsed["storageAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", input) } - if id.ShareName, ok = parsed.Parsed["shareName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "shareName", *parsed) + if id.ShareName, ok = input.Parsed["shareName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "shareName", input) } - return &id, nil + return nil } // ValidateShareID checks that 'input' can be parsed as a Share ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/localusers/id_localuser.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/localusers/id_localuser.go index 8bf0d0be80cc..660b8c50cded 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/localusers/id_localuser.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/localusers/id_localuser.go @@ -38,23 +38,9 @@ func ParseLocalUserID(input string) (*LocalUserId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalUserId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageAccountName, ok = parsed.Parsed["storageAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", *parsed) - } - - if id.LocalUserName, ok = parsed.Parsed["localUserName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localUserName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseLocalUserIDInsensitively(input string) (*LocalUserId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocalUserId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LocalUserId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageAccountName, ok = parsed.Parsed["storageAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", *parsed) + if id.StorageAccountName, ok = input.Parsed["storageAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", input) } - if id.LocalUserName, ok = parsed.Parsed["localUserName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localUserName", *parsed) + if id.LocalUserName, ok = input.Parsed["localUserName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "localUserName", input) } - return &id, nil + return nil } // ValidateLocalUserID checks that 'input' can be parsed as a Local User ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/objectreplicationpolicies/id_objectreplicationpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/objectreplicationpolicies/id_objectreplicationpolicy.go index f15bc667eb27..9dceb5dc6203 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/objectreplicationpolicies/id_objectreplicationpolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/objectreplicationpolicies/id_objectreplicationpolicy.go @@ -38,23 +38,9 @@ func ParseObjectReplicationPolicyID(input string) (*ObjectReplicationPolicyId, e return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ObjectReplicationPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageAccountName, ok = parsed.Parsed["storageAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", *parsed) - } - - if id.ObjectReplicationPolicyId, ok = parsed.Parsed["objectReplicationPolicyId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "objectReplicationPolicyId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseObjectReplicationPolicyIDInsensitively(input string) (*ObjectReplicati return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ObjectReplicationPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ObjectReplicationPolicyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageAccountName, ok = parsed.Parsed["storageAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", *parsed) + if id.StorageAccountName, ok = input.Parsed["storageAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", input) } - if id.ObjectReplicationPolicyId, ok = parsed.Parsed["objectReplicationPolicyId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "objectReplicationPolicyId", *parsed) + if id.ObjectReplicationPolicyId, ok = input.Parsed["objectReplicationPolicyId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "objectReplicationPolicyId", input) } - return &id, nil + return nil } // ValidateObjectReplicationPolicyID checks that 'input' can be parsed as a Object Replication Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/privateendpointconnections/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/privateendpointconnections/id_privateendpointconnection.go index dda42ec83517..af8c3251a314 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/privateendpointconnections/id_privateendpointconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/privateendpointconnections/id_privateendpointconnection.go @@ -38,23 +38,9 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageAccountName, ok = parsed.Parsed["storageAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageAccountName, ok = parsed.Parsed["storageAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", *parsed) + if id.StorageAccountName, ok = input.Parsed["storageAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", input) } - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", input) } - return &id, nil + return nil } // ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/queueservice/id_queue.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/queueservice/id_queue.go index 235b1d4c421d..a2b92fe8d000 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/queueservice/id_queue.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/queueservice/id_queue.go @@ -38,23 +38,9 @@ func ParseQueueID(input string) (*QueueId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := QueueId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageAccountName, ok = parsed.Parsed["storageAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", *parsed) - } - - if id.QueueName, ok = parsed.Parsed["queueName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "queueName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseQueueIDInsensitively(input string) (*QueueId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := QueueId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *QueueId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageAccountName, ok = parsed.Parsed["storageAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", *parsed) + if id.StorageAccountName, ok = input.Parsed["storageAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", input) } - if id.QueueName, ok = parsed.Parsed["queueName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "queueName", *parsed) + if id.QueueName, ok = input.Parsed["queueName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "queueName", input) } - return &id, nil + return nil } // ValidateQueueID checks that 'input' can be parsed as a Queue ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/tableservice/id_table.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/tableservice/id_table.go index a7265389f201..012aaa4d06c3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/tableservice/id_table.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/tableservice/id_table.go @@ -38,23 +38,9 @@ func ParseTableID(input string) (*TableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageAccountName, ok = parsed.Parsed["storageAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", *parsed) - } - - if id.TableName, ok = parsed.Parsed["tableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tableName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TableId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TableId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageAccountName, ok = parsed.Parsed["storageAccountName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", *parsed) + if id.StorageAccountName, ok = input.Parsed["storageAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageAccountName", input) } - if id.TableName, ok = parsed.Parsed["tableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tableName", *parsed) + if id.TableName, ok = input.Parsed["tableName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "tableName", input) } - return &id, nil + return nil } // ValidateTableID checks that 'input' can be parsed as a Table ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/amlfilesystems/id_amlfilesystem.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/amlfilesystems/id_amlfilesystem.go index 5fa1aedf9eb7..49a9013ccbfd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/amlfilesystems/id_amlfilesystem.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/amlfilesystems/id_amlfilesystem.go @@ -36,19 +36,9 @@ func ParseAmlFilesystemID(input string) (*AmlFilesystemId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AmlFilesystemId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AmlFilesystemName, ok = parsed.Parsed["amlFilesystemName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "amlFilesystemName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseAmlFilesystemIDInsensitively(input string) (*AmlFilesystemId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AmlFilesystemId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *AmlFilesystemId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.AmlFilesystemName, ok = parsed.Parsed["amlFilesystemName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "amlFilesystemName", *parsed) + if id.AmlFilesystemName, ok = input.Parsed["amlFilesystemName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "amlFilesystemName", input) } - return &id, nil + return nil } // ValidateAmlFilesystemID checks that 'input' can be parsed as a Aml Filesystem ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/ascusages/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/ascusages/id_location.go index 7d9cec58eb02..ed19710dd778 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/ascusages/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/ascusages/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/caches/id_cache.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/caches/id_cache.go index d048b1a7ff57..8787aa063537 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/caches/id_cache.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/caches/id_cache.go @@ -36,19 +36,9 @@ func ParseCacheID(input string) (*CacheId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CacheId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CacheName, ok = parsed.Parsed["cacheName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cacheName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseCacheIDInsensitively(input string) (*CacheId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CacheId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *CacheId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CacheName, ok = parsed.Parsed["cacheName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cacheName", *parsed) + if id.CacheName, ok = input.Parsed["cacheName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cacheName", input) } - return &id, nil + return nil } // ValidateCacheID checks that 'input' can be parsed as a Cache ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets/id_cache.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets/id_cache.go index 383376c605be..86a1a0d01de8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets/id_cache.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets/id_cache.go @@ -36,19 +36,9 @@ func ParseCacheID(input string) (*CacheId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CacheId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CacheName, ok = parsed.Parsed["cacheName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cacheName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseCacheIDInsensitively(input string) (*CacheId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CacheId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *CacheId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CacheName, ok = parsed.Parsed["cacheName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cacheName", *parsed) + if id.CacheName, ok = input.Parsed["cacheName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cacheName", input) } - return &id, nil + return nil } // ValidateCacheID checks that 'input' can be parsed as a Cache ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets/id_storagetarget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets/id_storagetarget.go index d3b75b75d477..76884f742607 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets/id_storagetarget.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets/id_storagetarget.go @@ -38,23 +38,9 @@ func ParseStorageTargetID(input string) (*StorageTargetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageTargetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CacheName, ok = parsed.Parsed["cacheName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cacheName", *parsed) - } - - if id.StorageTargetName, ok = parsed.Parsed["storageTargetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageTargetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseStorageTargetIDInsensitively(input string) (*StorageTargetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageTargetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *StorageTargetId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CacheName, ok = parsed.Parsed["cacheName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cacheName", *parsed) + if id.CacheName, ok = input.Parsed["cacheName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cacheName", input) } - if id.StorageTargetName, ok = parsed.Parsed["storageTargetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageTargetName", *parsed) + if id.StorageTargetName, ok = input.Parsed["storageTargetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageTargetName", input) } - return &id, nil + return nil } // ValidateStorageTargetID checks that 'input' can be parsed as a Storage Target ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/agents/id_agent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/agents/id_agent.go index 2552f15788fc..f9bf01d3e460 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/agents/id_agent.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/agents/id_agent.go @@ -38,23 +38,9 @@ func ParseAgentID(input string) (*AgentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AgentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) - } - - if id.AgentName, ok = parsed.Parsed["agentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "agentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAgentIDInsensitively(input string) (*AgentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AgentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AgentId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) + if id.StorageMoverName, ok = input.Parsed["storageMoverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", input) } - if id.AgentName, ok = parsed.Parsed["agentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "agentName", *parsed) + if id.AgentName, ok = input.Parsed["agentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "agentName", input) } - return &id, nil + return nil } // ValidateAgentID checks that 'input' can be parsed as a Agent ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/agents/id_storagemover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/agents/id_storagemover.go index b3a746d8bd62..5806023a36cf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/agents/id_storagemover.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/agents/id_storagemover.go @@ -36,19 +36,9 @@ func ParseStorageMoverID(input string) (*StorageMoverId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageMoverId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageMoverId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *StorageMoverId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) + if id.StorageMoverName, ok = input.Parsed["storageMoverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", input) } - return &id, nil + return nil } // ValidateStorageMoverID checks that 'input' can be parsed as a Storage Mover ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/endpoints/id_endpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/endpoints/id_endpoint.go index a20df103b0f7..58fdfeb24139 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/endpoints/id_endpoint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/endpoints/id_endpoint.go @@ -38,23 +38,9 @@ func ParseEndpointID(input string) (*EndpointId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) - } - - if id.EndpointName, ok = parsed.Parsed["endpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "endpointName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseEndpointIDInsensitively(input string) (*EndpointId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EndpointId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *EndpointId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) + if id.StorageMoverName, ok = input.Parsed["storageMoverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", input) } - if id.EndpointName, ok = parsed.Parsed["endpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "endpointName", *parsed) + if id.EndpointName, ok = input.Parsed["endpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "endpointName", input) } - return &id, nil + return nil } // ValidateEndpointID checks that 'input' can be parsed as a Endpoint ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/endpoints/id_storagemover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/endpoints/id_storagemover.go index dea7c53831a3..1fbaa2379638 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/endpoints/id_storagemover.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/endpoints/id_storagemover.go @@ -36,19 +36,9 @@ func ParseStorageMoverID(input string) (*StorageMoverId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageMoverId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageMoverId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *StorageMoverId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) + if id.StorageMoverName, ok = input.Parsed["storageMoverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", input) } - return &id, nil + return nil } // ValidateStorageMoverID checks that 'input' can be parsed as a Storage Mover ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/jobdefinitions/id_jobdefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/jobdefinitions/id_jobdefinition.go index cea846be3742..7bf0fe8ccf16 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/jobdefinitions/id_jobdefinition.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/jobdefinitions/id_jobdefinition.go @@ -40,27 +40,9 @@ func ParseJobDefinitionID(input string) (*JobDefinitionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := JobDefinitionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) - } - - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) - } - - if id.JobDefinitionName, ok = parsed.Parsed["jobDefinitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobDefinitionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseJobDefinitionIDInsensitively(input string) (*JobDefinitionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := JobDefinitionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *JobDefinitionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) + if id.StorageMoverName, ok = input.Parsed["storageMoverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", input) } - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if id.ProjectName, ok = input.Parsed["projectName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "projectName", input) } - if id.JobDefinitionName, ok = parsed.Parsed["jobDefinitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "jobDefinitionName", *parsed) + if id.JobDefinitionName, ok = input.Parsed["jobDefinitionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobDefinitionName", input) } - return &id, nil + return nil } // ValidateJobDefinitionID checks that 'input' can be parsed as a Job Definition ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/jobdefinitions/id_project.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/jobdefinitions/id_project.go index 45d9648fe50b..b80a07235b08 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/jobdefinitions/id_project.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/jobdefinitions/id_project.go @@ -38,23 +38,9 @@ func ParseProjectID(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) - } - - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProjectId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) + if id.StorageMoverName, ok = input.Parsed["storageMoverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", input) } - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if id.ProjectName, ok = input.Parsed["projectName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "projectName", input) } - return &id, nil + return nil } // ValidateProjectID checks that 'input' can be parsed as a Project ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/projects/id_project.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/projects/id_project.go index c32f6421bdca..fbb30d075e4e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/projects/id_project.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/projects/id_project.go @@ -38,23 +38,9 @@ func ParseProjectID(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) - } - - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProjectId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProjectId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) + if id.StorageMoverName, ok = input.Parsed["storageMoverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", input) } - if id.ProjectName, ok = parsed.Parsed["projectName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "projectName", *parsed) + if id.ProjectName, ok = input.Parsed["projectName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "projectName", input) } - return &id, nil + return nil } // ValidateProjectID checks that 'input' can be parsed as a Project ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/projects/id_storagemover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/projects/id_storagemover.go index 23054ca367b8..7f7cafcd59ef 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/projects/id_storagemover.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/projects/id_storagemover.go @@ -36,19 +36,9 @@ func ParseStorageMoverID(input string) (*StorageMoverId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageMoverId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageMoverId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *StorageMoverId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) + if id.StorageMoverName, ok = input.Parsed["storageMoverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", input) } - return &id, nil + return nil } // ValidateStorageMoverID checks that 'input' can be parsed as a Storage Mover ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/storagemovers/id_storagemover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/storagemovers/id_storagemover.go index aa5244fb596d..70627784b69f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/storagemovers/id_storagemover.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/storagemovers/id_storagemover.go @@ -36,19 +36,9 @@ func ParseStorageMoverID(input string) (*StorageMoverId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageMoverId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageMoverId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *StorageMoverId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageMoverName, ok = parsed.Parsed["storageMoverName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", *parsed) + if id.StorageMoverName, ok = input.Parsed["storageMoverName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageMoverName", input) } - return &id, nil + return nil } // ValidateStorageMoverID checks that 'input' can be parsed as a Storage Mover ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/id_diskpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/id_diskpool.go index 4854368d1a89..00b7a1a2bbf1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/id_diskpool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools/id_diskpool.go @@ -36,19 +36,9 @@ func ParseDiskPoolID(input string) (*DiskPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DiskPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DiskPoolName, ok = parsed.Parsed["diskPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diskPoolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDiskPoolIDInsensitively(input string) (*DiskPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DiskPoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DiskPoolId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DiskPoolName, ok = parsed.Parsed["diskPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diskPoolName", *parsed) + if id.DiskPoolName, ok = input.Parsed["diskPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "diskPoolName", input) } - return &id, nil + return nil } // ValidateDiskPoolID checks that 'input' can be parsed as a Disk Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/id_diskpool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/id_diskpool.go index a4ced72ce56d..7a0bcce57c16 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/id_diskpool.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/id_diskpool.go @@ -36,19 +36,9 @@ func ParseDiskPoolID(input string) (*DiskPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DiskPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DiskPoolName, ok = parsed.Parsed["diskPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diskPoolName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseDiskPoolIDInsensitively(input string) (*DiskPoolId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DiskPoolId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *DiskPoolId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DiskPoolName, ok = parsed.Parsed["diskPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diskPoolName", *parsed) + if id.DiskPoolName, ok = input.Parsed["diskPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "diskPoolName", input) } - return &id, nil + return nil } // ValidateDiskPoolID checks that 'input' can be parsed as a Disk Pool ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/id_iscsitarget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/id_iscsitarget.go index f851d9ec9776..81287a59635f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/id_iscsitarget.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets/id_iscsitarget.go @@ -38,23 +38,9 @@ func ParseIscsiTargetID(input string) (*IscsiTargetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IscsiTargetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DiskPoolName, ok = parsed.Parsed["diskPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diskPoolName", *parsed) - } - - if id.IscsiTargetName, ok = parsed.Parsed["iscsiTargetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "iscsiTargetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseIscsiTargetIDInsensitively(input string) (*IscsiTargetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := IscsiTargetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *IscsiTargetId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.DiskPoolName, ok = parsed.Parsed["diskPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "diskPoolName", *parsed) + if id.DiskPoolName, ok = input.Parsed["diskPoolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "diskPoolName", input) } - if id.IscsiTargetName, ok = parsed.Parsed["iscsiTargetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "iscsiTargetName", *parsed) + if id.IscsiTargetName, ok = input.Parsed["iscsiTargetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "iscsiTargetName", input) } - return &id, nil + return nil } // ValidateIscsiTargetID checks that 'input' can be parsed as a Iscsi Target ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/cloudendpointresource/id_cloudendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/cloudendpointresource/id_cloudendpoint.go index 2baff1c23a4f..2e90d8722024 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/cloudendpointresource/id_cloudendpoint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/cloudendpointresource/id_cloudendpoint.go @@ -40,27 +40,9 @@ func ParseCloudEndpointID(input string) (*CloudEndpointId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CloudEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageSyncServiceName, ok = parsed.Parsed["storageSyncServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageSyncServiceName", *parsed) - } - - if id.SyncGroupName, ok = parsed.Parsed["syncGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "syncGroupName", *parsed) - } - - if id.CloudEndpointName, ok = parsed.Parsed["cloudEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudEndpointName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseCloudEndpointIDInsensitively(input string) (*CloudEndpointId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CloudEndpointId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *CloudEndpointId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageSyncServiceName, ok = parsed.Parsed["storageSyncServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageSyncServiceName", *parsed) + if id.StorageSyncServiceName, ok = input.Parsed["storageSyncServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageSyncServiceName", input) } - if id.SyncGroupName, ok = parsed.Parsed["syncGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "syncGroupName", *parsed) + if id.SyncGroupName, ok = input.Parsed["syncGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "syncGroupName", input) } - if id.CloudEndpointName, ok = parsed.Parsed["cloudEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudEndpointName", *parsed) + if id.CloudEndpointName, ok = input.Parsed["cloudEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cloudEndpointName", input) } - return &id, nil + return nil } // ValidateCloudEndpointID checks that 'input' can be parsed as a Cloud Endpoint ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/cloudendpointresource/id_syncgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/cloudendpointresource/id_syncgroup.go index 544c9d0cddc8..aad0297ae0d7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/cloudendpointresource/id_syncgroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/cloudendpointresource/id_syncgroup.go @@ -38,23 +38,9 @@ func ParseSyncGroupID(input string) (*SyncGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SyncGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageSyncServiceName, ok = parsed.Parsed["storageSyncServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageSyncServiceName", *parsed) - } - - if id.SyncGroupName, ok = parsed.Parsed["syncGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "syncGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSyncGroupIDInsensitively(input string) (*SyncGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SyncGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SyncGroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageSyncServiceName, ok = parsed.Parsed["storageSyncServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageSyncServiceName", *parsed) + if id.StorageSyncServiceName, ok = input.Parsed["storageSyncServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageSyncServiceName", input) } - if id.SyncGroupName, ok = parsed.Parsed["syncGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "syncGroupName", *parsed) + if id.SyncGroupName, ok = input.Parsed["syncGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "syncGroupName", input) } - return &id, nil + return nil } // ValidateSyncGroupID checks that 'input' can be parsed as a Sync Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/id_storagesyncservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/id_storagesyncservice.go index 60b30adc518c..2641624bebdf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/id_storagesyncservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/id_storagesyncservice.go @@ -36,19 +36,9 @@ func ParseStorageSyncServiceID(input string) (*StorageSyncServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageSyncServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageSyncServiceName, ok = parsed.Parsed["storageSyncServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageSyncServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseStorageSyncServiceIDInsensitively(input string) (*StorageSyncServiceId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageSyncServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *StorageSyncServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageSyncServiceName, ok = parsed.Parsed["storageSyncServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageSyncServiceName", *parsed) + if id.StorageSyncServiceName, ok = input.Parsed["storageSyncServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageSyncServiceName", input) } - return &id, nil + return nil } // ValidateStorageSyncServiceID checks that 'input' can be parsed as a Storage Sync Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/syncgroupresource/id_storagesyncservice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/syncgroupresource/id_storagesyncservice.go index 5e4494208ea1..c9fd0ab91220 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/syncgroupresource/id_storagesyncservice.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/syncgroupresource/id_storagesyncservice.go @@ -36,19 +36,9 @@ func ParseStorageSyncServiceID(input string) (*StorageSyncServiceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageSyncServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageSyncServiceName, ok = parsed.Parsed["storageSyncServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageSyncServiceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseStorageSyncServiceIDInsensitively(input string) (*StorageSyncServiceId return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StorageSyncServiceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *StorageSyncServiceId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageSyncServiceName, ok = parsed.Parsed["storageSyncServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageSyncServiceName", *parsed) + if id.StorageSyncServiceName, ok = input.Parsed["storageSyncServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageSyncServiceName", input) } - return &id, nil + return nil } // ValidateStorageSyncServiceID checks that 'input' can be parsed as a Storage Sync Service ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/syncgroupresource/id_syncgroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/syncgroupresource/id_syncgroup.go index a792ed1dca32..6356505ac80d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/syncgroupresource/id_syncgroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/syncgroupresource/id_syncgroup.go @@ -38,23 +38,9 @@ func ParseSyncGroupID(input string) (*SyncGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SyncGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StorageSyncServiceName, ok = parsed.Parsed["storageSyncServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageSyncServiceName", *parsed) - } - - if id.SyncGroupName, ok = parsed.Parsed["syncGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "syncGroupName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSyncGroupIDInsensitively(input string) (*SyncGroupId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SyncGroupId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SyncGroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StorageSyncServiceName, ok = parsed.Parsed["storageSyncServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageSyncServiceName", *parsed) + if id.StorageSyncServiceName, ok = input.Parsed["storageSyncServiceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageSyncServiceName", input) } - if id.SyncGroupName, ok = parsed.Parsed["syncGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "syncGroupName", *parsed) + if id.SyncGroupName, ok = input.Parsed["syncGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "syncGroupName", input) } - return &id, nil + return nil } // ValidateSyncGroupID checks that 'input' can be parsed as a Sync Group ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/clusters/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/clusters/id_cluster.go index 76f72c2de412..fb8191e63378 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/clusters/id_cluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/clusters/id_cluster.go @@ -36,19 +36,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/functions/id_function.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/functions/id_function.go index b5f463d5d4fc..65352eb6c633 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/functions/id_function.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/functions/id_function.go @@ -38,23 +38,9 @@ func ParseFunctionID(input string) (*FunctionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FunctionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StreamingJobName, ok = parsed.Parsed["streamingJobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", *parsed) - } - - if id.FunctionName, ok = parsed.Parsed["functionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "functionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseFunctionIDInsensitively(input string) (*FunctionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := FunctionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FunctionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StreamingJobName, ok = parsed.Parsed["streamingJobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", *parsed) + if id.StreamingJobName, ok = input.Parsed["streamingJobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", input) } - if id.FunctionName, ok = parsed.Parsed["functionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "functionName", *parsed) + if id.FunctionName, ok = input.Parsed["functionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "functionName", input) } - return &id, nil + return nil } // ValidateFunctionID checks that 'input' can be parsed as a Function ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/functions/id_streamingjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/functions/id_streamingjob.go index 4fb3438e50ba..381affad90e6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/functions/id_streamingjob.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/functions/id_streamingjob.go @@ -36,19 +36,9 @@ func ParseStreamingJobID(input string) (*StreamingJobId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingJobId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StreamingJobName, ok = parsed.Parsed["streamingJobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseStreamingJobIDInsensitively(input string) (*StreamingJobId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingJobId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *StreamingJobId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StreamingJobName, ok = parsed.Parsed["streamingJobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", *parsed) + if id.StreamingJobName, ok = input.Parsed["streamingJobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", input) } - return &id, nil + return nil } // ValidateStreamingJobID checks that 'input' can be parsed as a Streaming Job ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/inputs/id_input.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/inputs/id_input.go index 34ebf1bb3b34..cad2488a9509 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/inputs/id_input.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/inputs/id_input.go @@ -38,23 +38,9 @@ func ParseInputID(input string) (*InputId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := InputId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StreamingJobName, ok = parsed.Parsed["streamingJobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", *parsed) - } - - if id.InputName, ok = parsed.Parsed["inputName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "inputName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseInputIDInsensitively(input string) (*InputId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := InputId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *InputId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StreamingJobName, ok = parsed.Parsed["streamingJobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", *parsed) + if id.StreamingJobName, ok = input.Parsed["streamingJobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", input) } - if id.InputName, ok = parsed.Parsed["inputName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "inputName", *parsed) + if id.InputName, ok = input.Parsed["inputName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "inputName", input) } - return &id, nil + return nil } // ValidateInputID checks that 'input' can be parsed as a Input ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/inputs/id_streamingjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/inputs/id_streamingjob.go index 6daad60fcecd..067722f33fd5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/inputs/id_streamingjob.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/inputs/id_streamingjob.go @@ -36,19 +36,9 @@ func ParseStreamingJobID(input string) (*StreamingJobId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingJobId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StreamingJobName, ok = parsed.Parsed["streamingJobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseStreamingJobIDInsensitively(input string) (*StreamingJobId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingJobId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *StreamingJobId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StreamingJobName, ok = parsed.Parsed["streamingJobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", *parsed) + if id.StreamingJobName, ok = input.Parsed["streamingJobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", input) } - return &id, nil + return nil } // ValidateStreamingJobID checks that 'input' can be parsed as a Streaming Job ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/privateendpoints/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/privateendpoints/id_cluster.go index caf6ad8c02de..faa7152e62a4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/privateendpoints/id_cluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/privateendpoints/id_cluster.go @@ -36,19 +36,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/privateendpoints/id_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/privateendpoints/id_privateendpoint.go index b630c532d719..af75e972a38b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/privateendpoints/id_privateendpoint.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/privateendpoints/id_privateendpoint.go @@ -38,23 +38,9 @@ func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, erro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) + if id.PrivateEndpointName, ok = input.Parsed["privateEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", input) } - return &id, nil + return nil } // ValidatePrivateEndpointID checks that 'input' can be parsed as a Private Endpoint ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/streamingjobs/id_streamingjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/streamingjobs/id_streamingjob.go index 6a568e9cb430..6a66cc61d8f3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/streamingjobs/id_streamingjob.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/streamingjobs/id_streamingjob.go @@ -36,19 +36,9 @@ func ParseStreamingJobID(input string) (*StreamingJobId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingJobId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StreamingJobName, ok = parsed.Parsed["streamingJobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseStreamingJobIDInsensitively(input string) (*StreamingJobId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingJobId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *StreamingJobId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StreamingJobName, ok = parsed.Parsed["streamingJobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", *parsed) + if id.StreamingJobName, ok = input.Parsed["streamingJobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", input) } - return &id, nil + return nil } // ValidateStreamingJobID checks that 'input' can be parsed as a Streaming Job ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/transformations/id_transformation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/transformations/id_transformation.go index 6cbfd2eb5017..3f300524e997 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/transformations/id_transformation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/transformations/id_transformation.go @@ -38,23 +38,9 @@ func ParseTransformationID(input string) (*TransformationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TransformationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StreamingJobName, ok = parsed.Parsed["streamingJobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", *parsed) - } - - if id.TransformationName, ok = parsed.Parsed["transformationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "transformationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTransformationIDInsensitively(input string) (*TransformationId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TransformationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TransformationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StreamingJobName, ok = parsed.Parsed["streamingJobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", *parsed) + if id.StreamingJobName, ok = input.Parsed["streamingJobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", input) } - if id.TransformationName, ok = parsed.Parsed["transformationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "transformationName", *parsed) + if id.TransformationName, ok = input.Parsed["transformationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "transformationName", input) } - return &id, nil + return nil } // ValidateTransformationID checks that 'input' can be parsed as a Transformation ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/outputs/id_output.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/outputs/id_output.go index b46cae1394bf..d3fac25aefde 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/outputs/id_output.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/outputs/id_output.go @@ -38,23 +38,9 @@ func ParseOutputID(input string) (*OutputId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OutputId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StreamingJobName, ok = parsed.Parsed["streamingJobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", *parsed) - } - - if id.OutputName, ok = parsed.Parsed["outputName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "outputName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseOutputIDInsensitively(input string) (*OutputId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := OutputId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *OutputId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StreamingJobName, ok = parsed.Parsed["streamingJobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", *parsed) + if id.StreamingJobName, ok = input.Parsed["streamingJobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", input) } - if id.OutputName, ok = parsed.Parsed["outputName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "outputName", *parsed) + if id.OutputName, ok = input.Parsed["outputName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "outputName", input) } - return &id, nil + return nil } // ValidateOutputID checks that 'input' can be parsed as a Output ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/outputs/id_streamingjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/outputs/id_streamingjob.go index c450f1d6cc6c..3b4caf5b7231 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/outputs/id_streamingjob.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/outputs/id_streamingjob.go @@ -36,19 +36,9 @@ func ParseStreamingJobID(input string) (*StreamingJobId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingJobId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.StreamingJobName, ok = parsed.Parsed["streamingJobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseStreamingJobIDInsensitively(input string) (*StreamingJobId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := StreamingJobId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *StreamingJobId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.StreamingJobName, ok = parsed.Parsed["streamingJobName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", *parsed) + if id.StreamingJobName, ok = input.Parsed["streamingJobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", input) } - return &id, nil + return nil } // ValidateStreamingJobID checks that 'input' can be parsed as a Streaming Job ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions/id_alias.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions/id_alias.go index a129ecbc1ee2..099ab3bd861b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions/id_alias.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions/id_alias.go @@ -32,11 +32,9 @@ func ParseAliasID(input string) (*AliasId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AliasId{} - - if id.AliasName, ok = parsed.Parsed["aliasName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "aliasName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseAliasIDInsensitively(input string) (*AliasId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AliasId{} - - if id.AliasName, ok = parsed.Parsed["aliasName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "aliasName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *AliasId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.AliasName, ok = input.Parsed["aliasName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "aliasName", input) + } + + return nil +} + // ValidateAliasID checks that 'input' can be parsed as a Alias ID func ValidateAliasID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions/id_billingaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions/id_billingaccount.go index 63e64d93cdfe..34a58dc9313d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions/id_billingaccount.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions/id_billingaccount.go @@ -32,11 +32,9 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BillingAccountId{} - - if id.BillingAccountId, ok = parsed.Parsed["billingAccountId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "billingAccountId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := BillingAccountId{} - - if id.BillingAccountId, ok = parsed.Parsed["billingAccountId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "billingAccountId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *BillingAccountId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.BillingAccountId, ok = input.Parsed["billingAccountId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "billingAccountId", input) + } + + return nil +} + // ValidateBillingAccountID checks that 'input' can be parsed as a Billing Account ID func ValidateBillingAccountID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions/id_providersubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions/id_providersubscription.go index 661b154bbdad..760f2413f5fb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions/id_providersubscription.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions/id_providersubscription.go @@ -32,11 +32,9 @@ func ParseProviderSubscriptionID(input string) (*ProviderSubscriptionId, error) return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderSubscriptionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseProviderSubscriptionIDInsensitively(input string) (*ProviderSubscripti return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ProviderSubscriptionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *ProviderSubscriptionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + return nil +} + // ValidateProviderSubscriptionID checks that 'input' can be parsed as a Provider Subscription ID func ValidateProviderSubscriptionID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions/id_subscriptionoperation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions/id_subscriptionoperation.go index 982d008cf4a8..75ec39c7e43a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions/id_subscriptionoperation.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions/id_subscriptionoperation.go @@ -32,11 +32,9 @@ func ParseSubscriptionOperationID(input string) (*SubscriptionOperationId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SubscriptionOperationId{} - - if id.OperationId, ok = parsed.Parsed["operationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -51,16 +49,24 @@ func ParseSubscriptionOperationIDInsensitively(input string) (*SubscriptionOpera return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SubscriptionOperationId{} - - if id.OperationId, ok = parsed.Parsed["operationId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "operationId", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil } +func (id *SubscriptionOperationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.OperationId, ok = input.Parsed["operationId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "operationId", input) + } + + return nil +} + // ValidateSubscriptionOperationID checks that 'input' can be parsed as a Subscription Operation ID func ValidateSubscriptionOperationID(input interface{}, key string) (warnings []string, errors []error) { v, ok := input.(string) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/id_accesspolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/id_accesspolicy.go index f145e9f97b86..5ce8ab6b0930 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/id_accesspolicy.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/id_accesspolicy.go @@ -38,23 +38,9 @@ func ParseAccessPolicyID(input string) (*AccessPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.EnvironmentName, ok = parsed.Parsed["environmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentName", *parsed) - } - - if id.AccessPolicyName, ok = parsed.Parsed["accessPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessPolicyName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAccessPolicyIDInsensitively(input string) (*AccessPolicyId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AccessPolicyId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AccessPolicyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.EnvironmentName, ok = parsed.Parsed["environmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentName", *parsed) + if id.EnvironmentName, ok = input.Parsed["environmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "environmentName", input) } - if id.AccessPolicyName, ok = parsed.Parsed["accessPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "accessPolicyName", *parsed) + if id.AccessPolicyName, ok = input.Parsed["accessPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "accessPolicyName", input) } - return &id, nil + return nil } // ValidateAccessPolicyID checks that 'input' can be parsed as a Access Policy ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/id_environment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/id_environment.go index f2bf3b3d5d6a..5e9383e8418b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/id_environment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/id_environment.go @@ -36,19 +36,9 @@ func ParseEnvironmentID(input string) (*EnvironmentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EnvironmentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.EnvironmentName, ok = parsed.Parsed["environmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseEnvironmentIDInsensitively(input string) (*EnvironmentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EnvironmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *EnvironmentId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.EnvironmentName, ok = parsed.Parsed["environmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentName", *parsed) + if id.EnvironmentName, ok = input.Parsed["environmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "environmentName", input) } - return &id, nil + return nil } // ValidateEnvironmentID checks that 'input' can be parsed as a Environment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/environments/id_environment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/environments/id_environment.go index f368e8f22517..0d9093d67666 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/environments/id_environment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/environments/id_environment.go @@ -36,19 +36,9 @@ func ParseEnvironmentID(input string) (*EnvironmentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EnvironmentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.EnvironmentName, ok = parsed.Parsed["environmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseEnvironmentIDInsensitively(input string) (*EnvironmentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EnvironmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *EnvironmentId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.EnvironmentName, ok = parsed.Parsed["environmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentName", *parsed) + if id.EnvironmentName, ok = input.Parsed["environmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "environmentName", input) } - return &id, nil + return nil } // ValidateEnvironmentID checks that 'input' can be parsed as a Environment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/eventsources/id_environment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/eventsources/id_environment.go index e31d977209da..c8eb93e44425 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/eventsources/id_environment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/eventsources/id_environment.go @@ -36,19 +36,9 @@ func ParseEnvironmentID(input string) (*EnvironmentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EnvironmentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.EnvironmentName, ok = parsed.Parsed["environmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseEnvironmentIDInsensitively(input string) (*EnvironmentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EnvironmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *EnvironmentId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.EnvironmentName, ok = parsed.Parsed["environmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentName", *parsed) + if id.EnvironmentName, ok = input.Parsed["environmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "environmentName", input) } - return &id, nil + return nil } // ValidateEnvironmentID checks that 'input' can be parsed as a Environment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/eventsources/id_eventsource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/eventsources/id_eventsource.go index 8b8967d015c3..0d8c0c9486c9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/eventsources/id_eventsource.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/eventsources/id_eventsource.go @@ -38,23 +38,9 @@ func ParseEventSourceID(input string) (*EventSourceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EventSourceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.EnvironmentName, ok = parsed.Parsed["environmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentName", *parsed) - } - - if id.EventSourceName, ok = parsed.Parsed["eventSourceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventSourceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseEventSourceIDInsensitively(input string) (*EventSourceId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EventSourceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *EventSourceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.EnvironmentName, ok = parsed.Parsed["environmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentName", *parsed) + if id.EnvironmentName, ok = input.Parsed["environmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "environmentName", input) } - if id.EventSourceName, ok = parsed.Parsed["eventSourceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "eventSourceName", *parsed) + if id.EventSourceName, ok = input.Parsed["eventSourceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "eventSourceName", input) } - return &id, nil + return nil } // ValidateEventSourceID checks that 'input' can be parsed as a Event Source ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/id_environment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/id_environment.go index 839e230a2b05..8cb510b80cbd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/id_environment.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/id_environment.go @@ -36,19 +36,9 @@ func ParseEnvironmentID(input string) (*EnvironmentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EnvironmentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.EnvironmentName, ok = parsed.Parsed["environmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseEnvironmentIDInsensitively(input string) (*EnvironmentId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EnvironmentId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *EnvironmentId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.EnvironmentName, ok = parsed.Parsed["environmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentName", *parsed) + if id.EnvironmentName, ok = input.Parsed["environmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "environmentName", input) } - return &id, nil + return nil } // ValidateEnvironmentID checks that 'input' can be parsed as a Environment ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/id_referencedataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/id_referencedataset.go index 690035b33276..3f193cdf561e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/id_referencedataset.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/id_referencedataset.go @@ -38,23 +38,9 @@ func ParseReferenceDataSetID(input string) (*ReferenceDataSetId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReferenceDataSetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.EnvironmentName, ok = parsed.Parsed["environmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentName", *parsed) - } - - if id.ReferenceDataSetName, ok = parsed.Parsed["referenceDataSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "referenceDataSetName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseReferenceDataSetIDInsensitively(input string) (*ReferenceDataSetId, er return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ReferenceDataSetId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ReferenceDataSetId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.EnvironmentName, ok = parsed.Parsed["environmentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "environmentName", *parsed) + if id.EnvironmentName, ok = input.Parsed["environmentName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "environmentName", input) } - if id.ReferenceDataSetName, ok = parsed.Parsed["referenceDataSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "referenceDataSetName", *parsed) + if id.ReferenceDataSetName, ok = input.Parsed["referenceDataSetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "referenceDataSetName", input) } - return &id, nil + return nil } // ValidateReferenceDataSetID checks that 'input' can be parsed as a Reference Data Set ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/id_endpointtype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/id_endpointtype.go index 7372f267399b..8ea4524bee40 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/id_endpointtype.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints/id_endpointtype.go @@ -40,35 +40,9 @@ func ParseEndpointTypeID(input string) (*EndpointTypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EndpointTypeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.TrafficManagerProfileName, ok = parsed.Parsed["trafficManagerProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trafficManagerProfileName", *parsed) - } - - if v, ok := parsed.Parsed["endpointType"]; true { - if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "endpointType", *parsed) - } - - endpointType, err := parseEndpointType(v) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) - } - id.EndpointType = *endpointType - } - - if id.EndpointName, ok = parsed.Parsed["endpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "endpointName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -83,38 +57,46 @@ func ParseEndpointTypeIDInsensitively(input string) (*EndpointTypeId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EndpointTypeId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *EndpointTypeId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.TrafficManagerProfileName, ok = parsed.Parsed["trafficManagerProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trafficManagerProfileName", *parsed) + if id.TrafficManagerProfileName, ok = input.Parsed["trafficManagerProfileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "trafficManagerProfileName", input) } - if v, ok := parsed.Parsed["endpointType"]; true { + if v, ok := input.Parsed["endpointType"]; true { if !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "endpointType", *parsed) + return resourceids.NewSegmentNotSpecifiedError(id, "endpointType", input) } endpointType, err := parseEndpointType(v) if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", v, err) + return fmt.Errorf("parsing %q: %+v", v, err) } id.EndpointType = *endpointType } - if id.EndpointName, ok = parsed.Parsed["endpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "endpointName", *parsed) + if id.EndpointName, ok = input.Parsed["endpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "endpointName", input) } - return &id, nil + return nil } // ValidateEndpointTypeID checks that 'input' can be parsed as a Endpoint Type ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/id_trafficmanagerprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/id_trafficmanagerprofile.go index 30f09acf1943..d6786d0cc280 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/id_trafficmanagerprofile.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles/id_trafficmanagerprofile.go @@ -36,19 +36,9 @@ func ParseTrafficManagerProfileID(input string) (*TrafficManagerProfileId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TrafficManagerProfileId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.TrafficManagerProfileName, ok = parsed.Parsed["trafficManagerProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trafficManagerProfileName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseTrafficManagerProfileIDInsensitively(input string) (*TrafficManagerPro return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TrafficManagerProfileId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *TrafficManagerProfileId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.TrafficManagerProfileName, ok = parsed.Parsed["trafficManagerProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "trafficManagerProfileName", *parsed) + if id.TrafficManagerProfileName, ok = input.Parsed["trafficManagerProfileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "trafficManagerProfileName", input) } - return &id, nil + return nil } // ValidateTrafficManagerProfileID checks that 'input' can be parsed as a Traffic Manager Profile ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_edgemodule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_edgemodule.go index 167de703ce0f..1d78f0e359b9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_edgemodule.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_edgemodule.go @@ -38,23 +38,9 @@ func ParseEdgeModuleID(input string) (*EdgeModuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EdgeModuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VideoAnalyzerName, ok = parsed.Parsed["videoAnalyzerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "videoAnalyzerName", *parsed) - } - - if id.EdgeModuleName, ok = parsed.Parsed["edgeModuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "edgeModuleName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseEdgeModuleIDInsensitively(input string) (*EdgeModuleId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := EdgeModuleId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *EdgeModuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VideoAnalyzerName, ok = parsed.Parsed["videoAnalyzerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "videoAnalyzerName", *parsed) + if id.VideoAnalyzerName, ok = input.Parsed["videoAnalyzerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "videoAnalyzerName", input) } - if id.EdgeModuleName, ok = parsed.Parsed["edgeModuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "edgeModuleName", *parsed) + if id.EdgeModuleName, ok = input.Parsed["edgeModuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "edgeModuleName", input) } - return &id, nil + return nil } // ValidateEdgeModuleID checks that 'input' can be parsed as a Edge Module ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_videoanalyzer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_videoanalyzer.go index 85dfb64ccba3..a0cf6d14a28f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_videoanalyzer.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_videoanalyzer.go @@ -36,19 +36,9 @@ func ParseVideoAnalyzerID(input string) (*VideoAnalyzerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VideoAnalyzerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VideoAnalyzerName, ok = parsed.Parsed["videoAnalyzerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "videoAnalyzerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVideoAnalyzerIDInsensitively(input string) (*VideoAnalyzerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VideoAnalyzerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VideoAnalyzerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VideoAnalyzerName, ok = parsed.Parsed["videoAnalyzerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "videoAnalyzerName", *parsed) + if id.VideoAnalyzerName, ok = input.Parsed["videoAnalyzerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "videoAnalyzerName", input) } - return &id, nil + return nil } // ValidateVideoAnalyzerID checks that 'input' can be parsed as a Video Analyzer ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_location.go index 7aa330d58115..7f3beca3d06c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_videoanalyzer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_videoanalyzer.go index 86006fb7fe28..c01217f419e1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_videoanalyzer.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_videoanalyzer.go @@ -36,19 +36,9 @@ func ParseVideoAnalyzerID(input string) (*VideoAnalyzerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VideoAnalyzerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VideoAnalyzerName, ok = parsed.Parsed["videoAnalyzerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "videoAnalyzerName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseVideoAnalyzerIDInsensitively(input string) (*VideoAnalyzerId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := VideoAnalyzerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *VideoAnalyzerId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.VideoAnalyzerName, ok = parsed.Parsed["videoAnalyzerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "videoAnalyzerName", *parsed) + if id.VideoAnalyzerName, ok = input.Parsed["videoAnalyzerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "videoAnalyzerName", input) } - return &id, nil + return nil } // ValidateVideoAnalyzerID checks that 'input' can be parsed as a Video Analyzer ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/authorizations/id_authorization.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/authorizations/id_authorization.go index e58f467d2538..7945ea43105c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/authorizations/id_authorization.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/authorizations/id_authorization.go @@ -38,23 +38,9 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AuthorizationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateCloudName, ok = parsed.Parsed["privateCloudName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", *parsed) - } - - if id.AuthorizationName, ok = parsed.Parsed["authorizationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := AuthorizationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AuthorizationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateCloudName, ok = parsed.Parsed["privateCloudName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", *parsed) + if id.PrivateCloudName, ok = input.Parsed["privateCloudName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", input) } - if id.AuthorizationName, ok = parsed.Parsed["authorizationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationName", *parsed) + if id.AuthorizationName, ok = input.Parsed["authorizationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "authorizationName", input) } - return &id, nil + return nil } // ValidateAuthorizationID checks that 'input' can be parsed as a Authorization ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/authorizations/id_privatecloud.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/authorizations/id_privatecloud.go index c36932fb77f9..9b36093f5a5a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/authorizations/id_privatecloud.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/authorizations/id_privatecloud.go @@ -36,19 +36,9 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateCloudId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateCloudName, ok = parsed.Parsed["privateCloudName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateCloudId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PrivateCloudId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateCloudName, ok = parsed.Parsed["privateCloudName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", *parsed) + if id.PrivateCloudName, ok = input.Parsed["privateCloudName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", input) } - return &id, nil + return nil } // ValidatePrivateCloudID checks that 'input' can be parsed as a Private Cloud ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/clusters/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/clusters/id_cluster.go index f544d575acc1..4b673ed8119f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/clusters/id_cluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/clusters/id_cluster.go @@ -38,23 +38,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateCloudName, ok = parsed.Parsed["privateCloudName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool 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 = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateCloudName, ok = parsed.Parsed["privateCloudName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", *parsed) + if id.PrivateCloudName, ok = input.Parsed["privateCloudName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/clusters/id_privatecloud.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/clusters/id_privatecloud.go index b430f33189b1..11c6266a8b38 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/clusters/id_privatecloud.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/clusters/id_privatecloud.go @@ -36,19 +36,9 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateCloudId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateCloudName, ok = parsed.Parsed["privateCloudName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateCloudId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PrivateCloudId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateCloudName, ok = parsed.Parsed["privateCloudName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", *parsed) + if id.PrivateCloudName, ok = input.Parsed["privateCloudName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", input) } - return &id, nil + return nil } // ValidatePrivateCloudID checks that 'input' can be parsed as a Private Cloud ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/datastores/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/datastores/id_cluster.go index bf119a816685..6a0d632dee66 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/datastores/id_cluster.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/datastores/id_cluster.go @@ -38,23 +38,9 @@ func ParseClusterID(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ClusterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateCloudName, ok = parsed.Parsed["privateCloudName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool 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 = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateCloudName, ok = parsed.Parsed["privateCloudName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", *parsed) + if id.PrivateCloudName, ok = input.Parsed["privateCloudName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - return &id, nil + return nil } // ValidateClusterID checks that 'input' can be parsed as a Cluster ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/datastores/id_datastore.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/datastores/id_datastore.go index c7295fb17851..b212d2e29dcb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/datastores/id_datastore.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/datastores/id_datastore.go @@ -40,27 +40,9 @@ func ParseDataStoreID(input string) (*DataStoreId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataStoreId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateCloudName, ok = parsed.Parsed["privateCloudName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", *parsed) - } - - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) - } - - if id.DataStoreName, ok = parsed.Parsed["dataStoreName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataStoreName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -75,30 +57,38 @@ func ParseDataStoreIDInsensitively(input string) (*DataStoreId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := DataStoreId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *DataStoreId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateCloudName, ok = parsed.Parsed["privateCloudName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", *parsed) + if id.PrivateCloudName, ok = input.Parsed["privateCloudName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", input) } - if id.ClusterName, ok = parsed.Parsed["clusterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "clusterName", *parsed) + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) } - if id.DataStoreName, ok = parsed.Parsed["dataStoreName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dataStoreName", *parsed) + if id.DataStoreName, ok = input.Parsed["dataStoreName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "dataStoreName", input) } - return &id, nil + return nil } // ValidateDataStoreID checks that 'input' can be parsed as a Data Store ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/privateclouds/id_privatecloud.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/privateclouds/id_privatecloud.go index b2ca8fa59a5b..1a5fc69da4e7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/privateclouds/id_privatecloud.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/privateclouds/id_privatecloud.go @@ -36,19 +36,9 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateCloudId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateCloudName, ok = parsed.Parsed["privateCloudName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateCloudId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *PrivateCloudId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.PrivateCloudName, ok = parsed.Parsed["privateCloudName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", *parsed) + if id.PrivateCloudName, ok = input.Parsed["privateCloudName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateCloudName", input) } - return &id, nil + return nil } // ValidatePrivateCloudID checks that 'input' can be parsed as a Private Cloud ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-04-03/communicationsgateways/id_communicationsgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-04-03/communicationsgateways/id_communicationsgateway.go index 38a7701c0cc4..f98e2c39d24f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-04-03/communicationsgateways/id_communicationsgateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-04-03/communicationsgateways/id_communicationsgateway.go @@ -36,19 +36,9 @@ func ParseCommunicationsGatewayID(input string) (*CommunicationsGatewayId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CommunicationsGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CommunicationsGatewayName, ok = parsed.Parsed["communicationsGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "communicationsGatewayName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseCommunicationsGatewayIDInsensitively(input string) (*CommunicationsGat return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CommunicationsGatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *CommunicationsGatewayId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CommunicationsGatewayName, ok = parsed.Parsed["communicationsGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "communicationsGatewayName", *parsed) + if id.CommunicationsGatewayName, ok = input.Parsed["communicationsGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "communicationsGatewayName", input) } - return &id, nil + return nil } // ValidateCommunicationsGatewayID checks that 'input' can be parsed as a Communications Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-04-03/testlines/id_communicationsgateway.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-04-03/testlines/id_communicationsgateway.go index 8bd5ef1d8da4..45f0df7f2a67 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-04-03/testlines/id_communicationsgateway.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-04-03/testlines/id_communicationsgateway.go @@ -36,19 +36,9 @@ func ParseCommunicationsGatewayID(input string) (*CommunicationsGatewayId, error return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CommunicationsGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CommunicationsGatewayName, ok = parsed.Parsed["communicationsGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "communicationsGatewayName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseCommunicationsGatewayIDInsensitively(input string) (*CommunicationsGat return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CommunicationsGatewayId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *CommunicationsGatewayId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CommunicationsGatewayName, ok = parsed.Parsed["communicationsGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "communicationsGatewayName", *parsed) + if id.CommunicationsGatewayName, ok = input.Parsed["communicationsGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "communicationsGatewayName", input) } - return &id, nil + return nil } // ValidateCommunicationsGatewayID checks that 'input' can be parsed as a Communications Gateway ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-04-03/testlines/id_testline.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-04-03/testlines/id_testline.go index 17bf51b37474..2298ed133bbb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-04-03/testlines/id_testline.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-04-03/testlines/id_testline.go @@ -38,23 +38,9 @@ func ParseTestLineID(input string) (*TestLineId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TestLineId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CommunicationsGatewayName, ok = parsed.Parsed["communicationsGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "communicationsGatewayName", *parsed) - } - - if id.TestLineName, ok = parsed.Parsed["testLineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "testLineName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseTestLineIDInsensitively(input string) (*TestLineId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := TestLineId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *TestLineId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.CommunicationsGatewayName, ok = parsed.Parsed["communicationsGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "communicationsGatewayName", *parsed) + if id.CommunicationsGatewayName, ok = input.Parsed["communicationsGatewayName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "communicationsGatewayName", input) } - if id.TestLineName, ok = parsed.Parsed["testLineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "testLineName", *parsed) + if id.TestLineName, ok = input.Parsed["testLineName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "testLineName", input) } - return &id, nil + return nil } // ValidateTestLineID checks that 'input' can be parsed as a Test Line ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/id_connection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/id_connection.go index baaa3e966e42..19e7527bdb05 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/id_connection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections/id_connection.go @@ -36,19 +36,9 @@ func ParseConnectionID(input string) (*ConnectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ConnectionId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) + if id.ConnectionName, ok = input.Parsed["connectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "connectionName", input) } - return &id, nil + return nil } // ValidateConnectionID checks that 'input' can be parsed as a Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/id_location.go index 929a70b6bf4e..87a6b1244cef 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/id_managedapi.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/id_managedapi.go index 5391fbfe8c61..ff0124a2279f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/id_managedapi.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis/id_managedapi.go @@ -36,19 +36,9 @@ func ParseManagedApiID(input string) (*ManagedApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedApiId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - if id.ManagedApiName, ok = parsed.Parsed["managedApiName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedApiName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseManagedApiIDInsensitively(input string) (*ManagedApiId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ManagedApiId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ManagedApiId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - if id.ManagedApiName, ok = parsed.Parsed["managedApiName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managedApiName", *parsed) + if id.ManagedApiName, ok = input.Parsed["managedApiName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "managedApiName", input) } - return &id, nil + return nil } // ValidateManagedApiID checks that 'input' can be parsed as a Managed Api ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_customcertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_customcertificate.go index ce60ff4072c8..c2a5644f26da 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_customcertificate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_customcertificate.go @@ -38,23 +38,9 @@ func ParseCustomCertificateID(input string) (*CustomCertificateId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CustomCertificateId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WebPubSubName, ok = parsed.Parsed["webPubSubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", *parsed) - } - - if id.CustomCertificateName, ok = parsed.Parsed["customCertificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "customCertificateName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCustomCertificateIDInsensitively(input string) (*CustomCertificateId, return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CustomCertificateId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CustomCertificateId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WebPubSubName, ok = parsed.Parsed["webPubSubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", *parsed) + if id.WebPubSubName, ok = input.Parsed["webPubSubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", input) } - if id.CustomCertificateName, ok = parsed.Parsed["customCertificateName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "customCertificateName", *parsed) + if id.CustomCertificateName, ok = input.Parsed["customCertificateName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "customCertificateName", input) } - return &id, nil + return nil } // ValidateCustomCertificateID checks that 'input' can be parsed as a Custom Certificate ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_customdomain.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_customdomain.go index c0a1c1f006dc..5e9bb62a2281 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_customdomain.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_customdomain.go @@ -38,23 +38,9 @@ func ParseCustomDomainID(input string) (*CustomDomainId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CustomDomainId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WebPubSubName, ok = parsed.Parsed["webPubSubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", *parsed) - } - - if id.CustomDomainName, ok = parsed.Parsed["customDomainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "customDomainName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseCustomDomainIDInsensitively(input string) (*CustomDomainId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := CustomDomainId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CustomDomainId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WebPubSubName, ok = parsed.Parsed["webPubSubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", *parsed) + if id.WebPubSubName, ok = input.Parsed["webPubSubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", input) } - if id.CustomDomainName, ok = parsed.Parsed["customDomainName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "customDomainName", *parsed) + if id.CustomDomainName, ok = input.Parsed["customDomainName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "customDomainName", input) } - return &id, nil + return nil } // ValidateCustomDomainID checks that 'input' can be parsed as a Custom Domain ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_hub.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_hub.go index 4609929da3ce..1403c815ce4b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_hub.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_hub.go @@ -38,23 +38,9 @@ func ParseHubID(input string) (*HubId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HubId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WebPubSubName, ok = parsed.Parsed["webPubSubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", *parsed) - } - - if id.HubName, ok = parsed.Parsed["hubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hubName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseHubIDInsensitively(input string) (*HubId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := HubId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *HubId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WebPubSubName, ok = parsed.Parsed["webPubSubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", *parsed) + if id.WebPubSubName, ok = input.Parsed["webPubSubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", input) } - if id.HubName, ok = parsed.Parsed["hubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hubName", *parsed) + if id.HubName, ok = input.Parsed["hubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "hubName", input) } - return &id, nil + return nil } // ValidateHubID checks that 'input' can be parsed as a Hub ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_location.go index 1ad476be0aab..ab388f16be16 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_location.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_location.go @@ -34,15 +34,9 @@ func ParseLocationID(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -57,18 +51,26 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := LocationId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) } - return &id, nil + return nil } // ValidateLocationID checks that 'input' can be parsed as a Location ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_privateendpointconnection.go index 47d7ac4f5be9..442137c977b8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_privateendpointconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_privateendpointconnection.go @@ -38,23 +38,9 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WebPubSubName, ok = parsed.Parsed["webPubSubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := PrivateEndpointConnectionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WebPubSubName, ok = parsed.Parsed["webPubSubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", *parsed) + if id.WebPubSubName, ok = input.Parsed["webPubSubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", input) } - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) + if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", input) } - return &id, nil + return nil } // ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_sharedprivatelinkresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_sharedprivatelinkresource.go index 5d844134fee0..d74460f68441 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_sharedprivatelinkresource.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_sharedprivatelinkresource.go @@ -38,23 +38,9 @@ func ParseSharedPrivateLinkResourceID(input string) (*SharedPrivateLinkResourceI return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SharedPrivateLinkResourceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WebPubSubName, ok = parsed.Parsed["webPubSubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", *parsed) - } - - if id.SharedPrivateLinkResourceName, ok = parsed.Parsed["sharedPrivateLinkResourceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sharedPrivateLinkResourceName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -69,26 +55,34 @@ func ParseSharedPrivateLinkResourceIDInsensitively(input string) (*SharedPrivate return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := SharedPrivateLinkResourceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SharedPrivateLinkResourceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WebPubSubName, ok = parsed.Parsed["webPubSubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", *parsed) + if id.WebPubSubName, ok = input.Parsed["webPubSubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", input) } - if id.SharedPrivateLinkResourceName, ok = parsed.Parsed["sharedPrivateLinkResourceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "sharedPrivateLinkResourceName", *parsed) + if id.SharedPrivateLinkResourceName, ok = input.Parsed["sharedPrivateLinkResourceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "sharedPrivateLinkResourceName", input) } - return &id, nil + return nil } // ValidateSharedPrivateLinkResourceID checks that 'input' can be parsed as a Shared Private Link Resource ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_webpubsub.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_webpubsub.go index df95162f6af9..4c617e5da720 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_webpubsub.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub/id_webpubsub.go @@ -36,19 +36,9 @@ func ParseWebPubSubID(input string) (*WebPubSubId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WebPubSubId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.WebPubSubName, ok = parsed.Parsed["webPubSubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseWebPubSubIDInsensitively(input string) (*WebPubSubId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := WebPubSubId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *WebPubSubId) 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 = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.WebPubSubName, ok = parsed.Parsed["webPubSubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", *parsed) + if id.WebPubSubName, ok = input.Parsed["webPubSubName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "webPubSubName", input) } - return &id, nil + return nil } // ValidateWebPubSubID checks that 'input' can be parsed as a Web Pub Sub ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/cached_authorizer.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/cached_authorizer.go index 6043dda77cec..c01c57a56aaf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/cached_authorizer.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/cached_authorizer.go @@ -8,11 +8,12 @@ import ( "fmt" "net/http" "sync" + "time" "golang.org/x/oauth2" ) -var _ Authorizer = &CachedAuthorizer{} +var _ CachingAuthorizer = &CachedAuthorizer{} // CachedAuthorizer caches a token until it expires, then acquires a new token from Source type CachedAuthorizer struct { @@ -54,7 +55,7 @@ func (c *CachedAuthorizer) AuxiliaryTokens(ctx context.Context, req *http.Reques } c.mutex.RUnlock() - if !dueForRenewal { + if dueForRenewal || len(c.auxTokens) == 0 { c.mutex.Lock() defer c.mutex.Unlock() var err error @@ -67,9 +68,22 @@ func (c *CachedAuthorizer) AuxiliaryTokens(ctx context.Context, req *http.Reques return c.auxTokens, nil } +// InvalidateCachedTokens expires the currently cached token and auxTokens, forcing new +// tokens to be acquired when Token() or AuxiliaryTokens() are next called +func (c *CachedAuthorizer) InvalidateCachedTokens() error { + if c.token == nil { + return nil + } + c.token.Expiry = time.Now() + for i := range c.auxTokens { + c.auxTokens[i].Expiry = time.Now() + } + return nil +} + // NewCachedAuthorizer returns an Authorizer that caches an access token for the duration of its validity. // If the cached token expires, a new one is acquired and cached. -func NewCachedAuthorizer(src Authorizer) (Authorizer, error) { +func NewCachedAuthorizer(src Authorizer) (CachingAuthorizer, error) { if _, ok := src.(*SharedKeyAuthorizer); ok { return nil, fmt.Errorf("internal-error: SharedKeyAuthorizer cannot be cached") } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/interface.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/interface.go index 7620f5d76f9d..4736418a1d47 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/interface.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/interface.go @@ -12,11 +12,22 @@ import ( // Authorizer is anything that can return an access token for authorizing API connections type Authorizer interface { + // Token obtains a new access token for the configured tenant Token(ctx context.Context, request *http.Request) (*oauth2.Token, error) + // AuxiliaryTokens obtains new access tokens for the configured auxiliary tenants AuxiliaryTokens(ctx context.Context, request *http.Request) ([]*oauth2.Token, error) } +// CachingAuthorizer implements Authorizer whilst caching access tokens and offering a way to intentionally invalidate them +type CachingAuthorizer interface { + Authorizer + + // InvalidateCachedTokens invalidates any cached access tokens, so that new tokens are automatically + // retrieved from the authorization service on the next call to Token or AuxiliaryTokens. + InvalidateCachedTokens() error +} + // HTTPClient is an HTTP client used for sending authentication requests and obtaining tokens type HTTPClient interface { Do(req *http.Request) (*http.Response, error) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/shared_key_authorizer.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/shared_key_authorizer.go index e817bb438bae..3a9ff1ea7ba5 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/shared_key_authorizer.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/shared_key_authorizer.go @@ -64,8 +64,6 @@ func (s *SharedKeyAuthorizer) AuxiliaryTokens(_ context.Context, _ *http.Request return []*oauth2.Token{}, nil } -// --- - const ( storageEmulatorAccountName string = "devstoreaccount1" diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/token.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/token.go index 864b2d2fea34..ddd31d17c99d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/token.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/token.go @@ -4,15 +4,42 @@ package auth import ( - "golang.org/x/oauth2" + "context" + "fmt" + "net/http" "time" "github.com/hashicorp/go-azure-sdk/sdk/claims" + "golang.org/x/oauth2" ) +// SetAuthHeader decorates a *http.Request with the Authorization header using a bearer token obtained from the Token +// method of the supplied Authorizer. +func SetAuthHeader(ctx context.Context, req *http.Request, authorizer Authorizer) error { + if req == nil { + return fmt.Errorf("request was nil") + } + if authorizer == nil { + return fmt.Errorf("authorizer was nil") + } + + token, err := authorizer.Token(ctx, req) + if err != nil { + return err + } + + if req.Header == nil { + req.Header = make(http.Header) + } + + req.Header.Set("Authorization", fmt.Sprintf("%s %s", token.Type(), token.AccessToken)) + + return nil +} + const tokenExpiryDelta = 20 * time.Minute -// tokenExpiresSoon returns true if the token expires within 10 minutes, or if more than 50% of its validity period has elapsed (if this can be determined), whichever is later +// tokenDueForRenewal returns true if the token expires within 10 minutes, or if more than 50% of its validity period has elapsed (if this can be determined), whichever is later func tokenDueForRenewal(token *oauth2.Token) bool { if token == nil { return true @@ -26,7 +53,11 @@ func tokenDueForRenewal(token *oauth2.Token) bool { expiry := token.Expiry.Round(0) delta := tokenExpiryDelta now := time.Now() - expiresWithinTenMinutes := expiry.Add(-delta).Before(now) + + // Always return early if the token validity doesn't extend past the expiry delta + if expiry.Add(-delta).Before(now) { + return true + } // Try to parse the token claims to retrieve the issuedAt time if claims, err := claims.ParseClaims(token); err == nil { @@ -43,5 +74,5 @@ func tokenDueForRenewal(token *oauth2.Token) bool { } } - return expiresWithinTenMinutes + return false } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/claims/claims.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/claims/claims.go index 97683b0c65f2..15444cdf36d1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/claims/claims.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/claims/claims.go @@ -15,6 +15,7 @@ import ( // Claims is used to unmarshall the claims from a JWT issued by the Microsoft Identity Platform. type Claims struct { Audience string `json:"aud"` + Expires int64 `json:"exp"` IssuedAt int64 `json:"iat"` Issuer string `json:"iss"` IdentityProvider string `json:"idp"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/client.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/client.go index 1710691f44ea..5dc6879f87cd 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/client.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/client.go @@ -68,7 +68,8 @@ func RequestRetryAll(retryFuncs ...RequestRetryFunc) func(resp *http.Response, o } } -// RetryableErrorHandler simply returns the resp and err, this is needed to makes the retryablehttp client's Do() return early with the response body not drained. +// RetryableErrorHandler simply returns the resp and err, this is needed to make the Do() method +// of retryablehttp client return early with the response body not drained. func RetryableErrorHandler(resp *http.Response, err error, _ int) (*http.Response, error) { return resp, err } @@ -260,6 +261,11 @@ type Client struct { // Authorizer is anything that can provide an access token with which to authorize requests. Authorizer auth.Authorizer + // AuthorizeRequest is an optional function to decorate a Request for authorization prior to being sent. + // When nil, a standard Authorization header will be added using a bearer token as returned by the Token method + // of the configured Authorizer. Define this function in order to customize the request authorization. + AuthorizeRequest func(context.Context, *http.Request, auth.Authorizer) error + // DisableRetries prevents the client from reattempting failed requests (which it does to work around eventual consistency issues). // This does not impact handling of retries related to rate limiting, which are always performed. DisableRetries bool @@ -327,14 +333,15 @@ func (c *Client) Execute(ctx context.Context, req *Request) (*Response, error) { return nil, fmt.Errorf("req.Request was nil") } - // at this point we're ready to send the HTTP Request, as such let's get the Authorization token - // and add that to the request - if c.Authorizer != nil { - token, err := c.Authorizer.Token(ctx, req.Request) - if err != nil { - return nil, err + // Authorize the request + if c.AuthorizeRequest != nil { + if err := c.AuthorizeRequest(ctx, req.Request, c.Authorizer); err != nil { + return nil, fmt.Errorf("authorizing request: %+v", err) + } + } else if c.Authorizer != nil { + if err := auth.SetAuthHeader(ctx, req.Request, c.Authorizer); err != nil { + return nil, fmt.Errorf("authorizing request: %+v", err) } - token.SetAuthHeader(req.Request) } var err error diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/msgraph/client.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/msgraph/client.go index 32ffa14d51a1..3cf67d08f25d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/msgraph/client.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/msgraph/client.go @@ -50,6 +50,7 @@ func NewMsGraphClient(api environments.Api, serviceName string, apiVersion ApiVe } func (c *Client) NewRequest(ctx context.Context, input client.RequestOptions) (*client.Request, error) { + // TODO move these validations to base client method if _, ok := ctx.Deadline(); !ok { return nil, fmt.Errorf("the context used must have a deadline attached for polling purposes, but got no deadline") } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/authorization.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/authorization.go new file mode 100644 index 000000000000..7a6bdc04cce7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/authorization.go @@ -0,0 +1,45 @@ +package resourcemanager + +import ( + "context" + "fmt" + "net/http" + "strings" + + "github.com/hashicorp/go-azure-sdk/sdk/auth" +) + +func AuthorizeResourceManagerRequest(ctx context.Context, req *http.Request, authorizer auth.Authorizer) error { + if req == nil { + return fmt.Errorf("request was nil") + } + if authorizer == nil { + return fmt.Errorf("authorizer was nil") + } + + token, err := authorizer.Token(ctx, req) + if err != nil { + return err + } + + if req.Header == nil { + req.Header = make(http.Header) + } + + req.Header.Set("Authorization", fmt.Sprintf("%s %s", token.Type(), token.AccessToken)) + + auxTokens, err := authorizer.AuxiliaryTokens(ctx, req) + if err != nil { + return err + } + + auxTokenValues := make([]string, 0) + for _, auxToken := range auxTokens { + auxTokenValues = append(auxTokenValues, fmt.Sprintf("%s %s", auxToken.Type(), auxToken.AccessToken)) + } + if len(auxTokenValues) > 0 { + req.Header.Set("X-Ms-Authorization-Auxiliary", strings.Join(auxTokenValues, ", ")) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/client.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/client.go index d712ca12c831..104b4c002f2a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/client.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/client.go @@ -28,7 +28,10 @@ func NewResourceManagerClient(api environments.Api, serviceName, apiVersion stri if !ok { return nil, fmt.Errorf("no `endpoint` was returned for this environment") } + baseClient := client.NewClient(*endpoint, serviceName, apiVersion) + baseClient.AuthorizeRequest = AuthorizeResourceManagerRequest + return &Client{ Client: baseClient, apiVersion: apiVersion, @@ -36,6 +39,7 @@ func NewResourceManagerClient(api environments.Api, serviceName, apiVersion stri } func (c *Client) NewRequest(ctx context.Context, input client.RequestOptions) (*client.Request, error) { + // TODO move these validations to base client method if _, ok := ctx.Deadline(); !ok { return nil, fmt.Errorf("the context used must have a deadline attached for polling purposes, but got no deadline") } diff --git a/vendor/modules.txt b/vendor/modules.txt index a7ca76d14341..68967fbdd4a4 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -138,7 +138,7 @@ github.com/google/uuid # github.com/hashicorp/errwrap v1.1.0 ## explicit github.com/hashicorp/errwrap -# github.com/hashicorp/go-azure-helpers v0.63.0 +# github.com/hashicorp/go-azure-helpers v0.64.0 ## explicit; go 1.21 github.com/hashicorp/go-azure-helpers/authentication github.com/hashicorp/go-azure-helpers/eventhub @@ -158,7 +158,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.20231124.1163225 +# github.com/hashicorp/go-azure-sdk v0.20231129.1103252 ## 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