diff --git a/resource-manager/qumulostorage/2024-06-19/client.go b/resource-manager/qumulostorage/2024-06-19/client.go new file mode 100644 index 00000000000..2a13a043b85 --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/client.go @@ -0,0 +1,28 @@ +package v2024_06_19 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/resource-manager/qumulostorage/2024-06-19/filesystems" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +type Client struct { + FileSystems *filesystems.FileSystemsClient +} + +func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { + fileSystemsClient, err := filesystems.NewFileSystemsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building FileSystems client: %+v", err) + } + configureFunc(fileSystemsClient.Client) + + return &Client{ + FileSystems: fileSystemsClient, + }, nil +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/README.md b/resource-manager/qumulostorage/2024-06-19/filesystems/README.md new file mode 100644 index 00000000000..2eceaee442a --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/README.md @@ -0,0 +1,121 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/qumulostorage/2024-06-19/filesystems` Documentation + +The `filesystems` SDK allows for interaction with the Azure Resource Manager Service `qumulostorage` (API Version `2024-06-19`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/qumulostorage/2024-06-19/filesystems" +``` + + +### Client Initialization + +```go +client := filesystems.NewFileSystemsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `FileSystemsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := filesystems.NewFileSystemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "fileSystemValue") + +payload := filesystems.LiftrBaseStorageFileSystemResource{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `FileSystemsClient.Delete` + +```go +ctx := context.TODO() +id := filesystems.NewFileSystemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "fileSystemValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `FileSystemsClient.Get` + +```go +ctx := context.TODO() +id := filesystems.NewFileSystemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "fileSystemValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `FileSystemsClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `FileSystemsClient.ListBySubscription` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination +items, err := client.ListBySubscriptionComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `FileSystemsClient.Update` + +```go +ctx := context.TODO() +id := filesystems.NewFileSystemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "fileSystemValue") + +payload := filesystems.LiftrBaseStorageFileSystemResourceUpdate{ + // ... +} + + +read, err := client.Update(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/client.go b/resource-manager/qumulostorage/2024-06-19/filesystems/client.go new file mode 100644 index 00000000000..f97ef184323 --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/client.go @@ -0,0 +1,26 @@ +package filesystems + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FileSystemsClient struct { + Client *resourcemanager.Client +} + +func NewFileSystemsClientWithBaseURI(sdkApi sdkEnv.Api) (*FileSystemsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "filesystems", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating FileSystemsClient: %+v", err) + } + + return &FileSystemsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/constants.go b/resource-manager/qumulostorage/2024-06-19/filesystems/constants.go new file mode 100644 index 00000000000..3a7cd9af725 --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/constants.go @@ -0,0 +1,116 @@ +package filesystems + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MarketplaceSubscriptionStatus string + +const ( + MarketplaceSubscriptionStatusPendingFulfillmentStart MarketplaceSubscriptionStatus = "PendingFulfillmentStart" + MarketplaceSubscriptionStatusSubscribed MarketplaceSubscriptionStatus = "Subscribed" + MarketplaceSubscriptionStatusSuspended MarketplaceSubscriptionStatus = "Suspended" + MarketplaceSubscriptionStatusUnsubscribed MarketplaceSubscriptionStatus = "Unsubscribed" +) + +func PossibleValuesForMarketplaceSubscriptionStatus() []string { + return []string{ + string(MarketplaceSubscriptionStatusPendingFulfillmentStart), + string(MarketplaceSubscriptionStatusSubscribed), + string(MarketplaceSubscriptionStatusSuspended), + string(MarketplaceSubscriptionStatusUnsubscribed), + } +} + +func (s *MarketplaceSubscriptionStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMarketplaceSubscriptionStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMarketplaceSubscriptionStatus(input string) (*MarketplaceSubscriptionStatus, error) { + vals := map[string]MarketplaceSubscriptionStatus{ + "pendingfulfillmentstart": MarketplaceSubscriptionStatusPendingFulfillmentStart, + "subscribed": MarketplaceSubscriptionStatusSubscribed, + "suspended": MarketplaceSubscriptionStatusSuspended, + "unsubscribed": MarketplaceSubscriptionStatusUnsubscribed, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MarketplaceSubscriptionStatus(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateAccepted ProvisioningState = "Accepted" + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleted ProvisioningState = "Deleted" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateAccepted), + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), + string(ProvisioningStateDeleted), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "accepted": ProvisioningStateAccepted, + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, + "deleted": ProvisioningStateDeleted, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/id_filesystem.go b/resource-manager/qumulostorage/2024-06-19/filesystems/id_filesystem.go new file mode 100644 index 00000000000..d7ec6523138 --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/id_filesystem.go @@ -0,0 +1,130 @@ +package filesystems + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&FileSystemId{}) +} + +var _ resourceids.ResourceId = &FileSystemId{} + +// FileSystemId is a struct representing the Resource ID for a File System +type FileSystemId struct { + SubscriptionId string + ResourceGroupName string + FileSystemName string +} + +// NewFileSystemID returns a new FileSystemId struct +func NewFileSystemID(subscriptionId string, resourceGroupName string, fileSystemName string) FileSystemId { + return FileSystemId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + FileSystemName: fileSystemName, + } +} + +// ParseFileSystemID parses 'input' into a FileSystemId +func ParseFileSystemID(input string) (*FileSystemId, error) { + parser := resourceids.NewParserFromResourceIdType(&FileSystemId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FileSystemId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseFileSystemIDInsensitively parses 'input' case-insensitively into a FileSystemId +// note: this method should only be used for API response data and not user input +func ParseFileSystemIDInsensitively(input string) (*FileSystemId, error) { + parser := resourceids.NewParserFromResourceIdType(&FileSystemId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FileSystemId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FileSystemId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.FileSystemName, ok = input.Parsed["fileSystemName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "fileSystemName", input) + } + + return nil +} + +// ValidateFileSystemID checks that 'input' can be parsed as a File System ID +func ValidateFileSystemID(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 := ParseFileSystemID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted File System ID +func (id FileSystemId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Qumulo.Storage/fileSystems/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FileSystemName) +} + +// Segments returns a slice of Resource ID Segments which comprise this File System ID +func (id FileSystemId) 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("staticQumuloStorage", "Qumulo.Storage", "Qumulo.Storage"), + resourceids.StaticSegment("staticFileSystems", "fileSystems", "fileSystems"), + resourceids.UserSpecifiedSegment("fileSystemName", "fileSystemValue"), + } +} + +// String returns a human-readable description of this File System ID +func (id FileSystemId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("File System Name: %q", id.FileSystemName), + } + return fmt.Sprintf("File System (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/id_filesystem_test.go b/resource-manager/qumulostorage/2024-06-19/filesystems/id_filesystem_test.go new file mode 100644 index 00000000000..ad862762952 --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/id_filesystem_test.go @@ -0,0 +1,282 @@ +package filesystems + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &FileSystemId{} + +func TestNewFileSystemID(t *testing.T) { + id := NewFileSystemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "fileSystemValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.FileSystemName != "fileSystemValue" { + t.Fatalf("Expected %q but got %q for Segment 'FileSystemName'", id.FileSystemName, "fileSystemValue") + } +} + +func TestFormatFileSystemID(t *testing.T) { + actual := NewFileSystemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "fileSystemValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Qumulo.Storage/fileSystems/fileSystemValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseFileSystemID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *FileSystemId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Qumulo.Storage", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Qumulo.Storage/fileSystems", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Qumulo.Storage/fileSystems/fileSystemValue", + Expected: &FileSystemId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + FileSystemName: "fileSystemValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Qumulo.Storage/fileSystems/fileSystemValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseFileSystemID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", 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.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.FileSystemName != v.Expected.FileSystemName { + t.Fatalf("Expected %q but got %q for FileSystemName", v.Expected.FileSystemName, actual.FileSystemName) + } + + } +} + +func TestParseFileSystemIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *FileSystemId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Qumulo.Storage", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/qUmUlO.StOrAgE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Qumulo.Storage/fileSystems", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/qUmUlO.StOrAgE/fIlEsYsTeMs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Qumulo.Storage/fileSystems/fileSystemValue", + Expected: &FileSystemId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + FileSystemName: "fileSystemValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Qumulo.Storage/fileSystems/fileSystemValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/qUmUlO.StOrAgE/fIlEsYsTeMs/fIlEsYsTeMvAlUe", + Expected: &FileSystemId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + FileSystemName: "fIlEsYsTeMvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/qUmUlO.StOrAgE/fIlEsYsTeMs/fIlEsYsTeMvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseFileSystemIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", 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.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.FileSystemName != v.Expected.FileSystemName { + t.Fatalf("Expected %q but got %q for FileSystemName", v.Expected.FileSystemName, actual.FileSystemName) + } + + } +} + +func TestSegmentsForFileSystemId(t *testing.T) { + segments := FileSystemId{}.Segments() + if len(segments) == 0 { + t.Fatalf("FileSystemId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/method_createorupdate.go b/resource-manager/qumulostorage/2024-06-19/filesystems/method_createorupdate.go new file mode 100644 index 00000000000..9282a3878a7 --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/method_createorupdate.go @@ -0,0 +1,75 @@ +package filesystems + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *LiftrBaseStorageFileSystemResource +} + +// CreateOrUpdate ... +func (c FileSystemsClient) CreateOrUpdate(ctx context.Context, id FileSystemId, input LiftrBaseStorageFileSystemResource) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c FileSystemsClient) CreateOrUpdateThenPoll(ctx context.Context, id FileSystemId, input LiftrBaseStorageFileSystemResource) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/method_delete.go b/resource-manager/qumulostorage/2024-06-19/filesystems/method_delete.go new file mode 100644 index 00000000000..aa6ff7751fc --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/method_delete.go @@ -0,0 +1,70 @@ +package filesystems + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c FileSystemsClient) Delete(ctx context.Context, id FileSystemId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c FileSystemsClient) DeleteThenPoll(ctx context.Context, id FileSystemId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/method_get.go b/resource-manager/qumulostorage/2024-06-19/filesystems/method_get.go new file mode 100644 index 00000000000..524061400fa --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/method_get.go @@ -0,0 +1,54 @@ +package filesystems + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *LiftrBaseStorageFileSystemResource +} + +// Get ... +func (c FileSystemsClient) Get(ctx context.Context, id FileSystemId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model LiftrBaseStorageFileSystemResource + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/method_listbyresourcegroup.go b/resource-manager/qumulostorage/2024-06-19/filesystems/method_listbyresourcegroup.go new file mode 100644 index 00000000000..20ff566e14b --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/method_listbyresourcegroup.go @@ -0,0 +1,106 @@ +package filesystems + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]LiftrBaseStorageFileSystemResource +} + +type ListByResourceGroupCompleteResult struct { + LatestHttpResponse *http.Response + Items []LiftrBaseStorageFileSystemResource +} + +type ListByResourceGroupCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByResourceGroup ... +func (c FileSystemsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByResourceGroupCustomPager{}, + Path: fmt.Sprintf("%s/providers/Qumulo.Storage/fileSystems", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]LiftrBaseStorageFileSystemResource `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByResourceGroupComplete retrieves all the results into a single object +func (c FileSystemsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, LiftrBaseStorageFileSystemResourceOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c FileSystemsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LiftrBaseStorageFileSystemResourceOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { + items := make([]LiftrBaseStorageFileSystemResource, 0) + + resp, err := c.ListByResourceGroup(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByResourceGroupCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/method_listbysubscription.go b/resource-manager/qumulostorage/2024-06-19/filesystems/method_listbysubscription.go new file mode 100644 index 00000000000..d4b0d1c0d50 --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/method_listbysubscription.go @@ -0,0 +1,106 @@ +package filesystems + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListBySubscriptionOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]LiftrBaseStorageFileSystemResource +} + +type ListBySubscriptionCompleteResult struct { + LatestHttpResponse *http.Response + Items []LiftrBaseStorageFileSystemResource +} + +type ListBySubscriptionCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListBySubscription ... +func (c FileSystemsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListBySubscriptionCustomPager{}, + Path: fmt.Sprintf("%s/providers/Qumulo.Storage/fileSystems", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]LiftrBaseStorageFileSystemResource `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListBySubscriptionComplete retrieves all the results into a single object +func (c FileSystemsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, LiftrBaseStorageFileSystemResourceOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c FileSystemsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate LiftrBaseStorageFileSystemResourceOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { + items := make([]LiftrBaseStorageFileSystemResource, 0) + + resp, err := c.ListBySubscription(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListBySubscriptionCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/method_update.go b/resource-manager/qumulostorage/2024-06-19/filesystems/method_update.go new file mode 100644 index 00000000000..0e51973429a --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/method_update.go @@ -0,0 +1,58 @@ +package filesystems + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *LiftrBaseStorageFileSystemResource +} + +// Update ... +func (c FileSystemsClient) Update(ctx context.Context, id FileSystemId, input LiftrBaseStorageFileSystemResourceUpdate) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model LiftrBaseStorageFileSystemResource + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbasemarketplacedetails.go b/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbasemarketplacedetails.go new file mode 100644 index 00000000000..f5d758d425d --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbasemarketplacedetails.go @@ -0,0 +1,13 @@ +package filesystems + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LiftrBaseMarketplaceDetails struct { + MarketplaceSubscriptionId *string `json:"marketplaceSubscriptionId,omitempty"` + MarketplaceSubscriptionStatus *MarketplaceSubscriptionStatus `json:"marketplaceSubscriptionStatus,omitempty"` + OfferId string `json:"offerId"` + PlanId string `json:"planId"` + PublisherId *string `json:"publisherId,omitempty"` + TermUnit *string `json:"termUnit,omitempty"` +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbasestoragefilesystemresource.go b/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbasestoragefilesystemresource.go new file mode 100644 index 00000000000..54456eee482 --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbasestoragefilesystemresource.go @@ -0,0 +1,20 @@ +package filesystems + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LiftrBaseStorageFileSystemResource struct { + Id *string `json:"id,omitempty"` + Identity *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *LiftrBaseStorageFileSystemResourceProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbasestoragefilesystemresourceproperties.go b/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbasestoragefilesystemresourceproperties.go new file mode 100644 index 00000000000..fb3dfd851aa --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbasestoragefilesystemresourceproperties.go @@ -0,0 +1,16 @@ +package filesystems + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LiftrBaseStorageFileSystemResourceProperties struct { + AdminPassword string `json:"adminPassword"` + AvailabilityZone *string `json:"availabilityZone,omitempty"` + ClusterLoginUrl *string `json:"clusterLoginUrl,omitempty"` + DelegatedSubnetId string `json:"delegatedSubnetId"` + MarketplaceDetails LiftrBaseMarketplaceDetails `json:"marketplaceDetails"` + PrivateIPs *[]string `json:"privateIPs,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + StorageSku string `json:"storageSku"` + UserDetails LiftrBaseUserDetails `json:"userDetails"` +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbasestoragefilesystemresourceupdate.go b/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbasestoragefilesystemresourceupdate.go new file mode 100644 index 00000000000..8b9fcb1d44e --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbasestoragefilesystemresourceupdate.go @@ -0,0 +1,14 @@ +package filesystems + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LiftrBaseStorageFileSystemResourceUpdate struct { + Identity *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"` + Properties *LiftrBaseStorageFileSystemResourceUpdateProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbasestoragefilesystemresourceupdateproperties.go b/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbasestoragefilesystemresourceupdateproperties.go new file mode 100644 index 00000000000..803012afece --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbasestoragefilesystemresourceupdateproperties.go @@ -0,0 +1,10 @@ +package filesystems + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LiftrBaseStorageFileSystemResourceUpdateProperties struct { + DelegatedSubnetId *string `json:"delegatedSubnetId,omitempty"` + MarketplaceDetails *LiftrBaseMarketplaceDetails `json:"marketplaceDetails,omitempty"` + UserDetails *LiftrBaseUserDetails `json:"userDetails,omitempty"` +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbaseuserdetails.go b/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbaseuserdetails.go new file mode 100644 index 00000000000..b7c9b1ec9c8 --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/model_liftrbaseuserdetails.go @@ -0,0 +1,8 @@ +package filesystems + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LiftrBaseUserDetails struct { + Email string `json:"email"` +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/predicates.go b/resource-manager/qumulostorage/2024-06-19/filesystems/predicates.go new file mode 100644 index 00000000000..4ee3bf5157f --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/predicates.go @@ -0,0 +1,32 @@ +package filesystems + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LiftrBaseStorageFileSystemResourceOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p LiftrBaseStorageFileSystemResourceOperationPredicate) Matches(input LiftrBaseStorageFileSystemResource) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/version.go b/resource-manager/qumulostorage/2024-06-19/filesystems/version.go new file mode 100644 index 00000000000..d25d8f3799a --- /dev/null +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/version.go @@ -0,0 +1,12 @@ +package filesystems + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-06-19" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/filesystems/%s", defaultApiVersion) +}