diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/elasticsans/id_elasticsan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/elasticsans/id_elasticsan.go index 9f2a55ce57b9..967671e878e9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/elasticsans/id_elasticsan.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/elasticsans/id_elasticsan.go @@ -36,19 +36,9 @@ func ParseElasticSanID(input string) (*ElasticSanId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ElasticSanId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseElasticSanIDInsensitively(input string) (*ElasticSanId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ElasticSanId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ElasticSanId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *parsed) + if id.ElasticSanName, ok = input.Parsed["elasticSanName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", input) } - return &id, nil + return nil } // ValidateElasticSanID checks that 'input' can be parsed as a Elastic San ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/privateendpointconnections/id_elasticsan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/privateendpointconnections/id_elasticsan.go index b6ea7485c9aa..4c86ecf9e5e6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/privateendpointconnections/id_elasticsan.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/privateendpointconnections/id_elasticsan.go @@ -36,19 +36,9 @@ func ParseElasticSanID(input string) (*ElasticSanId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ElasticSanId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseElasticSanIDInsensitively(input string) (*ElasticSanId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ElasticSanId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ElasticSanId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *parsed) + if id.ElasticSanName, ok = input.Parsed["elasticSanName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", input) } - return &id, nil + return nil } // ValidateElasticSanID checks that 'input' can be parsed as a Elastic San ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/privateendpointconnections/id_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/privateendpointconnections/id_privateendpointconnection.go index 8a120ad0c468..fb232fbdd651 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/privateendpointconnections/id_privateendpointconnection.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/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.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *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.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *parsed) + if id.ElasticSanName, ok = input.Parsed["elasticSanName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", 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/elasticsan/2023-01-01/privatelinkresources/id_elasticsan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/privatelinkresources/id_elasticsan.go index 80bd09816421..6873959b4317 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/privatelinkresources/id_elasticsan.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/privatelinkresources/id_elasticsan.go @@ -36,19 +36,9 @@ func ParseElasticSanID(input string) (*ElasticSanId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ElasticSanId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseElasticSanIDInsensitively(input string) (*ElasticSanId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ElasticSanId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ElasticSanId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *parsed) + if id.ElasticSanName, ok = input.Parsed["elasticSanName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", input) } - return &id, nil + return nil } // ValidateElasticSanID checks that 'input' can be parsed as a Elastic San ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/snapshots/id_snapshot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/snapshots/id_snapshot.go index f75aae076b10..1377b208d6ca 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/snapshots/id_snapshot.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/snapshots/id_snapshot.go @@ -40,27 +40,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.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *parsed) - } - - if id.VolumeGroupName, ok = parsed.Parsed["volumeGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeGroupName", *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 @@ -75,30 +57,38 @@ 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 + } - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + return &id, nil +} + +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.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *parsed) + if id.ElasticSanName, ok = input.Parsed["elasticSanName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", 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) } - 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/elasticsan/2023-01-01/snapshots/id_volumegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/snapshots/id_volumegroup.go index 4714353510af..9b59a86ebd79 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/snapshots/id_volumegroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/snapshots/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.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *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.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *parsed) + if id.ElasticSanName, ok = input.Parsed["elasticSanName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", 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/elasticsan/2023-01-01/volumegroups/id_elasticsan.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/volumegroups/id_elasticsan.go index 9589feae5f2d..4b2cb31b7f60 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/volumegroups/id_elasticsan.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/volumegroups/id_elasticsan.go @@ -36,19 +36,9 @@ func ParseElasticSanID(input string) (*ElasticSanId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ElasticSanId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *parsed) + if err := id.FromParseResult(*parsed); err != nil { + return nil, err } return &id, nil @@ -63,22 +53,30 @@ func ParseElasticSanIDInsensitively(input string) (*ElasticSanId, error) { return nil, fmt.Errorf("parsing %q: %+v", input, err) } - var ok bool id := ElasticSanId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) +func (id *ElasticSanId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) } - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) } - if id.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *parsed) + if id.ElasticSanName, ok = input.Parsed["elasticSanName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", input) } - return &id, nil + return nil } // ValidateElasticSanID checks that 'input' can be parsed as a Elastic San ID diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/volumegroups/id_volumegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/volumegroups/id_volumegroup.go index 32844829f153..c152f9b32b20 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/volumegroups/id_volumegroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-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.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *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.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *parsed) + if id.ElasticSanName, ok = input.Parsed["elasticSanName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", 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/elasticsan/2023-01-01/volumes/id_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/volumes/id_volume.go index 96488682d247..ed6078fa4721 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/volumes/id_volume.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-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.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *parsed) - } - - if id.VolumeGroupName, ok = parsed.Parsed["volumeGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "volumeGroupName", *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.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *parsed) + if id.ElasticSanName, ok = input.Parsed["elasticSanName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", 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) } - 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/elasticsan/2023-01-01/volumes/id_volumegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/volumes/id_volumegroup.go index 11e9bdda4312..c8c0d3ac788c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/volumes/id_volumegroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/volumes/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.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *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.ElasticSanName, ok = parsed.Parsed["elasticSanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", *parsed) + if id.ElasticSanName, ok = input.Parsed["elasticSanName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "elasticSanName", 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