diff --git a/internal/clients/client.go b/internal/clients/client.go index 31409083e093..a380d5e5d081 100644 --- a/internal/clients/client.go +++ b/internal/clients/client.go @@ -11,7 +11,7 @@ import ( "github.com/Azure/go-autorest/autorest/validation" aadb2c_v2021_04_01_preview "github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview" analysisservices_v2017_08_01 "github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01" - azurestackhci_v2023_08_01 "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01" + azurestackhci_v2024_01_01 "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01" datadog_v2021_03_01 "github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01" dns_v2018_05_01 "github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01" eventgrid_v2022_06_15 "github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15" @@ -176,7 +176,7 @@ type Client struct { Authorization *authorization.Client Automanage *automanage.Client Automation *automation.Client - AzureStackHCI *azurestackhci_v2023_08_01.Client + AzureStackHCI *azurestackhci_v2024_01_01.Client Batch *batch.Client Blueprints *blueprints.Client Bot *bot.Client diff --git a/internal/services/azurestackhci/client/client.go b/internal/services/azurestackhci/client/client.go index 7a0222b93932..9adaaed77eb1 100644 --- a/internal/services/azurestackhci/client/client.go +++ b/internal/services/azurestackhci/client/client.go @@ -6,13 +6,13 @@ package client import ( "fmt" - azurestackhci_v2023_08_01 "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01" + azurestackhci_v2024_01_01 "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01" "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) -func NewClient(o *common.ClientOptions) (*azurestackhci_v2023_08_01.Client, error) { - client, err := azurestackhci_v2023_08_01.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) { +func NewClient(o *common.ClientOptions) (*azurestackhci_v2024_01_01.Client, error) { + client, err := azurestackhci_v2024_01_01.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) { o.Configure(c, o.Authorizers.ResourceManager) }) if err != nil { diff --git a/internal/services/azurestackhci/stack_hci_cluster_data_source.go b/internal/services/azurestackhci/stack_hci_cluster_data_source.go index cc0a49b211b6..e942b846bc63 100644 --- a/internal/services/azurestackhci/stack_hci_cluster_data_source.go +++ b/internal/services/azurestackhci/stack_hci_cluster_data_source.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" autoParse "github.com/hashicorp/terraform-provider-azurerm/internal/services/automanage/parse" diff --git a/internal/services/azurestackhci/stack_hci_cluster_resource.go b/internal/services/azurestackhci/stack_hci_cluster_resource.go index 413d978b20fb..af8ff3f01f8c 100644 --- a/internal/services/azurestackhci/stack_hci_cluster_resource.go +++ b/internal/services/azurestackhci/stack_hci_cluster_resource.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" autoParse "github.com/hashicorp/terraform-provider-azurerm/internal/services/automanage/parse" diff --git a/internal/services/azurestackhci/stack_hci_cluster_resource_test.go b/internal/services/azurestackhci/stack_hci_cluster_resource_test.go index 51ae137d96cf..ac26ba82834a 100644 --- a/internal/services/azurestackhci/stack_hci_cluster_resource_test.go +++ b/internal/services/azurestackhci/stack_hci_cluster_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_pernodestate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_pernodestate.go deleted file mode 100644 index 22f862fc3577..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_pernodestate.go +++ /dev/null @@ -1,10 +0,0 @@ -package arcsettings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PerNodeState struct { - ArcInstance *string `json:"arcInstance,omitempty"` - Name *string `json:"name,omitempty"` - State *NodeArcState `json:"state,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/client.go deleted file mode 100644 index 8113caa4ff24..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/client.go +++ /dev/null @@ -1,109 +0,0 @@ -package v2023_08_01 - -// 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/azurestackhci/2023-08-01/arcsettings" - "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster" - "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters" - "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions" - "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers" - "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers" - "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses" - "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns" - "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates" - "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -type Client struct { - ArcSettings *arcsettings.ArcSettingsClient - Cluster *cluster.ClusterClient - Clusters *clusters.ClustersClient - Extensions *extensions.ExtensionsClient - Offers *offers.OffersClient - Publishers *publishers.PublishersClient - Skuses *skuses.SkusesClient - UpdateRuns *updateruns.UpdateRunsClient - UpdateSummaries *updatesummaries.UpdateSummariesClient - Updates *updates.UpdatesClient -} - -func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { - arcSettingsClient, err := arcsettings.NewArcSettingsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ArcSettings client: %+v", err) - } - configureFunc(arcSettingsClient.Client) - - clusterClient, err := cluster.NewClusterClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Cluster client: %+v", err) - } - configureFunc(clusterClient.Client) - - clustersClient, err := clusters.NewClustersClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Clusters client: %+v", err) - } - configureFunc(clustersClient.Client) - - extensionsClient, err := extensions.NewExtensionsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Extensions client: %+v", err) - } - configureFunc(extensionsClient.Client) - - offersClient, err := offers.NewOffersClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Offers client: %+v", err) - } - configureFunc(offersClient.Client) - - publishersClient, err := publishers.NewPublishersClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Publishers client: %+v", err) - } - configureFunc(publishersClient.Client) - - skusesClient, err := skuses.NewSkusesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Skuses client: %+v", err) - } - configureFunc(skusesClient.Client) - - updateRunsClient, err := updateruns.NewUpdateRunsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building UpdateRuns client: %+v", err) - } - configureFunc(updateRunsClient.Client) - - updateSummariesClient, err := updatesummaries.NewUpdateSummariesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building UpdateSummaries client: %+v", err) - } - configureFunc(updateSummariesClient.Client) - - updatesClient, err := updates.NewUpdatesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Updates client: %+v", err) - } - configureFunc(updatesClient.Client) - - return &Client{ - ArcSettings: arcSettingsClient, - Cluster: clusterClient, - Clusters: clustersClient, - Extensions: extensionsClient, - Offers: offersClient, - Publishers: publishersClient, - Skuses: skusesClient, - UpdateRuns: updateRunsClient, - UpdateSummaries: updateSummariesClient, - Updates: updatesClient, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/README.md similarity index 96% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/README.md index f60885584858..7617660eed21 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings` Documentation -The `arcsettings` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2023-08-01`). +The `arcsettings` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). 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-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings" +import "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/constants.go 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/2024-01-01/arcsettings/id_arcsetting.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/id_arcsetting.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/id_arcsetting.go 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/2024-01-01/arcsettings/id_cluster.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/id_cluster.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/id_cluster.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_arcsettingscreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingscreate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_arcsettingscreate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingscreate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_arcsettingsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingsdelete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_arcsettingsdelete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingsdelete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_arcsettingsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingsget.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_arcsettingsget.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingsget.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_arcsettingslistbycluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingslistbycluster.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_arcsettingslistbycluster.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingslistbycluster.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_arcsettingsupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingsupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_arcsettingsupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingsupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_consentandinstalldefaultextensions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_consentandinstalldefaultextensions.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_consentandinstalldefaultextensions.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_consentandinstalldefaultextensions.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_createidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_createidentity.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_createidentity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_createidentity.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_generatepassword.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_generatepassword.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_generatepassword.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_generatepassword.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_initializedisableprocess.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_initializedisableprocess.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/method_initializedisableprocess.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/method_initializedisableprocess.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_arcidentityresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_arcidentityresponse.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_arcidentityresponse.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_arcidentityresponse.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_arcidentityresponseproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_arcidentityresponseproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_arcidentityresponseproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_arcidentityresponseproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_arcsetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_arcsetting.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_arcsetting.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_arcsetting.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_arcsettingproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_arcsettingproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_arcsettingproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_arcsettingproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_arcsettingspatch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_arcsettingspatch.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_arcsettingspatch.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_arcsettingspatch.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_arcsettingspatchproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_arcsettingspatchproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_arcsettingspatchproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_arcsettingspatchproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_defaultextensiondetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_defaultextensiondetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_defaultextensiondetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_defaultextensiondetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_passwordcredential.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_passwordcredential.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/model_passwordcredential.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_passwordcredential.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_pernodestate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_pernodestate.go new file mode 100644 index 000000000000..9b79465a5d34 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/model_pernodestate.go @@ -0,0 +1,11 @@ +package arcsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PerNodeState struct { + ArcInstance *string `json:"arcInstance,omitempty"` + ArcNodeServicePrincipalObjectId *string `json:"arcNodeServicePrincipalObjectId,omitempty"` + Name *string `json:"name,omitempty"` + State *NodeArcState `json:"state,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/version.go index 2de594bb31f2..9beef03c72da 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings/version.go @@ -5,7 +5,7 @@ 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 = "2023-08-01" +const defaultApiVersion = "2024-01-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/arcsettings/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/client.go new file mode 100644 index 000000000000..a9783469fd96 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/client.go @@ -0,0 +1,217 @@ +package v2024_01_01 + +// 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/azurestackhci/2024-01-01/arcsettings" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks" + "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +type Client struct { + ArcSettings *arcsettings.ArcSettingsClient + Cluster *cluster.ClusterClient + Clusters *clusters.ClustersClient + DeploymentSettings *deploymentsettings.DeploymentSettingsClient + EdgeDevices *edgedevices.EdgeDevicesClient + Extensions *extensions.ExtensionsClient + GalleryImages *galleryimages.GalleryImagesClient + GuestAgents *guestagents.GuestAgentsClient + HybridIdentityMetadata *hybrididentitymetadata.HybridIdentityMetadataClient + LogicalNetworks *logicalnetworks.LogicalNetworksClient + MarketplaceGalleryImages *marketplacegalleryimages.MarketplaceGalleryImagesClient + NetworkInterfaces *networkinterfaces.NetworkInterfacesClient + Offers *offers.OffersClient + Publishers *publishers.PublishersClient + SecuritySettings *securitysettings.SecuritySettingsClient + Skuses *skuses.SkusesClient + StorageContainers *storagecontainers.StorageContainersClient + UpdateRuns *updateruns.UpdateRunsClient + UpdateSummaries *updatesummaries.UpdateSummariesClient + Updates *updates.UpdatesClient + VirtualHardDisks *virtualharddisks.VirtualHardDisksClient + VirtualMachineInstances *virtualmachineinstances.VirtualMachineInstancesClient +} + +func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { + arcSettingsClient, err := arcsettings.NewArcSettingsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building ArcSettings client: %+v", err) + } + configureFunc(arcSettingsClient.Client) + + clusterClient, err := cluster.NewClusterClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Cluster client: %+v", err) + } + configureFunc(clusterClient.Client) + + clustersClient, err := clusters.NewClustersClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Clusters client: %+v", err) + } + configureFunc(clustersClient.Client) + + deploymentSettingsClient, err := deploymentsettings.NewDeploymentSettingsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building DeploymentSettings client: %+v", err) + } + configureFunc(deploymentSettingsClient.Client) + + edgeDevicesClient, err := edgedevices.NewEdgeDevicesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building EdgeDevices client: %+v", err) + } + configureFunc(edgeDevicesClient.Client) + + extensionsClient, err := extensions.NewExtensionsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Extensions client: %+v", err) + } + configureFunc(extensionsClient.Client) + + galleryImagesClient, err := galleryimages.NewGalleryImagesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building GalleryImages client: %+v", err) + } + configureFunc(galleryImagesClient.Client) + + guestAgentsClient, err := guestagents.NewGuestAgentsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building GuestAgents client: %+v", err) + } + configureFunc(guestAgentsClient.Client) + + hybridIdentityMetadataClient, err := hybrididentitymetadata.NewHybridIdentityMetadataClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building HybridIdentityMetadata client: %+v", err) + } + configureFunc(hybridIdentityMetadataClient.Client) + + logicalNetworksClient, err := logicalnetworks.NewLogicalNetworksClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building LogicalNetworks client: %+v", err) + } + configureFunc(logicalNetworksClient.Client) + + marketplaceGalleryImagesClient, err := marketplacegalleryimages.NewMarketplaceGalleryImagesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building MarketplaceGalleryImages client: %+v", err) + } + configureFunc(marketplaceGalleryImagesClient.Client) + + networkInterfacesClient, err := networkinterfaces.NewNetworkInterfacesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building NetworkInterfaces client: %+v", err) + } + configureFunc(networkInterfacesClient.Client) + + offersClient, err := offers.NewOffersClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Offers client: %+v", err) + } + configureFunc(offersClient.Client) + + publishersClient, err := publishers.NewPublishersClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Publishers client: %+v", err) + } + configureFunc(publishersClient.Client) + + securitySettingsClient, err := securitysettings.NewSecuritySettingsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building SecuritySettings client: %+v", err) + } + configureFunc(securitySettingsClient.Client) + + skusesClient, err := skuses.NewSkusesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Skuses client: %+v", err) + } + configureFunc(skusesClient.Client) + + storageContainersClient, err := storagecontainers.NewStorageContainersClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building StorageContainers client: %+v", err) + } + configureFunc(storageContainersClient.Client) + + updateRunsClient, err := updateruns.NewUpdateRunsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building UpdateRuns client: %+v", err) + } + configureFunc(updateRunsClient.Client) + + updateSummariesClient, err := updatesummaries.NewUpdateSummariesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building UpdateSummaries client: %+v", err) + } + configureFunc(updateSummariesClient.Client) + + updatesClient, err := updates.NewUpdatesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Updates client: %+v", err) + } + configureFunc(updatesClient.Client) + + virtualHardDisksClient, err := virtualharddisks.NewVirtualHardDisksClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building VirtualHardDisks client: %+v", err) + } + configureFunc(virtualHardDisksClient.Client) + + virtualMachineInstancesClient, err := virtualmachineinstances.NewVirtualMachineInstancesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building VirtualMachineInstances client: %+v", err) + } + configureFunc(virtualMachineInstancesClient.Client) + + return &Client{ + ArcSettings: arcSettingsClient, + Cluster: clusterClient, + Clusters: clustersClient, + DeploymentSettings: deploymentSettingsClient, + EdgeDevices: edgeDevicesClient, + Extensions: extensionsClient, + GalleryImages: galleryImagesClient, + GuestAgents: guestAgentsClient, + HybridIdentityMetadata: hybridIdentityMetadataClient, + LogicalNetworks: logicalNetworksClient, + MarketplaceGalleryImages: marketplaceGalleryImagesClient, + NetworkInterfaces: networkInterfacesClient, + Offers: offersClient, + Publishers: publishersClient, + SecuritySettings: securitySettingsClient, + Skuses: skusesClient, + StorageContainers: storageContainersClient, + UpdateRuns: updateRunsClient, + UpdateSummaries: updateSummariesClient, + Updates: updatesClient, + VirtualHardDisks: virtualHardDisksClient, + VirtualMachineInstances: virtualMachineInstancesClient, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/README.md similarity index 92% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/README.md index 1132697f4606..15c55389a757 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster` Documentation -The `cluster` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2023-08-01`). +The `cluster` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). 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-sdk/resource-manager/azurestackhci/2023-08-01/cluster" +import "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/constants.go similarity index 94% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/constants.go index 0c0ca3fed947..dafab9b8d701 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/constants.go @@ -401,21 +401,33 @@ type Status string const ( StatusConnectedRecently Status = "ConnectedRecently" + StatusDeploymentFailed Status = "DeploymentFailed" + StatusDeploymentInProgress Status = "DeploymentInProgress" + StatusDeploymentSuccess Status = "DeploymentSuccess" StatusDisconnected Status = "Disconnected" StatusError Status = "Error" StatusNotConnectedRecently Status = "NotConnectedRecently" StatusNotSpecified Status = "NotSpecified" StatusNotYetRegistered Status = "NotYetRegistered" + StatusValidationFailed Status = "ValidationFailed" + StatusValidationInProgress Status = "ValidationInProgress" + StatusValidationSuccess Status = "ValidationSuccess" ) func PossibleValuesForStatus() []string { return []string{ string(StatusConnectedRecently), + string(StatusDeploymentFailed), + string(StatusDeploymentInProgress), + string(StatusDeploymentSuccess), string(StatusDisconnected), string(StatusError), string(StatusNotConnectedRecently), string(StatusNotSpecified), string(StatusNotYetRegistered), + string(StatusValidationFailed), + string(StatusValidationInProgress), + string(StatusValidationSuccess), } } @@ -435,11 +447,17 @@ func (s *Status) UnmarshalJSON(bytes []byte) error { func parseStatus(input string) (*Status, error) { vals := map[string]Status{ "connectedrecently": StatusConnectedRecently, + "deploymentfailed": StatusDeploymentFailed, + "deploymentinprogress": StatusDeploymentInProgress, + "deploymentsuccess": StatusDeploymentSuccess, "disconnected": StatusDisconnected, "error": StatusError, "notconnectedrecently": StatusNotConnectedRecently, "notspecified": StatusNotSpecified, "notyetregistered": StatusNotYetRegistered, + "validationfailed": StatusValidationFailed, + "validationinprogress": StatusValidationInProgress, + "validationsuccess": StatusValidationSuccess, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil 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/2024-01-01/cluster/id_cluster.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/id_cluster.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/id_cluster.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/method_createidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/method_createidentity.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/method_createidentity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/method_createidentity.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/method_extendsoftwareassurancebenefit.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/method_extendsoftwareassurancebenefit.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/method_extendsoftwareassurancebenefit.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/method_extendsoftwareassurancebenefit.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/method_uploadcertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/method_uploadcertificate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/method_uploadcertificate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/method_uploadcertificate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_cluster.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_cluster.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_cluster.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_clusterdesiredproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_clusterdesiredproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_clusterdesiredproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_clusterdesiredproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_clusteridentityresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_clusteridentityresponse.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_clusteridentityresponse.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_clusteridentityresponse.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_clusteridentityresponseproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_clusteridentityresponseproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_clusteridentityresponseproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_clusteridentityresponseproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_clusternode.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_clusternode.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_clusternode.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_clusternode.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_clusterproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_clusterproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_clusterproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_clusterproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_clusterreportedproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_clusterreportedproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_clusterreportedproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_clusterreportedproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_isolatedvmattestationconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_isolatedvmattestationconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_isolatedvmattestationconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_isolatedvmattestationconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_rawcertificatedata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_rawcertificatedata.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_rawcertificatedata.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_rawcertificatedata.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_softwareassurancechangerequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_softwareassurancechangerequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_softwareassurancechangerequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_softwareassurancechangerequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_softwareassurancechangerequestproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_softwareassurancechangerequestproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_softwareassurancechangerequestproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_softwareassurancechangerequestproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_softwareassuranceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_softwareassuranceproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_softwareassuranceproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_softwareassuranceproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_uploadcertificaterequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_uploadcertificaterequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/model_uploadcertificaterequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/model_uploadcertificaterequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/version.go index 523af36b0ca6..baf9842b576a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster/version.go @@ -5,7 +5,7 @@ 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 = "2023-08-01" +const defaultApiVersion = "2024-01-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/cluster/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/README.md similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/README.md index 57d4c0da981d..555f64c16bda 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/README.md @@ -1,7 +1,7 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters` Documentation -The `clusters` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2023-08-01`). +The `clusters` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). 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). @@ -9,7 +9,7 @@ This readme covers example usages, but further information on [using this SDK ca ```go import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters" +import "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/constants.go similarity index 94% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/constants.go index c644f0c0b8a9..134cb5269783 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/constants.go @@ -401,21 +401,33 @@ type Status string const ( StatusConnectedRecently Status = "ConnectedRecently" + StatusDeploymentFailed Status = "DeploymentFailed" + StatusDeploymentInProgress Status = "DeploymentInProgress" + StatusDeploymentSuccess Status = "DeploymentSuccess" StatusDisconnected Status = "Disconnected" StatusError Status = "Error" StatusNotConnectedRecently Status = "NotConnectedRecently" StatusNotSpecified Status = "NotSpecified" StatusNotYetRegistered Status = "NotYetRegistered" + StatusValidationFailed Status = "ValidationFailed" + StatusValidationInProgress Status = "ValidationInProgress" + StatusValidationSuccess Status = "ValidationSuccess" ) func PossibleValuesForStatus() []string { return []string{ string(StatusConnectedRecently), + string(StatusDeploymentFailed), + string(StatusDeploymentInProgress), + string(StatusDeploymentSuccess), string(StatusDisconnected), string(StatusError), string(StatusNotConnectedRecently), string(StatusNotSpecified), string(StatusNotYetRegistered), + string(StatusValidationFailed), + string(StatusValidationInProgress), + string(StatusValidationSuccess), } } @@ -435,11 +447,17 @@ func (s *Status) UnmarshalJSON(bytes []byte) error { func parseStatus(input string) (*Status, error) { vals := map[string]Status{ "connectedrecently": StatusConnectedRecently, + "deploymentfailed": StatusDeploymentFailed, + "deploymentinprogress": StatusDeploymentInProgress, + "deploymentsuccess": StatusDeploymentSuccess, "disconnected": StatusDisconnected, "error": StatusError, "notconnectedrecently": StatusNotConnectedRecently, "notspecified": StatusNotSpecified, "notyetregistered": StatusNotYetRegistered, + "validationfailed": StatusValidationFailed, + "validationinprogress": StatusValidationInProgress, + "validationsuccess": StatusValidationSuccess, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil 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/2024-01-01/clusters/id_cluster.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/id_cluster.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/id_cluster.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/method_listbyresourcegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/method_listbyresourcegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/method_listbyresourcegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/method_listbysubscription.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/method_listbysubscription.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/method_listbysubscription.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_cluster.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_cluster.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_cluster.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_clusterdesiredproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_clusterdesiredproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_clusterdesiredproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_clusterdesiredproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_clusternode.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_clusternode.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_clusternode.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_clusternode.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_clusterpatch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_clusterpatch.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_clusterpatch.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_clusterpatch.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_clusterpatchproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_clusterpatchproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_clusterpatchproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_clusterpatchproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_clusterproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_clusterproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_clusterproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_clusterproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_clusterreportedproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_clusterreportedproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_clusterreportedproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_clusterreportedproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_isolatedvmattestationconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_isolatedvmattestationconfiguration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_isolatedvmattestationconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_isolatedvmattestationconfiguration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_softwareassuranceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_softwareassuranceproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/model_softwareassuranceproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/model_softwareassuranceproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/version.go index 408113306d7b..47ca5369a104 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters/version.go @@ -5,7 +5,7 @@ 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 = "2023-08-01" +const defaultApiVersion = "2024-01-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/clusters/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/README.md new file mode 100644 index 000000000000..cb2ccac393f4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings` Documentation + +The `deploymentsettings` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). + +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-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings" +``` + + +### Client Initialization + +```go +client := deploymentsettings.NewDeploymentSettingsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `DeploymentSettingsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := deploymentsettings.NewDeploymentSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "deploymentSettingValue") + +payload := deploymentsettings.DeploymentSetting{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `DeploymentSettingsClient.Delete` + +```go +ctx := context.TODO() +id := deploymentsettings.NewDeploymentSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "deploymentSettingValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `DeploymentSettingsClient.Get` + +```go +ctx := context.TODO() +id := deploymentsettings.NewDeploymentSettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "deploymentSettingValue") + +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: `DeploymentSettingsClient.ListByClusters` + +```go +ctx := context.TODO() +id := deploymentsettings.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") + +// alternatively `client.ListByClusters(ctx, id)` can be used to do batched pagination +items, err := client.ListByClustersComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/client.go new file mode 100644 index 000000000000..2d7721728046 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/client.go @@ -0,0 +1,26 @@ +package deploymentsettings + +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 DeploymentSettingsClient struct { + Client *resourcemanager.Client +} + +func NewDeploymentSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentSettingsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deploymentsettings", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating DeploymentSettingsClient: %+v", err) + } + + return &DeploymentSettingsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/constants.go new file mode 100644 index 000000000000..a572b56aa229 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/constants.go @@ -0,0 +1,110 @@ +package deploymentsettings + +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 DeploymentMode string + +const ( + DeploymentModeDeploy DeploymentMode = "Deploy" + DeploymentModeValidate DeploymentMode = "Validate" +) + +func PossibleValuesForDeploymentMode() []string { + return []string{ + string(DeploymentModeDeploy), + string(DeploymentModeValidate), + } +} + +func (s *DeploymentMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeploymentMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeploymentMode(input string) (*DeploymentMode, error) { + vals := map[string]DeploymentMode{ + "deploy": DeploymentModeDeploy, + "validate": DeploymentModeValidate, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeploymentMode(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateAccepted ProvisioningState = "Accepted" + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateNotSpecified ProvisioningState = "NotSpecified" + ProvisioningStateProvisioning ProvisioningState = "Provisioning" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateAccepted), + string(ProvisioningStateCanceled), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateNotSpecified), + string(ProvisioningStateProvisioning), + 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, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "notspecified": ProvisioningStateNotSpecified, + "provisioning": ProvisioningStateProvisioning, + "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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/id_cluster.go new file mode 100644 index 000000000000..dc92e4f4cc47 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/id_cluster.go @@ -0,0 +1,125 @@ +package deploymentsettings + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &ClusterId{} + +// ClusterId is a struct representing the Resource ID for a Cluster +type ClusterId struct { + SubscriptionId string + ResourceGroupName string + ClusterName string +} + +// NewClusterID returns a new ClusterId struct +func NewClusterID(subscriptionId string, resourceGroupName string, clusterName string) ClusterId { + return ClusterId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ClusterName: clusterName, + } +} + +// ParseClusterID parses 'input' into a ClusterId +func ParseClusterID(input string) (*ClusterId, error) { + parser := resourceids.NewParserFromResourceIdType(&ClusterId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseClusterIDInsensitively parses 'input' case-insensitively into a ClusterId +// note: this method should only be used for API response data and not user input +func ParseClusterIDInsensitively(input string) (*ClusterId, error) { + parser := resourceids.NewParserFromResourceIdType(&ClusterId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ClusterId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) + } + + return nil +} + +// ValidateClusterID checks that 'input' can be parsed as a Cluster ID +func ValidateClusterID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseClusterID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Cluster ID +func (id ClusterId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.AzureStackHCI/clusters/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ClusterName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Cluster ID +func (id ClusterId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftAzureStackHCI", "Microsoft.AzureStackHCI", "Microsoft.AzureStackHCI"), + resourceids.StaticSegment("staticClusters", "clusters", "clusters"), + resourceids.UserSpecifiedSegment("clusterName", "clusterValue"), + } +} + +// String returns a human-readable description of this Cluster ID +func (id ClusterId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Cluster Name: %q", id.ClusterName), + } + return fmt.Sprintf("Cluster (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/id_deploymentsetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/id_deploymentsetting.go new file mode 100644 index 000000000000..32dad80bc022 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/id_deploymentsetting.go @@ -0,0 +1,134 @@ +package deploymentsettings + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &DeploymentSettingId{} + +// DeploymentSettingId is a struct representing the Resource ID for a Deployment Setting +type DeploymentSettingId struct { + SubscriptionId string + ResourceGroupName string + ClusterName string + DeploymentSettingName string +} + +// NewDeploymentSettingID returns a new DeploymentSettingId struct +func NewDeploymentSettingID(subscriptionId string, resourceGroupName string, clusterName string, deploymentSettingName string) DeploymentSettingId { + return DeploymentSettingId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ClusterName: clusterName, + DeploymentSettingName: deploymentSettingName, + } +} + +// ParseDeploymentSettingID parses 'input' into a DeploymentSettingId +func ParseDeploymentSettingID(input string) (*DeploymentSettingId, error) { + parser := resourceids.NewParserFromResourceIdType(&DeploymentSettingId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := DeploymentSettingId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseDeploymentSettingIDInsensitively parses 'input' case-insensitively into a DeploymentSettingId +// note: this method should only be used for API response data and not user input +func ParseDeploymentSettingIDInsensitively(input string) (*DeploymentSettingId, error) { + parser := resourceids.NewParserFromResourceIdType(&DeploymentSettingId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := DeploymentSettingId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DeploymentSettingId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) + } + + if id.DeploymentSettingName, ok = input.Parsed["deploymentSettingName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "deploymentSettingName", input) + } + + return nil +} + +// ValidateDeploymentSettingID checks that 'input' can be parsed as a Deployment Setting ID +func ValidateDeploymentSettingID(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 := ParseDeploymentSettingID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Deployment Setting ID +func (id DeploymentSettingId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.AzureStackHCI/clusters/%s/deploymentSettings/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ClusterName, id.DeploymentSettingName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Deployment Setting ID +func (id DeploymentSettingId) 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("staticMicrosoftAzureStackHCI", "Microsoft.AzureStackHCI", "Microsoft.AzureStackHCI"), + resourceids.StaticSegment("staticClusters", "clusters", "clusters"), + resourceids.UserSpecifiedSegment("clusterName", "clusterValue"), + resourceids.StaticSegment("staticDeploymentSettings", "deploymentSettings", "deploymentSettings"), + resourceids.UserSpecifiedSegment("deploymentSettingName", "deploymentSettingValue"), + } +} + +// String returns a human-readable description of this Deployment Setting ID +func (id DeploymentSettingId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Cluster Name: %q", id.ClusterName), + fmt.Sprintf("Deployment Setting Name: %q", id.DeploymentSettingName), + } + return fmt.Sprintf("Deployment Setting (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/method_createorupdate.go new file mode 100644 index 000000000000..1338dda3db5c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/method_createorupdate.go @@ -0,0 +1,75 @@ +package deploymentsettings + +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 *DeploymentSetting +} + +// CreateOrUpdate ... +func (c DeploymentSettingsClient) CreateOrUpdate(ctx context.Context, id DeploymentSettingId, input DeploymentSetting) (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 DeploymentSettingsClient) CreateOrUpdateThenPoll(ctx context.Context, id DeploymentSettingId, input DeploymentSetting) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/method_delete.go new file mode 100644 index 000000000000..89e29cd7e907 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/method_delete.go @@ -0,0 +1,70 @@ +package deploymentsettings + +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 DeploymentSettingsClient) Delete(ctx context.Context, id DeploymentSettingId) (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 DeploymentSettingsClient) DeleteThenPoll(ctx context.Context, id DeploymentSettingId) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/method_get.go new file mode 100644 index 000000000000..c87af231c1b1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/method_get.go @@ -0,0 +1,54 @@ +package deploymentsettings + +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 *DeploymentSetting +} + +// Get ... +func (c DeploymentSettingsClient) Get(ctx context.Context, id DeploymentSettingId) (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 DeploymentSetting + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/method_listbyclusters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/method_listbyclusters.go new file mode 100644 index 000000000000..124423cbf9a4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/method_listbyclusters.go @@ -0,0 +1,91 @@ +package deploymentsettings + +import ( + "context" + "fmt" + "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 ListByClustersOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]DeploymentSetting +} + +type ListByClustersCompleteResult struct { + LatestHttpResponse *http.Response + Items []DeploymentSetting +} + +// ListByClusters ... +func (c DeploymentSettingsClient) ListByClusters(ctx context.Context, id ClusterId) (result ListByClustersOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/deploymentSettings", 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 *[]DeploymentSetting `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByClustersComplete retrieves all the results into a single object +func (c DeploymentSettingsClient) ListByClustersComplete(ctx context.Context, id ClusterId) (ListByClustersCompleteResult, error) { + return c.ListByClustersCompleteMatchingPredicate(ctx, id, DeploymentSettingOperationPredicate{}) +} + +// ListByClustersCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c DeploymentSettingsClient) ListByClustersCompleteMatchingPredicate(ctx context.Context, id ClusterId, predicate DeploymentSettingOperationPredicate) (result ListByClustersCompleteResult, err error) { + items := make([]DeploymentSetting, 0) + + resp, err := c.ListByClusters(ctx, id) + if err != nil { + 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 = ListByClustersCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_adapterpropertyoverrides.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_adapterpropertyoverrides.go new file mode 100644 index 000000000000..57b6e9dc686c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_adapterpropertyoverrides.go @@ -0,0 +1,10 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AdapterPropertyOverrides struct { + JumboPacket *string `json:"jumboPacket,omitempty"` + NetworkDirect *string `json:"networkDirect,omitempty"` + NetworkDirectTechnology *string `json:"networkDirectTechnology,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentcluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentcluster.go new file mode 100644 index 000000000000..3e0f8a2dae79 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentcluster.go @@ -0,0 +1,12 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeploymentCluster struct { + AzureServiceEndpoint *string `json:"azureServiceEndpoint,omitempty"` + CloudAccountName *string `json:"cloudAccountName,omitempty"` + Name *string `json:"name,omitempty"` + WitnessPath *string `json:"witnessPath,omitempty"` + WitnessType *string `json:"witnessType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentconfiguration.go new file mode 100644 index 000000000000..2725ef472491 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentconfiguration.go @@ -0,0 +1,9 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeploymentConfiguration struct { + ScaleUnits []ScaleUnits `json:"scaleUnits"` + Version *string `json:"version,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentdata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentdata.go new file mode 100644 index 000000000000..c2bfbb270bd9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentdata.go @@ -0,0 +1,19 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeploymentData struct { + AdouPath *string `json:"adouPath,omitempty"` + Cluster *DeploymentCluster `json:"cluster,omitempty"` + DomainFqdn *string `json:"domainFqdn,omitempty"` + HostNetwork *HostNetwork `json:"hostNetwork,omitempty"` + InfrastructureNetwork *[]InfrastructureNetwork `json:"infrastructureNetwork,omitempty"` + NamingPrefix *string `json:"namingPrefix,omitempty"` + Observability *Observability `json:"observability,omitempty"` + OptionalServices *OptionalServices `json:"optionalServices,omitempty"` + PhysicalNodes *[]PhysicalNodes `json:"physicalNodes,omitempty"` + SecretsLocation *string `json:"secretsLocation,omitempty"` + SecuritySettings *DeploymentSecuritySettings `json:"securitySettings,omitempty"` + Storage *Storage `json:"storage,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentsecuritysettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentsecuritysettings.go new file mode 100644 index 000000000000..f5e27acc112e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentsecuritysettings.go @@ -0,0 +1,17 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeploymentSecuritySettings struct { + BitlockerBootVolume *bool `json:"bitlockerBootVolume,omitempty"` + BitlockerDataVolumes *bool `json:"bitlockerDataVolumes,omitempty"` + CredentialGuardEnforced *bool `json:"credentialGuardEnforced,omitempty"` + DriftControlEnforced *bool `json:"driftControlEnforced,omitempty"` + DrtmProtection *bool `json:"drtmProtection,omitempty"` + HvciProtection *bool `json:"hvciProtection,omitempty"` + SideChannelMitigationEnforced *bool `json:"sideChannelMitigationEnforced,omitempty"` + SmbClusterEncryption *bool `json:"smbClusterEncryption,omitempty"` + SmbSigningEnforced *bool `json:"smbSigningEnforced,omitempty"` + WdacEnforced *bool `json:"wdacEnforced,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentsetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentsetting.go new file mode 100644 index 000000000000..9f687fa2dfdf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentsetting.go @@ -0,0 +1,16 @@ +package deploymentsettings + +import ( + "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 DeploymentSetting struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *DeploymentSettingsProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentsettingsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentsettingsproperties.go new file mode 100644 index 000000000000..cd74013705d9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentsettingsproperties.go @@ -0,0 +1,12 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeploymentSettingsProperties struct { + ArcNodeResourceIds []string `json:"arcNodeResourceIds"` + DeploymentConfiguration DeploymentConfiguration `json:"deploymentConfiguration"` + DeploymentMode DeploymentMode `json:"deploymentMode"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + ReportedProperties *ReportedProperties `json:"reportedProperties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentstatus.go new file mode 100644 index 000000000000..1a830c2d5550 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentstatus.go @@ -0,0 +1,9 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeploymentStatus struct { + Status *string `json:"status,omitempty"` + Steps *[]DeploymentStep `json:"steps,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentstep.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentstep.go new file mode 100644 index 000000000000..27e783a42e8c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_deploymentstep.go @@ -0,0 +1,15 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeploymentStep struct { + Description *string `json:"description,omitempty"` + EndTimeUtc *string `json:"endTimeUtc,omitempty"` + Exception *[]string `json:"exception,omitempty"` + FullStepIndex *string `json:"fullStepIndex,omitempty"` + Name *string `json:"name,omitempty"` + StartTimeUtc *string `json:"startTimeUtc,omitempty"` + Status *string `json:"status,omitempty"` + Steps *[]DeploymentStep `json:"steps,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_hostnetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_hostnetwork.go new file mode 100644 index 000000000000..8bd87a420766 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_hostnetwork.go @@ -0,0 +1,11 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HostNetwork struct { + EnableStorageAutoIP *bool `json:"enableStorageAutoIp,omitempty"` + Intents *[]Intents `json:"intents,omitempty"` + StorageConnectivitySwitchless *bool `json:"storageConnectivitySwitchless,omitempty"` + StorageNetworks *[]StorageNetworks `json:"storageNetworks,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_infrastructurenetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_infrastructurenetwork.go new file mode 100644 index 000000000000..b19bbf287a4a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_infrastructurenetwork.go @@ -0,0 +1,12 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InfrastructureNetwork struct { + DnsServers *[]string `json:"dnsServers,omitempty"` + Gateway *string `json:"gateway,omitempty"` + IPPools *[]IPPools `json:"ipPools,omitempty"` + SubnetMask *string `json:"subnetMask,omitempty"` + UseDhcp *bool `json:"useDhcp,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_intents.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_intents.go new file mode 100644 index 000000000000..6e43eb8be888 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_intents.go @@ -0,0 +1,16 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Intents struct { + Adapter *[]string `json:"adapter,omitempty"` + AdapterPropertyOverrides *AdapterPropertyOverrides `json:"adapterPropertyOverrides,omitempty"` + Name *string `json:"name,omitempty"` + OverrideAdapterProperty *bool `json:"overrideAdapterProperty,omitempty"` + OverrideQosPolicy *bool `json:"overrideQosPolicy,omitempty"` + OverrideVirtualSwitchConfiguration *bool `json:"overrideVirtualSwitchConfiguration,omitempty"` + QosPolicyOverrides *QosPolicyOverrides `json:"qosPolicyOverrides,omitempty"` + TrafficType *[]string `json:"trafficType,omitempty"` + VirtualSwitchConfigurationOverrides *VirtualSwitchConfigurationOverrides `json:"virtualSwitchConfigurationOverrides,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_ippools.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_ippools.go new file mode 100644 index 000000000000..9b95a1dce7bb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_ippools.go @@ -0,0 +1,9 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPPools struct { + EndingAddress *string `json:"endingAddress,omitempty"` + StartingAddress *string `json:"startingAddress,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_observability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_observability.go new file mode 100644 index 000000000000..350c5bb85fdf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_observability.go @@ -0,0 +1,10 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Observability struct { + EpisodicDataUpload *bool `json:"episodicDataUpload,omitempty"` + EuLocation *bool `json:"euLocation,omitempty"` + StreamingDataClient *bool `json:"streamingDataClient,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_optionalservices.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_optionalservices.go new file mode 100644 index 000000000000..9176350170cc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_optionalservices.go @@ -0,0 +1,8 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OptionalServices struct { + CustomLocation *string `json:"customLocation,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_physicalnodes.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_physicalnodes.go new file mode 100644 index 000000000000..75473c3a914d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_physicalnodes.go @@ -0,0 +1,9 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PhysicalNodes struct { + IPv4Address *string `json:"ipv4Address,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_qospolicyoverrides.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_qospolicyoverrides.go new file mode 100644 index 000000000000..c523de45ee66 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_qospolicyoverrides.go @@ -0,0 +1,10 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type QosPolicyOverrides struct { + BandwidthPercentageSMB *string `json:"bandwidthPercentage_SMB,omitempty"` + PriorityValue8021ActionCluster *string `json:"priorityValue8021Action_Cluster,omitempty"` + PriorityValue8021ActionSMB *string `json:"priorityValue8021Action_SMB,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_reportedproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_reportedproperties.go new file mode 100644 index 000000000000..959d1a3c5d27 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_reportedproperties.go @@ -0,0 +1,9 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ReportedProperties struct { + DeploymentStatus *DeploymentStatus `json:"deploymentStatus,omitempty"` + ValidationStatus *ValidationStatus `json:"validationStatus,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_scaleunits.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_scaleunits.go new file mode 100644 index 000000000000..196b7cfe8059 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_scaleunits.go @@ -0,0 +1,8 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ScaleUnits struct { + DeploymentData DeploymentData `json:"deploymentData"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_storage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_storage.go new file mode 100644 index 000000000000..75bcd02c64f5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_storage.go @@ -0,0 +1,8 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Storage struct { + ConfigurationMode *string `json:"configurationMode,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_storagenetworks.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_storagenetworks.go new file mode 100644 index 000000000000..1ac4234d92c4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_storagenetworks.go @@ -0,0 +1,10 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageNetworks struct { + Name *string `json:"name,omitempty"` + NetworkAdapterName *string `json:"networkAdapterName,omitempty"` + VlanId *string `json:"vlanId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_validationstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_validationstatus.go new file mode 100644 index 000000000000..330cf51b6ac2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_validationstatus.go @@ -0,0 +1,9 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidationStatus struct { + Status *string `json:"status,omitempty"` + Steps *[]DeploymentStep `json:"steps,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_virtualswitchconfigurationoverrides.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_virtualswitchconfigurationoverrides.go new file mode 100644 index 000000000000..11d879052410 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/model_virtualswitchconfigurationoverrides.go @@ -0,0 +1,9 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualSwitchConfigurationOverrides struct { + EnableIov *string `json:"enableIov,omitempty"` + LoadBalancingAlgorithm *string `json:"loadBalancingAlgorithm,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/predicates.go new file mode 100644 index 000000000000..5b37f41b7b5f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/predicates.go @@ -0,0 +1,27 @@ +package deploymentsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeploymentSettingOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p DeploymentSettingOperationPredicate) Matches(input DeploymentSetting) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/version.go new file mode 100644 index 000000000000..0056879142c6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings/version.go @@ -0,0 +1,12 @@ +package deploymentsettings + +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-01-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/deploymentsettings/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/README.md new file mode 100644 index 000000000000..c3e90ddfb9da --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/README.md @@ -0,0 +1,100 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices` Documentation + +The `edgedevices` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). + +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/azurestackhci/2024-01-01/edgedevices" +``` + + +### Client Initialization + +```go +client := edgedevices.NewEdgeDevicesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `EdgeDevicesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := edgedevices.NewScopedEdgeDeviceID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "edgeDeviceValue") + +payload := edgedevices.EdgeDevice{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `EdgeDevicesClient.Delete` + +```go +ctx := context.TODO() +id := edgedevices.NewScopedEdgeDeviceID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "edgeDeviceValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `EdgeDevicesClient.Get` + +```go +ctx := context.TODO() +id := edgedevices.NewScopedEdgeDeviceID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "edgeDeviceValue") + +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: `EdgeDevicesClient.List` + +```go +ctx := context.TODO() +id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `EdgeDevicesClient.Validate` + +```go +ctx := context.TODO() +id := edgedevices.NewScopedEdgeDeviceID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "edgeDeviceValue") + +payload := edgedevices.ValidateRequest{ + // ... +} + + +if err := client.ValidateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/client.go new file mode 100644 index 000000000000..629b201ceec6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/client.go @@ -0,0 +1,26 @@ +package edgedevices + +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 EdgeDevicesClient struct { + Client *resourcemanager.Client +} + +func NewEdgeDevicesClientWithBaseURI(sdkApi sdkEnv.Api) (*EdgeDevicesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "edgedevices", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating EdgeDevicesClient: %+v", err) + } + + return &EdgeDevicesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/constants.go new file mode 100644 index 000000000000..0a9012702bdf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/constants.go @@ -0,0 +1,69 @@ +package edgedevices + +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 ProvisioningState string + +const ( + ProvisioningStateAccepted ProvisioningState = "Accepted" + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateNotSpecified ProvisioningState = "NotSpecified" + ProvisioningStateProvisioning ProvisioningState = "Provisioning" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateAccepted), + string(ProvisioningStateCanceled), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateNotSpecified), + string(ProvisioningStateProvisioning), + 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, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "notspecified": ProvisioningStateNotSpecified, + "provisioning": ProvisioningStateProvisioning, + "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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/id_scopededgedevice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/id_scopededgedevice.go new file mode 100644 index 000000000000..160f17394fd7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/id_scopededgedevice.go @@ -0,0 +1,115 @@ +package edgedevices + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &ScopedEdgeDeviceId{} + +// ScopedEdgeDeviceId is a struct representing the Resource ID for a Scoped Edge Device +type ScopedEdgeDeviceId struct { + ResourceUri string + EdgeDeviceName string +} + +// NewScopedEdgeDeviceID returns a new ScopedEdgeDeviceId struct +func NewScopedEdgeDeviceID(resourceUri string, edgeDeviceName string) ScopedEdgeDeviceId { + return ScopedEdgeDeviceId{ + ResourceUri: resourceUri, + EdgeDeviceName: edgeDeviceName, + } +} + +// ParseScopedEdgeDeviceID parses 'input' into a ScopedEdgeDeviceId +func ParseScopedEdgeDeviceID(input string) (*ScopedEdgeDeviceId, error) { + parser := resourceids.NewParserFromResourceIdType(&ScopedEdgeDeviceId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ScopedEdgeDeviceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseScopedEdgeDeviceIDInsensitively parses 'input' case-insensitively into a ScopedEdgeDeviceId +// note: this method should only be used for API response data and not user input +func ParseScopedEdgeDeviceIDInsensitively(input string) (*ScopedEdgeDeviceId, error) { + parser := resourceids.NewParserFromResourceIdType(&ScopedEdgeDeviceId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ScopedEdgeDeviceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ScopedEdgeDeviceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.ResourceUri, ok = input.Parsed["resourceUri"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceUri", input) + } + + if id.EdgeDeviceName, ok = input.Parsed["edgeDeviceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "edgeDeviceName", input) + } + + return nil +} + +// ValidateScopedEdgeDeviceID checks that 'input' can be parsed as a Scoped Edge Device ID +func ValidateScopedEdgeDeviceID(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 := ParseScopedEdgeDeviceID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Scoped Edge Device ID +func (id ScopedEdgeDeviceId) ID() string { + fmtString := "/%s/providers/Microsoft.AzureStackHCI/edgeDevices/%s" + return fmt.Sprintf(fmtString, strings.TrimPrefix(id.ResourceUri, "/"), id.EdgeDeviceName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Scoped Edge Device ID +func (id ScopedEdgeDeviceId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.ScopeSegment("resourceUri", "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftAzureStackHCI", "Microsoft.AzureStackHCI", "Microsoft.AzureStackHCI"), + resourceids.StaticSegment("staticEdgeDevices", "edgeDevices", "edgeDevices"), + resourceids.UserSpecifiedSegment("edgeDeviceName", "edgeDeviceValue"), + } +} + +// String returns a human-readable description of this Scoped Edge Device ID +func (id ScopedEdgeDeviceId) String() string { + components := []string{ + fmt.Sprintf("Resource Uri: %q", id.ResourceUri), + fmt.Sprintf("Edge Device Name: %q", id.EdgeDeviceName), + } + return fmt.Sprintf("Scoped Edge Device (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/method_createorupdate.go new file mode 100644 index 000000000000..23058042e195 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/method_createorupdate.go @@ -0,0 +1,75 @@ +package edgedevices + +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 *EdgeDevice +} + +// CreateOrUpdate ... +func (c EdgeDevicesClient) CreateOrUpdate(ctx context.Context, id ScopedEdgeDeviceId, input EdgeDevice) (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 EdgeDevicesClient) CreateOrUpdateThenPoll(ctx context.Context, id ScopedEdgeDeviceId, input EdgeDevice) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/method_delete.go new file mode 100644 index 000000000000..a3ced2775e3c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/method_delete.go @@ -0,0 +1,70 @@ +package edgedevices + +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 EdgeDevicesClient) Delete(ctx context.Context, id ScopedEdgeDeviceId) (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 EdgeDevicesClient) DeleteThenPoll(ctx context.Context, id ScopedEdgeDeviceId) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/method_get.go new file mode 100644 index 000000000000..b689f330ce3b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/method_get.go @@ -0,0 +1,54 @@ +package edgedevices + +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 *EdgeDevice +} + +// Get ... +func (c EdgeDevicesClient) Get(ctx context.Context, id ScopedEdgeDeviceId) (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 EdgeDevice + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/method_list.go new file mode 100644 index 000000000000..8d62a20d743a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/method_list.go @@ -0,0 +1,92 @@ +package edgedevices + +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 ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]EdgeDevice +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []EdgeDevice +} + +// List ... +func (c EdgeDevicesClient) List(ctx context.Context, id commonids.ScopeId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/edgeDevices", 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 *[]EdgeDevice `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c EdgeDevicesClient) ListComplete(ctx context.Context, id commonids.ScopeId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, EdgeDeviceOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c EdgeDevicesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate EdgeDeviceOperationPredicate) (result ListCompleteResult, err error) { + items := make([]EdgeDevice, 0) + + resp, err := c.List(ctx, id) + if err != nil { + 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 = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/method_validate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/method_validate.go new file mode 100644 index 000000000000..d27edbf6a8eb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/method_validate.go @@ -0,0 +1,75 @@ +package edgedevices + +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 ValidateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ValidateResponse +} + +// Validate ... +func (c EdgeDevicesClient) Validate(ctx context.Context, id ScopedEdgeDeviceId, input ValidateRequest) (result ValidateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/validate", 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 +} + +// ValidateThenPoll performs Validate then polls until it's completed +func (c EdgeDevicesClient) ValidateThenPoll(ctx context.Context, id ScopedEdgeDeviceId, input ValidateRequest) error { + result, err := c.Validate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Validate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Validate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_deviceconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_deviceconfiguration.go new file mode 100644 index 000000000000..69702c977dac --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_deviceconfiguration.go @@ -0,0 +1,9 @@ +package edgedevices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeviceConfiguration struct { + DeviceMetadata *string `json:"deviceMetadata,omitempty"` + NicDetails *[]NicDetail `json:"nicDetails,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_edgedevice.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_edgedevice.go new file mode 100644 index 000000000000..02a3e9f4e27b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_edgedevice.go @@ -0,0 +1,16 @@ +package edgedevices + +import ( + "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 EdgeDevice struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *EdgeDeviceProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_edgedeviceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_edgedeviceproperties.go new file mode 100644 index 000000000000..fb8d01b48411 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_edgedeviceproperties.go @@ -0,0 +1,9 @@ +package edgedevices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdgeDeviceProperties struct { + DeviceConfiguration *DeviceConfiguration `json:"deviceConfiguration,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_nicdetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_nicdetail.go new file mode 100644 index 000000000000..dfa392749d0e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_nicdetail.go @@ -0,0 +1,16 @@ +package edgedevices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NicDetail struct { + AdapterName string `json:"adapterName"` + ComponentId *string `json:"componentId,omitempty"` + DefaultGateway *string `json:"defaultGateway,omitempty"` + DefaultIsolationId *string `json:"defaultIsolationId,omitempty"` + DnsServers *[]string `json:"dnsServers,omitempty"` + DriverVersion *string `json:"driverVersion,omitempty"` + IP4Address *string `json:"ip4Address,omitempty"` + InterfaceDescription *string `json:"interfaceDescription,omitempty"` + SubnetMask *string `json:"subnetMask,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_validaterequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_validaterequest.go new file mode 100644 index 000000000000..3bbd45293f33 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_validaterequest.go @@ -0,0 +1,9 @@ +package edgedevices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateRequest struct { + AdditionalInfo *string `json:"additionalInfo,omitempty"` + EdgeDeviceIds []string `json:"edgeDeviceIds"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_validateresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_validateresponse.go new file mode 100644 index 000000000000..d9d470839e1e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/model_validateresponse.go @@ -0,0 +1,8 @@ +package edgedevices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateResponse struct { + Status *string `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/predicates.go new file mode 100644 index 000000000000..662e3d34a4d3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/predicates.go @@ -0,0 +1,27 @@ +package edgedevices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdgeDeviceOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p EdgeDeviceOperationPredicate) Matches(input EdgeDevice) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/version.go new file mode 100644 index 000000000000..df48529894b2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices/version.go @@ -0,0 +1,12 @@ +package edgedevices + +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-01-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/edgedevices/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/README.md similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/README.md index d63393dcb231..5734efdd9feb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions` Documentation -The `extensions` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2023-08-01`). +The `extensions` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). 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-sdk/resource-manager/azurestackhci/2023-08-01/extensions" +import "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/constants.go 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/2024-01-01/extensions/id_arcsetting.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/id_arcsetting.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/id_arcsetting.go 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/2024-01-01/extensions/id_extension.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/id_extension.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/id_extension.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/method_listbyarcsetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/method_listbyarcsetting.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/method_listbyarcsetting.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/method_listbyarcsetting.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/method_upgrade.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/method_upgrade.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/method_upgrade.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/method_upgrade.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extension.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extension.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extension.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extension.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extensioninstanceview.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extensioninstanceview.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extensioninstanceview.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extensioninstanceview.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extensioninstanceviewstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extensioninstanceviewstatus.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extensioninstanceviewstatus.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extensioninstanceviewstatus.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extensionparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extensionparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extensionparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extensionparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extensionpatch.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extensionpatch.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extensionpatch.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extensionpatch.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extensionpatchparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extensionpatchparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extensionpatchparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extensionpatchparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extensionpatchproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extensionpatchproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extensionpatchproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extensionpatchproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extensionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extensionproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extensionproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extensionproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extensionupgradeparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extensionupgradeparameters.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_extensionupgradeparameters.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_extensionupgradeparameters.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_pernodeextensionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_pernodeextensionstate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/model_pernodeextensionstate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/model_pernodeextensionstate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/version.go index 71695326edf9..c4565a5f03e1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions/version.go @@ -5,7 +5,7 @@ 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 = "2023-08-01" +const defaultApiVersion = "2024-01-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/extensions/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/README.md new file mode 100644 index 000000000000..75c18c4857e6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/README.md @@ -0,0 +1,117 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages` Documentation + +The `galleryimages` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). + +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/azurestackhci/2024-01-01/galleryimages" +``` + + +### Client Initialization + +```go +client := galleryimages.NewGalleryImagesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `GalleryImagesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := galleryimages.NewGalleryImageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "galleryImageValue") + +payload := galleryimages.GalleryImages{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `GalleryImagesClient.Delete` + +```go +ctx := context.TODO() +id := galleryimages.NewGalleryImageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "galleryImageValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `GalleryImagesClient.Get` + +```go +ctx := context.TODO() +id := galleryimages.NewGalleryImageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "galleryImageValue") + +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: `GalleryImagesClient.List` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `GalleryImagesClient.ListAll` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination +items, err := client.ListAllComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `GalleryImagesClient.Update` + +```go +ctx := context.TODO() +id := galleryimages.NewGalleryImageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "galleryImageValue") + +payload := galleryimages.GalleryImagesUpdateRequest{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/client.go new file mode 100644 index 000000000000..59b9c848dbd0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/client.go @@ -0,0 +1,26 @@ +package galleryimages + +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 GalleryImagesClient struct { + Client *resourcemanager.Client +} + +func NewGalleryImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleryImagesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleryimages", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating GalleryImagesClient: %+v", err) + } + + return &GalleryImagesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/constants.go new file mode 100644 index 000000000000..57bfe8f301bf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/constants.go @@ -0,0 +1,268 @@ +package galleryimages + +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 CloudInitDataSource string + +const ( + CloudInitDataSourceAzure CloudInitDataSource = "Azure" + CloudInitDataSourceNoCloud CloudInitDataSource = "NoCloud" +) + +func PossibleValuesForCloudInitDataSource() []string { + return []string{ + string(CloudInitDataSourceAzure), + string(CloudInitDataSourceNoCloud), + } +} + +func (s *CloudInitDataSource) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCloudInitDataSource(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCloudInitDataSource(input string) (*CloudInitDataSource, error) { + vals := map[string]CloudInitDataSource{ + "azure": CloudInitDataSourceAzure, + "nocloud": CloudInitDataSourceNoCloud, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CloudInitDataSource(input) + return &out, nil +} + +type ExtendedLocationTypes string + +const ( + ExtendedLocationTypesCustomLocation ExtendedLocationTypes = "CustomLocation" +) + +func PossibleValuesForExtendedLocationTypes() []string { + return []string{ + string(ExtendedLocationTypesCustomLocation), + } +} + +func (s *ExtendedLocationTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExtendedLocationTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExtendedLocationTypes(input string) (*ExtendedLocationTypes, error) { + vals := map[string]ExtendedLocationTypes{ + "customlocation": ExtendedLocationTypesCustomLocation, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExtendedLocationTypes(input) + return &out, nil +} + +type HyperVGeneration string + +const ( + HyperVGenerationVOne HyperVGeneration = "V1" + HyperVGenerationVTwo HyperVGeneration = "V2" +) + +func PossibleValuesForHyperVGeneration() []string { + return []string{ + string(HyperVGenerationVOne), + string(HyperVGenerationVTwo), + } +} + +func (s *HyperVGeneration) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHyperVGeneration(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHyperVGeneration(input string) (*HyperVGeneration, error) { + vals := map[string]HyperVGeneration{ + "v1": HyperVGenerationVOne, + "v2": HyperVGenerationVTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HyperVGeneration(input) + return &out, nil +} + +type OperatingSystemTypes string + +const ( + OperatingSystemTypesLinux OperatingSystemTypes = "Linux" + OperatingSystemTypesWindows OperatingSystemTypes = "Windows" +) + +func PossibleValuesForOperatingSystemTypes() []string { + return []string{ + string(OperatingSystemTypesLinux), + string(OperatingSystemTypesWindows), + } +} + +func (s *OperatingSystemTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOperatingSystemTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOperatingSystemTypes(input string) (*OperatingSystemTypes, error) { + vals := map[string]OperatingSystemTypes{ + "linux": OperatingSystemTypesLinux, + "windows": OperatingSystemTypesWindows, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OperatingSystemTypes(input) + return &out, nil +} + +type ProvisioningStateEnum string + +const ( + ProvisioningStateEnumAccepted ProvisioningStateEnum = "Accepted" + ProvisioningStateEnumCanceled ProvisioningStateEnum = "Canceled" + ProvisioningStateEnumDeleting ProvisioningStateEnum = "Deleting" + ProvisioningStateEnumFailed ProvisioningStateEnum = "Failed" + ProvisioningStateEnumInProgress ProvisioningStateEnum = "InProgress" + ProvisioningStateEnumSucceeded ProvisioningStateEnum = "Succeeded" +) + +func PossibleValuesForProvisioningStateEnum() []string { + return []string{ + string(ProvisioningStateEnumAccepted), + string(ProvisioningStateEnumCanceled), + string(ProvisioningStateEnumDeleting), + string(ProvisioningStateEnumFailed), + string(ProvisioningStateEnumInProgress), + string(ProvisioningStateEnumSucceeded), + } +} + +func (s *ProvisioningStateEnum) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningStateEnum(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningStateEnum(input string) (*ProvisioningStateEnum, error) { + vals := map[string]ProvisioningStateEnum{ + "accepted": ProvisioningStateEnumAccepted, + "canceled": ProvisioningStateEnumCanceled, + "deleting": ProvisioningStateEnumDeleting, + "failed": ProvisioningStateEnumFailed, + "inprogress": ProvisioningStateEnumInProgress, + "succeeded": ProvisioningStateEnumSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningStateEnum(input) + return &out, nil +} + +type Status string + +const ( + StatusFailed Status = "Failed" + StatusInProgress Status = "InProgress" + StatusSucceeded Status = "Succeeded" +) + +func PossibleValuesForStatus() []string { + return []string{ + string(StatusFailed), + string(StatusInProgress), + string(StatusSucceeded), + } +} + +func (s *Status) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStatus(input string) (*Status, error) { + vals := map[string]Status{ + "failed": StatusFailed, + "inprogress": StatusInProgress, + "succeeded": StatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Status(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/id_galleryimage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/id_galleryimage.go new file mode 100644 index 000000000000..a35eb568df7d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/id_galleryimage.go @@ -0,0 +1,125 @@ +package galleryimages + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &GalleryImageId{} + +// GalleryImageId is a struct representing the Resource ID for a Gallery Image +type GalleryImageId struct { + SubscriptionId string + ResourceGroupName string + GalleryImageName string +} + +// NewGalleryImageID returns a new GalleryImageId struct +func NewGalleryImageID(subscriptionId string, resourceGroupName string, galleryImageName string) GalleryImageId { + return GalleryImageId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + GalleryImageName: galleryImageName, + } +} + +// ParseGalleryImageID parses 'input' into a GalleryImageId +func ParseGalleryImageID(input string) (*GalleryImageId, error) { + parser := resourceids.NewParserFromResourceIdType(&GalleryImageId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := GalleryImageId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseGalleryImageIDInsensitively parses 'input' case-insensitively into a GalleryImageId +// note: this method should only be used for API response data and not user input +func ParseGalleryImageIDInsensitively(input string) (*GalleryImageId, error) { + parser := resourceids.NewParserFromResourceIdType(&GalleryImageId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := GalleryImageId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *GalleryImageId) FromParseResult(input 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.GalleryImageName, ok = input.Parsed["galleryImageName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "galleryImageName", input) + } + + return nil +} + +// ValidateGalleryImageID checks that 'input' can be parsed as a Gallery Image ID +func ValidateGalleryImageID(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 := ParseGalleryImageID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Gallery Image ID +func (id GalleryImageId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.AzureStackHCI/galleryImages/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.GalleryImageName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Gallery Image ID +func (id GalleryImageId) 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("staticMicrosoftAzureStackHCI", "Microsoft.AzureStackHCI", "Microsoft.AzureStackHCI"), + resourceids.StaticSegment("staticGalleryImages", "galleryImages", "galleryImages"), + resourceids.UserSpecifiedSegment("galleryImageName", "galleryImageValue"), + } +} + +// String returns a human-readable description of this Gallery Image ID +func (id GalleryImageId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Gallery Image Name: %q", id.GalleryImageName), + } + return fmt.Sprintf("Gallery Image (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_createorupdate.go new file mode 100644 index 000000000000..306463b223b5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_createorupdate.go @@ -0,0 +1,75 @@ +package galleryimages + +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 *GalleryImages +} + +// CreateOrUpdate ... +func (c GalleryImagesClient) CreateOrUpdate(ctx context.Context, id GalleryImageId, input GalleryImages) (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 GalleryImagesClient) CreateOrUpdateThenPoll(ctx context.Context, id GalleryImageId, input GalleryImages) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_delete.go new file mode 100644 index 000000000000..635a0f9294d0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_delete.go @@ -0,0 +1,70 @@ +package galleryimages + +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 GalleryImagesClient) Delete(ctx context.Context, id GalleryImageId) (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 GalleryImagesClient) DeleteThenPoll(ctx context.Context, id GalleryImageId) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_get.go new file mode 100644 index 000000000000..213453f768ad --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_get.go @@ -0,0 +1,54 @@ +package galleryimages + +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 *GalleryImages +} + +// Get ... +func (c GalleryImagesClient) Get(ctx context.Context, id GalleryImageId) (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 GalleryImages + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_list.go new file mode 100644 index 000000000000..e171f62e8cef --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_list.go @@ -0,0 +1,92 @@ +package galleryimages + +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 ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]GalleryImages +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []GalleryImages +} + +// List ... +func (c GalleryImagesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/galleryImages", 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 *[]GalleryImages `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c GalleryImagesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, GalleryImagesOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c GalleryImagesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate GalleryImagesOperationPredicate) (result ListCompleteResult, err error) { + items := make([]GalleryImages, 0) + + resp, err := c.List(ctx, id) + if err != nil { + 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 = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_listall.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_listall.go new file mode 100644 index 000000000000..e39e2388d80e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_listall.go @@ -0,0 +1,92 @@ +package galleryimages + +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 ListAllOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]GalleryImages +} + +type ListAllCompleteResult struct { + LatestHttpResponse *http.Response + Items []GalleryImages +} + +// ListAll ... +func (c GalleryImagesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/galleryImages", 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 *[]GalleryImages `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListAllComplete retrieves all the results into a single object +func (c GalleryImagesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { + return c.ListAllCompleteMatchingPredicate(ctx, id, GalleryImagesOperationPredicate{}) +} + +// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c GalleryImagesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate GalleryImagesOperationPredicate) (result ListAllCompleteResult, err error) { + items := make([]GalleryImages, 0) + + resp, err := c.ListAll(ctx, id) + if err != nil { + 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 = ListAllCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_update.go new file mode 100644 index 000000000000..817f5c803d12 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/method_update.go @@ -0,0 +1,75 @@ +package galleryimages + +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 UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *GalleryImages +} + +// Update ... +func (c GalleryImagesClient) Update(ctx context.Context, id GalleryImageId, input GalleryImagesUpdateRequest) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c GalleryImagesClient) UpdateThenPoll(ctx context.Context, id GalleryImageId, input GalleryImagesUpdateRequest) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_extendedlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_extendedlocation.go new file mode 100644 index 000000000000..de4007c50341 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_extendedlocation.go @@ -0,0 +1,9 @@ +package galleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedLocation struct { + Name *string `json:"name,omitempty"` + Type *ExtendedLocationTypes `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_gallerydiskimage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_gallerydiskimage.go new file mode 100644 index 000000000000..9586c039d4d7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_gallerydiskimage.go @@ -0,0 +1,8 @@ +package galleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GalleryDiskImage struct { + SizeInMB *int64 `json:"sizeInMB,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimageidentifier.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimageidentifier.go new file mode 100644 index 000000000000..c4ba59a4105d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimageidentifier.go @@ -0,0 +1,10 @@ +package galleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GalleryImageIdentifier struct { + Offer string `json:"offer"` + Publisher string `json:"publisher"` + Sku string `json:"sku"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimageproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimageproperties.go new file mode 100644 index 000000000000..01b92688cc86 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimageproperties.go @@ -0,0 +1,16 @@ +package galleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GalleryImageProperties struct { + CloudInitDataSource *CloudInitDataSource `json:"cloudInitDataSource,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + HyperVGeneration *HyperVGeneration `json:"hyperVGeneration,omitempty"` + Identifier *GalleryImageIdentifier `json:"identifier,omitempty"` + ImagePath *string `json:"imagePath,omitempty"` + OsType OperatingSystemTypes `json:"osType"` + ProvisioningState *ProvisioningStateEnum `json:"provisioningState,omitempty"` + Status *GalleryImageStatus `json:"status,omitempty"` + Version *GalleryImageVersion `json:"version,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimages.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimages.go new file mode 100644 index 000000000000..2822280c55b0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimages.go @@ -0,0 +1,19 @@ +package galleryimages + +import ( + "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 GalleryImages struct { + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *GalleryImageProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimagestatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimagestatus.go new file mode 100644 index 000000000000..8a966e4b8f0c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimagestatus.go @@ -0,0 +1,12 @@ +package galleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GalleryImageStatus struct { + DownloadStatus *GalleryImageStatusDownloadStatus `json:"downloadStatus,omitempty"` + ErrorCode *string `json:"errorCode,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + ProgressPercentage *int64 `json:"progressPercentage,omitempty"` + ProvisioningStatus *GalleryImageStatusProvisioningStatus `json:"provisioningStatus,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimagestatusdownloadstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimagestatusdownloadstatus.go new file mode 100644 index 000000000000..c395a6d3a9ac --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimagestatusdownloadstatus.go @@ -0,0 +1,8 @@ +package galleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GalleryImageStatusDownloadStatus struct { + DownloadSizeInMB *int64 `json:"downloadSizeInMB,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimagestatusprovisioningstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimagestatusprovisioningstatus.go new file mode 100644 index 000000000000..b28f2566755e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimagestatusprovisioningstatus.go @@ -0,0 +1,9 @@ +package galleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GalleryImageStatusProvisioningStatus struct { + OperationId *string `json:"operationId,omitempty"` + Status *Status `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimagesupdaterequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimagesupdaterequest.go new file mode 100644 index 000000000000..9e6dd0452e87 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimagesupdaterequest.go @@ -0,0 +1,8 @@ +package galleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GalleryImagesUpdateRequest struct { + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimageversion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimageversion.go new file mode 100644 index 000000000000..13ec192bd645 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimageversion.go @@ -0,0 +1,9 @@ +package galleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GalleryImageVersion struct { + Name *string `json:"name,omitempty"` + Properties *GalleryImageVersionProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimageversionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimageversionproperties.go new file mode 100644 index 000000000000..3790dd0595a3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimageversionproperties.go @@ -0,0 +1,8 @@ +package galleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GalleryImageVersionProperties struct { + StorageProfile GalleryImageVersionStorageProfile `json:"storageProfile"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimageversionstorageprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimageversionstorageprofile.go new file mode 100644 index 000000000000..c67752237245 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/model_galleryimageversionstorageprofile.go @@ -0,0 +1,8 @@ +package galleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GalleryImageVersionStorageProfile struct { + OsDiskImage *GalleryDiskImage `json:"osDiskImage,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/predicates.go new file mode 100644 index 000000000000..63c566696883 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/predicates.go @@ -0,0 +1,32 @@ +package galleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GalleryImagesOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p GalleryImagesOperationPredicate) Matches(input GalleryImages) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/version.go new file mode 100644 index 000000000000..68cdc92a92c6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages/version.go @@ -0,0 +1,12 @@ +package galleryimages + +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-01-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/galleryimages/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/README.md new file mode 100644 index 000000000000..0ac889e90639 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/README.md @@ -0,0 +1,83 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents` Documentation + +The `guestagents` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). + +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/azurestackhci/2024-01-01/guestagents" +``` + + +### Client Initialization + +```go +client := guestagents.NewGuestAgentsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `GuestAgentsClient.GuestAgentCreate` + +```go +ctx := context.TODO() +id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group") + +payload := guestagents.GuestAgent{ + // ... +} + + +if err := client.GuestAgentCreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `GuestAgentsClient.GuestAgentDelete` + +```go +ctx := context.TODO() +id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group") + +if err := client.GuestAgentDeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `GuestAgentsClient.GuestAgentGet` + +```go +ctx := context.TODO() +id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group") + +read, err := client.GuestAgentGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `GuestAgentsClient.List` + +```go +ctx := context.TODO() +id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/client.go new file mode 100644 index 000000000000..8b3899fa940f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/client.go @@ -0,0 +1,26 @@ +package guestagents + +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 GuestAgentsClient struct { + Client *resourcemanager.Client +} + +func NewGuestAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestAgentsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestagents", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating GuestAgentsClient: %+v", err) + } + + return &GuestAgentsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/constants.go new file mode 100644 index 000000000000..148c2721b51d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/constants.go @@ -0,0 +1,54 @@ +package guestagents + +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 ProvisioningAction string + +const ( + ProvisioningActionInstall ProvisioningAction = "install" + ProvisioningActionRepair ProvisioningAction = "repair" + ProvisioningActionUninstall ProvisioningAction = "uninstall" +) + +func PossibleValuesForProvisioningAction() []string { + return []string{ + string(ProvisioningActionInstall), + string(ProvisioningActionRepair), + string(ProvisioningActionUninstall), + } +} + +func (s *ProvisioningAction) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningAction(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningAction(input string) (*ProvisioningAction, error) { + vals := map[string]ProvisioningAction{ + "install": ProvisioningActionInstall, + "repair": ProvisioningActionRepair, + "uninstall": ProvisioningActionUninstall, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningAction(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/method_guestagentcreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/method_guestagentcreate.go new file mode 100644 index 000000000000..b9461107c6b8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/method_guestagentcreate.go @@ -0,0 +1,76 @@ +package guestagents + +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/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 GuestAgentCreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *GuestAgent +} + +// GuestAgentCreate ... +func (c GuestAgentsClient) GuestAgentCreate(ctx context.Context, id commonids.ScopeId, input GuestAgent) (result GuestAgentCreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/guestAgents/default", 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 +} + +// GuestAgentCreateThenPoll performs GuestAgentCreate then polls until it's completed +func (c GuestAgentsClient) GuestAgentCreateThenPoll(ctx context.Context, id commonids.ScopeId, input GuestAgent) error { + result, err := c.GuestAgentCreate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing GuestAgentCreate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after GuestAgentCreate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/method_guestagentdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/method_guestagentdelete.go new file mode 100644 index 000000000000..7f9080a2a634 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/method_guestagentdelete.go @@ -0,0 +1,71 @@ +package guestagents + +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/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 GuestAgentDeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// GuestAgentDelete ... +func (c GuestAgentsClient) GuestAgentDelete(ctx context.Context, id commonids.ScopeId) (result GuestAgentDeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + }, + HttpMethod: http.MethodDelete, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/guestAgents/default", 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 +} + +// GuestAgentDeleteThenPoll performs GuestAgentDelete then polls until it's completed +func (c GuestAgentsClient) GuestAgentDeleteThenPoll(ctx context.Context, id commonids.ScopeId) error { + result, err := c.GuestAgentDelete(ctx, id) + if err != nil { + return fmt.Errorf("performing GuestAgentDelete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after GuestAgentDelete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/method_guestagentget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/method_guestagentget.go new file mode 100644 index 000000000000..0e039b2086d2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/method_guestagentget.go @@ -0,0 +1,56 @@ +package guestagents + +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 GuestAgentGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *GuestAgent +} + +// GuestAgentGet ... +func (c GuestAgentsClient) GuestAgentGet(ctx context.Context, id commonids.ScopeId) (result GuestAgentGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/guestAgents/default", 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 GuestAgent + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/method_list.go new file mode 100644 index 000000000000..05786b103367 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/method_list.go @@ -0,0 +1,92 @@ +package guestagents + +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 ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]GuestAgent +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []GuestAgent +} + +// List ... +func (c GuestAgentsClient) List(ctx context.Context, id commonids.ScopeId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/guestAgents", 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 *[]GuestAgent `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c GuestAgentsClient) ListComplete(ctx context.Context, id commonids.ScopeId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, GuestAgentOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c GuestAgentsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate GuestAgentOperationPredicate) (result ListCompleteResult, err error) { + items := make([]GuestAgent, 0) + + resp, err := c.List(ctx, id) + if err != nil { + 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 = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/model_guestagent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/model_guestagent.go new file mode 100644 index 000000000000..9614c14071cb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/model_guestagent.go @@ -0,0 +1,16 @@ +package guestagents + +import ( + "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 GuestAgent struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties GuestAgentProperties `json:"properties"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/model_guestagentproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/model_guestagentproperties.go new file mode 100644 index 000000000000..7e671a9f75b8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/model_guestagentproperties.go @@ -0,0 +1,11 @@ +package guestagents + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GuestAgentProperties struct { + Credentials *GuestCredential `json:"credentials,omitempty"` + ProvisioningAction *ProvisioningAction `json:"provisioningAction,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + Status *string `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/model_guestcredential.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/model_guestcredential.go new file mode 100644 index 000000000000..98dcf0b76f41 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/model_guestcredential.go @@ -0,0 +1,9 @@ +package guestagents + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GuestCredential struct { + Password *string `json:"password,omitempty"` + Username *string `json:"username,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/predicates.go new file mode 100644 index 000000000000..f51a9dcf2c9f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/predicates.go @@ -0,0 +1,27 @@ +package guestagents + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GuestAgentOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p GuestAgentOperationPredicate) Matches(input GuestAgent) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/version.go new file mode 100644 index 000000000000..da58ff4d4a25 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents/version.go @@ -0,0 +1,12 @@ +package guestagents + +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-01-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/guestagents/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/README.md new file mode 100644 index 000000000000..542581e7866b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/README.md @@ -0,0 +1,54 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata` Documentation + +The `hybrididentitymetadata` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). + +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/azurestackhci/2024-01-01/hybrididentitymetadata" +``` + + +### Client Initialization + +```go +client := hybrididentitymetadata.NewHybridIdentityMetadataClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `HybridIdentityMetadataClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group") + +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: `HybridIdentityMetadataClient.List` + +```go +ctx := context.TODO() +id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/client.go new file mode 100644 index 000000000000..597657e59012 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/client.go @@ -0,0 +1,26 @@ +package hybrididentitymetadata + +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 HybridIdentityMetadataClient struct { + Client *resourcemanager.Client +} + +func NewHybridIdentityMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*HybridIdentityMetadataClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hybrididentitymetadata", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating HybridIdentityMetadataClient: %+v", err) + } + + return &HybridIdentityMetadataClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/method_get.go new file mode 100644 index 000000000000..759c20ac51bb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/method_get.go @@ -0,0 +1,56 @@ +package hybrididentitymetadata + +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 GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *HybridIdentityMetadata +} + +// Get ... +func (c HybridIdentityMetadataClient) Get(ctx context.Context, id commonids.ScopeId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/hybridIdentityMetadata/default", 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 HybridIdentityMetadata + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/method_list.go new file mode 100644 index 000000000000..12cf31659eae --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/method_list.go @@ -0,0 +1,92 @@ +package hybrididentitymetadata + +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 ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]HybridIdentityMetadata +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []HybridIdentityMetadata +} + +// List ... +func (c HybridIdentityMetadataClient) List(ctx context.Context, id commonids.ScopeId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/hybridIdentityMetadata", 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 *[]HybridIdentityMetadata `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c HybridIdentityMetadataClient) ListComplete(ctx context.Context, id commonids.ScopeId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, HybridIdentityMetadataOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c HybridIdentityMetadataClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate HybridIdentityMetadataOperationPredicate) (result ListCompleteResult, err error) { + items := make([]HybridIdentityMetadata, 0) + + resp, err := c.List(ctx, id) + if err != nil { + 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 = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/model_hybrididentitymetadata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/model_hybrididentitymetadata.go new file mode 100644 index 000000000000..301219b821b0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/model_hybrididentitymetadata.go @@ -0,0 +1,16 @@ +package hybrididentitymetadata + +import ( + "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 HybridIdentityMetadata struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties HybridIdentityMetadataProperties `json:"properties"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/model_hybrididentitymetadataproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/model_hybrididentitymetadataproperties.go new file mode 100644 index 000000000000..b04d47566583 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/model_hybrididentitymetadataproperties.go @@ -0,0 +1,15 @@ +package hybrididentitymetadata + +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 HybridIdentityMetadataProperties struct { + Identity *identity.SystemAssigned `json:"identity,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + PublicKey *string `json:"publicKey,omitempty"` + ResourceUid *string `json:"resourceUid,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/predicates.go new file mode 100644 index 000000000000..5e9f9c439d59 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/predicates.go @@ -0,0 +1,27 @@ +package hybrididentitymetadata + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HybridIdentityMetadataOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p HybridIdentityMetadataOperationPredicate) Matches(input HybridIdentityMetadata) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/version.go new file mode 100644 index 000000000000..360a74868692 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/version.go @@ -0,0 +1,12 @@ +package hybrididentitymetadata + +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-01-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/hybrididentitymetadata/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/README.md new file mode 100644 index 000000000000..cca883d4aa99 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/README.md @@ -0,0 +1,117 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks` Documentation + +The `logicalnetworks` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). + +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/azurestackhci/2024-01-01/logicalnetworks" +``` + + +### Client Initialization + +```go +client := logicalnetworks.NewLogicalNetworksClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `LogicalNetworksClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := logicalnetworks.NewLogicalNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "logicalNetworkValue") + +payload := logicalnetworks.LogicalNetworks{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `LogicalNetworksClient.Delete` + +```go +ctx := context.TODO() +id := logicalnetworks.NewLogicalNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "logicalNetworkValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `LogicalNetworksClient.Get` + +```go +ctx := context.TODO() +id := logicalnetworks.NewLogicalNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "logicalNetworkValue") + +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: `LogicalNetworksClient.List` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `LogicalNetworksClient.ListAll` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination +items, err := client.ListAllComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `LogicalNetworksClient.Update` + +```go +ctx := context.TODO() +id := logicalnetworks.NewLogicalNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "logicalNetworkValue") + +payload := logicalnetworks.LogicalNetworksUpdateRequest{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/client.go new file mode 100644 index 000000000000..1ab7fafbcfe5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/client.go @@ -0,0 +1,26 @@ +package logicalnetworks + +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 LogicalNetworksClient struct { + Client *resourcemanager.Client +} + +func NewLogicalNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*LogicalNetworksClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logicalnetworks", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating LogicalNetworksClient: %+v", err) + } + + return &LogicalNetworksClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/constants.go new file mode 100644 index 000000000000..a67025636ed5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/constants.go @@ -0,0 +1,227 @@ +package logicalnetworks + +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 ExtendedLocationTypes string + +const ( + ExtendedLocationTypesCustomLocation ExtendedLocationTypes = "CustomLocation" +) + +func PossibleValuesForExtendedLocationTypes() []string { + return []string{ + string(ExtendedLocationTypesCustomLocation), + } +} + +func (s *ExtendedLocationTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExtendedLocationTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExtendedLocationTypes(input string) (*ExtendedLocationTypes, error) { + vals := map[string]ExtendedLocationTypes{ + "customlocation": ExtendedLocationTypesCustomLocation, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExtendedLocationTypes(input) + return &out, nil +} + +type IPAllocationMethodEnum string + +const ( + IPAllocationMethodEnumDynamic IPAllocationMethodEnum = "Dynamic" + IPAllocationMethodEnumStatic IPAllocationMethodEnum = "Static" +) + +func PossibleValuesForIPAllocationMethodEnum() []string { + return []string{ + string(IPAllocationMethodEnumDynamic), + string(IPAllocationMethodEnumStatic), + } +} + +func (s *IPAllocationMethodEnum) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIPAllocationMethodEnum(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIPAllocationMethodEnum(input string) (*IPAllocationMethodEnum, error) { + vals := map[string]IPAllocationMethodEnum{ + "dynamic": IPAllocationMethodEnumDynamic, + "static": IPAllocationMethodEnumStatic, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IPAllocationMethodEnum(input) + return &out, nil +} + +type IPPoolTypeEnum string + +const ( + IPPoolTypeEnumVM IPPoolTypeEnum = "vm" + IPPoolTypeEnumVippool IPPoolTypeEnum = "vippool" +) + +func PossibleValuesForIPPoolTypeEnum() []string { + return []string{ + string(IPPoolTypeEnumVM), + string(IPPoolTypeEnumVippool), + } +} + +func (s *IPPoolTypeEnum) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIPPoolTypeEnum(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIPPoolTypeEnum(input string) (*IPPoolTypeEnum, error) { + vals := map[string]IPPoolTypeEnum{ + "vm": IPPoolTypeEnumVM, + "vippool": IPPoolTypeEnumVippool, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IPPoolTypeEnum(input) + return &out, nil +} + +type ProvisioningStateEnum string + +const ( + ProvisioningStateEnumAccepted ProvisioningStateEnum = "Accepted" + ProvisioningStateEnumCanceled ProvisioningStateEnum = "Canceled" + ProvisioningStateEnumDeleting ProvisioningStateEnum = "Deleting" + ProvisioningStateEnumFailed ProvisioningStateEnum = "Failed" + ProvisioningStateEnumInProgress ProvisioningStateEnum = "InProgress" + ProvisioningStateEnumSucceeded ProvisioningStateEnum = "Succeeded" +) + +func PossibleValuesForProvisioningStateEnum() []string { + return []string{ + string(ProvisioningStateEnumAccepted), + string(ProvisioningStateEnumCanceled), + string(ProvisioningStateEnumDeleting), + string(ProvisioningStateEnumFailed), + string(ProvisioningStateEnumInProgress), + string(ProvisioningStateEnumSucceeded), + } +} + +func (s *ProvisioningStateEnum) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningStateEnum(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningStateEnum(input string) (*ProvisioningStateEnum, error) { + vals := map[string]ProvisioningStateEnum{ + "accepted": ProvisioningStateEnumAccepted, + "canceled": ProvisioningStateEnumCanceled, + "deleting": ProvisioningStateEnumDeleting, + "failed": ProvisioningStateEnumFailed, + "inprogress": ProvisioningStateEnumInProgress, + "succeeded": ProvisioningStateEnumSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningStateEnum(input) + return &out, nil +} + +type Status string + +const ( + StatusFailed Status = "Failed" + StatusInProgress Status = "InProgress" + StatusSucceeded Status = "Succeeded" +) + +func PossibleValuesForStatus() []string { + return []string{ + string(StatusFailed), + string(StatusInProgress), + string(StatusSucceeded), + } +} + +func (s *Status) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStatus(input string) (*Status, error) { + vals := map[string]Status{ + "failed": StatusFailed, + "inprogress": StatusInProgress, + "succeeded": StatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Status(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/id_logicalnetwork.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/id_logicalnetwork.go new file mode 100644 index 000000000000..86568e87e01d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/id_logicalnetwork.go @@ -0,0 +1,125 @@ +package logicalnetworks + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &LogicalNetworkId{} + +// LogicalNetworkId is a struct representing the Resource ID for a Logical Network +type LogicalNetworkId struct { + SubscriptionId string + ResourceGroupName string + LogicalNetworkName string +} + +// NewLogicalNetworkID returns a new LogicalNetworkId struct +func NewLogicalNetworkID(subscriptionId string, resourceGroupName string, logicalNetworkName string) LogicalNetworkId { + return LogicalNetworkId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + LogicalNetworkName: logicalNetworkName, + } +} + +// ParseLogicalNetworkID parses 'input' into a LogicalNetworkId +func ParseLogicalNetworkID(input string) (*LogicalNetworkId, error) { + parser := resourceids.NewParserFromResourceIdType(&LogicalNetworkId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LogicalNetworkId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseLogicalNetworkIDInsensitively parses 'input' case-insensitively into a LogicalNetworkId +// note: this method should only be used for API response data and not user input +func ParseLogicalNetworkIDInsensitively(input string) (*LogicalNetworkId, error) { + parser := resourceids.NewParserFromResourceIdType(&LogicalNetworkId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LogicalNetworkId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LogicalNetworkId) FromParseResult(input 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.LogicalNetworkName, ok = input.Parsed["logicalNetworkName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "logicalNetworkName", input) + } + + return nil +} + +// ValidateLogicalNetworkID checks that 'input' can be parsed as a Logical Network ID +func ValidateLogicalNetworkID(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 := ParseLogicalNetworkID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Logical Network ID +func (id LogicalNetworkId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.AzureStackHCI/logicalNetworks/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LogicalNetworkName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Logical Network ID +func (id LogicalNetworkId) 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("staticMicrosoftAzureStackHCI", "Microsoft.AzureStackHCI", "Microsoft.AzureStackHCI"), + resourceids.StaticSegment("staticLogicalNetworks", "logicalNetworks", "logicalNetworks"), + resourceids.UserSpecifiedSegment("logicalNetworkName", "logicalNetworkValue"), + } +} + +// String returns a human-readable description of this Logical Network ID +func (id LogicalNetworkId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Logical Network Name: %q", id.LogicalNetworkName), + } + return fmt.Sprintf("Logical Network (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_createorupdate.go new file mode 100644 index 000000000000..e81cab5a9525 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_createorupdate.go @@ -0,0 +1,75 @@ +package logicalnetworks + +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 *LogicalNetworks +} + +// CreateOrUpdate ... +func (c LogicalNetworksClient) CreateOrUpdate(ctx context.Context, id LogicalNetworkId, input LogicalNetworks) (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 LogicalNetworksClient) CreateOrUpdateThenPoll(ctx context.Context, id LogicalNetworkId, input LogicalNetworks) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_delete.go new file mode 100644 index 000000000000..7a0b121dca63 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_delete.go @@ -0,0 +1,70 @@ +package logicalnetworks + +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 LogicalNetworksClient) Delete(ctx context.Context, id LogicalNetworkId) (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 LogicalNetworksClient) DeleteThenPoll(ctx context.Context, id LogicalNetworkId) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_get.go new file mode 100644 index 000000000000..8e6d89f1c643 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_get.go @@ -0,0 +1,54 @@ +package logicalnetworks + +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 *LogicalNetworks +} + +// Get ... +func (c LogicalNetworksClient) Get(ctx context.Context, id LogicalNetworkId) (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 LogicalNetworks + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_list.go new file mode 100644 index 000000000000..ac44ca1f776b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_list.go @@ -0,0 +1,92 @@ +package logicalnetworks + +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 ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]LogicalNetworks +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []LogicalNetworks +} + +// List ... +func (c LogicalNetworksClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/logicalNetworks", 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 *[]LogicalNetworks `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c LogicalNetworksClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, LogicalNetworksOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c LogicalNetworksClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LogicalNetworksOperationPredicate) (result ListCompleteResult, err error) { + items := make([]LogicalNetworks, 0) + + resp, err := c.List(ctx, id) + if err != nil { + 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 = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_listall.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_listall.go new file mode 100644 index 000000000000..02e39aff2b85 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_listall.go @@ -0,0 +1,92 @@ +package logicalnetworks + +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 ListAllOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]LogicalNetworks +} + +type ListAllCompleteResult struct { + LatestHttpResponse *http.Response + Items []LogicalNetworks +} + +// ListAll ... +func (c LogicalNetworksClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/logicalNetworks", 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 *[]LogicalNetworks `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListAllComplete retrieves all the results into a single object +func (c LogicalNetworksClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { + return c.ListAllCompleteMatchingPredicate(ctx, id, LogicalNetworksOperationPredicate{}) +} + +// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c LogicalNetworksClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate LogicalNetworksOperationPredicate) (result ListAllCompleteResult, err error) { + items := make([]LogicalNetworks, 0) + + resp, err := c.ListAll(ctx, id) + if err != nil { + 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 = ListAllCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_update.go new file mode 100644 index 000000000000..cd2fc98c9f43 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_update.go @@ -0,0 +1,75 @@ +package logicalnetworks + +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 UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *LogicalNetworks +} + +// Update ... +func (c LogicalNetworksClient) Update(ctx context.Context, id LogicalNetworkId, input LogicalNetworksUpdateRequest) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c LogicalNetworksClient) UpdateThenPoll(ctx context.Context, id LogicalNetworkId, input LogicalNetworksUpdateRequest) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_extendedlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_extendedlocation.go new file mode 100644 index 000000000000..1b8aaf852e3f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_extendedlocation.go @@ -0,0 +1,9 @@ +package logicalnetworks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedLocation struct { + Name *string `json:"name,omitempty"` + Type *ExtendedLocationTypes `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_ippool.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_ippool.go new file mode 100644 index 000000000000..a38aebc47ca8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_ippool.go @@ -0,0 +1,12 @@ +package logicalnetworks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPPool struct { + End *string `json:"end,omitempty"` + IPPoolType *IPPoolTypeEnum `json:"ipPoolType,omitempty"` + Info *IPPoolInfo `json:"info,omitempty"` + Name *string `json:"name,omitempty"` + Start *string `json:"start,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_ippoolinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_ippoolinfo.go new file mode 100644 index 000000000000..ea018cf572ce --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_ippoolinfo.go @@ -0,0 +1,9 @@ +package logicalnetworks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPPoolInfo struct { + Available *string `json:"available,omitempty"` + Used *string `json:"used,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworkproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworkproperties.go new file mode 100644 index 000000000000..82b4ee030f7c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworkproperties.go @@ -0,0 +1,12 @@ +package logicalnetworks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LogicalNetworkProperties struct { + DhcpOptions *LogicalNetworkPropertiesDhcpOptions `json:"dhcpOptions,omitempty"` + ProvisioningState *ProvisioningStateEnum `json:"provisioningState,omitempty"` + Status *LogicalNetworkStatus `json:"status,omitempty"` + Subnets *[]Subnet `json:"subnets,omitempty"` + VMSwitchName *string `json:"vmSwitchName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworkpropertiesdhcpoptions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworkpropertiesdhcpoptions.go new file mode 100644 index 000000000000..b7f824ae587f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworkpropertiesdhcpoptions.go @@ -0,0 +1,8 @@ +package logicalnetworks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LogicalNetworkPropertiesDhcpOptions struct { + DnsServers *[]string `json:"dnsServers,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworks.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworks.go new file mode 100644 index 000000000000..df65bd28854c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworks.go @@ -0,0 +1,19 @@ +package logicalnetworks + +import ( + "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 LogicalNetworks struct { + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *LogicalNetworkProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworkstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworkstatus.go new file mode 100644 index 000000000000..c4c6bfcb65d6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworkstatus.go @@ -0,0 +1,10 @@ +package logicalnetworks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LogicalNetworkStatus struct { + ErrorCode *string `json:"errorCode,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + ProvisioningStatus *LogicalNetworkStatusProvisioningStatus `json:"provisioningStatus,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworkstatusprovisioningstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworkstatusprovisioningstatus.go new file mode 100644 index 000000000000..4b42c07e7e83 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworkstatusprovisioningstatus.go @@ -0,0 +1,9 @@ +package logicalnetworks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LogicalNetworkStatusProvisioningStatus struct { + OperationId *string `json:"operationId,omitempty"` + Status *Status `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworksupdaterequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworksupdaterequest.go new file mode 100644 index 000000000000..f3ea7229f107 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_logicalnetworksupdaterequest.go @@ -0,0 +1,8 @@ +package logicalnetworks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LogicalNetworksUpdateRequest struct { + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_route.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_route.go new file mode 100644 index 000000000000..605cfd736c36 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_route.go @@ -0,0 +1,9 @@ +package logicalnetworks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Route struct { + Name *string `json:"name,omitempty"` + Properties *RoutePropertiesFormat `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_routepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_routepropertiesformat.go new file mode 100644 index 000000000000..77c4db98967d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_routepropertiesformat.go @@ -0,0 +1,9 @@ +package logicalnetworks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RoutePropertiesFormat struct { + AddressPrefix *string `json:"addressPrefix,omitempty"` + NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_routetable.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_routetable.go new file mode 100644 index 000000000000..f0c1ba0b0b86 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_routetable.go @@ -0,0 +1,11 @@ +package logicalnetworks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RouteTable struct { + Etag *string `json:"etag,omitempty"` + Name *string `json:"name,omitempty"` + Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_routetablepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_routetablepropertiesformat.go new file mode 100644 index 000000000000..ade39099b0c9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_routetablepropertiesformat.go @@ -0,0 +1,8 @@ +package logicalnetworks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RouteTablePropertiesFormat struct { + Routes *[]Route `json:"routes,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_subnet.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_subnet.go new file mode 100644 index 000000000000..ba19efff89af --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_subnet.go @@ -0,0 +1,9 @@ +package logicalnetworks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Subnet struct { + Name *string `json:"name,omitempty"` + Properties *SubnetPropertiesFormat `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_subnetpropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_subnetpropertiesformat.go new file mode 100644 index 000000000000..cc1154dcad4a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_subnetpropertiesformat.go @@ -0,0 +1,14 @@ +package logicalnetworks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SubnetPropertiesFormat struct { + AddressPrefix *string `json:"addressPrefix,omitempty"` + AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` + IPAllocationMethod *IPAllocationMethodEnum `json:"ipAllocationMethod,omitempty"` + IPConfigurationReferences *[]SubnetPropertiesFormatIPConfigurationReferencesInlined `json:"ipConfigurationReferences,omitempty"` + IPPools *[]IPPool `json:"ipPools,omitempty"` + RouteTable *RouteTable `json:"routeTable,omitempty"` + Vlan *int64 `json:"vlan,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_subnetpropertiesformatipconfigurationreferencesinlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_subnetpropertiesformatipconfigurationreferencesinlined.go new file mode 100644 index 000000000000..538aac7d7d89 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/model_subnetpropertiesformatipconfigurationreferencesinlined.go @@ -0,0 +1,8 @@ +package logicalnetworks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SubnetPropertiesFormatIPConfigurationReferencesInlined struct { + ID *string `json:"ID,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/predicates.go new file mode 100644 index 000000000000..afe2fed4d991 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/predicates.go @@ -0,0 +1,32 @@ +package logicalnetworks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LogicalNetworksOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p LogicalNetworksOperationPredicate) Matches(input LogicalNetworks) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/version.go new file mode 100644 index 000000000000..1c08c37e8b69 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks/version.go @@ -0,0 +1,12 @@ +package logicalnetworks + +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-01-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/logicalnetworks/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/README.md new file mode 100644 index 000000000000..aae54a9a6576 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/README.md @@ -0,0 +1,117 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages` Documentation + +The `marketplacegalleryimages` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). + +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/azurestackhci/2024-01-01/marketplacegalleryimages" +``` + + +### Client Initialization + +```go +client := marketplacegalleryimages.NewMarketplaceGalleryImagesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `MarketplaceGalleryImagesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := marketplacegalleryimages.NewMarketplaceGalleryImageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "marketplaceGalleryImageValue") + +payload := marketplacegalleryimages.MarketplaceGalleryImages{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `MarketplaceGalleryImagesClient.Delete` + +```go +ctx := context.TODO() +id := marketplacegalleryimages.NewMarketplaceGalleryImageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "marketplaceGalleryImageValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `MarketplaceGalleryImagesClient.Get` + +```go +ctx := context.TODO() +id := marketplacegalleryimages.NewMarketplaceGalleryImageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "marketplaceGalleryImageValue") + +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: `MarketplaceGalleryImagesClient.List` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `MarketplaceGalleryImagesClient.ListAll` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination +items, err := client.ListAllComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `MarketplaceGalleryImagesClient.Update` + +```go +ctx := context.TODO() +id := marketplacegalleryimages.NewMarketplaceGalleryImageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "marketplaceGalleryImageValue") + +payload := marketplacegalleryimages.MarketplaceGalleryImagesUpdateRequest{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/client.go new file mode 100644 index 000000000000..d999cf677f8a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/client.go @@ -0,0 +1,26 @@ +package marketplacegalleryimages + +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 MarketplaceGalleryImagesClient struct { + Client *resourcemanager.Client +} + +func NewMarketplaceGalleryImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*MarketplaceGalleryImagesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "marketplacegalleryimages", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating MarketplaceGalleryImagesClient: %+v", err) + } + + return &MarketplaceGalleryImagesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/constants.go new file mode 100644 index 000000000000..d93c2349a0c0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/constants.go @@ -0,0 +1,268 @@ +package marketplacegalleryimages + +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 CloudInitDataSource string + +const ( + CloudInitDataSourceAzure CloudInitDataSource = "Azure" + CloudInitDataSourceNoCloud CloudInitDataSource = "NoCloud" +) + +func PossibleValuesForCloudInitDataSource() []string { + return []string{ + string(CloudInitDataSourceAzure), + string(CloudInitDataSourceNoCloud), + } +} + +func (s *CloudInitDataSource) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCloudInitDataSource(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCloudInitDataSource(input string) (*CloudInitDataSource, error) { + vals := map[string]CloudInitDataSource{ + "azure": CloudInitDataSourceAzure, + "nocloud": CloudInitDataSourceNoCloud, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CloudInitDataSource(input) + return &out, nil +} + +type ExtendedLocationTypes string + +const ( + ExtendedLocationTypesCustomLocation ExtendedLocationTypes = "CustomLocation" +) + +func PossibleValuesForExtendedLocationTypes() []string { + return []string{ + string(ExtendedLocationTypesCustomLocation), + } +} + +func (s *ExtendedLocationTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExtendedLocationTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExtendedLocationTypes(input string) (*ExtendedLocationTypes, error) { + vals := map[string]ExtendedLocationTypes{ + "customlocation": ExtendedLocationTypesCustomLocation, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExtendedLocationTypes(input) + return &out, nil +} + +type HyperVGeneration string + +const ( + HyperVGenerationVOne HyperVGeneration = "V1" + HyperVGenerationVTwo HyperVGeneration = "V2" +) + +func PossibleValuesForHyperVGeneration() []string { + return []string{ + string(HyperVGenerationVOne), + string(HyperVGenerationVTwo), + } +} + +func (s *HyperVGeneration) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHyperVGeneration(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHyperVGeneration(input string) (*HyperVGeneration, error) { + vals := map[string]HyperVGeneration{ + "v1": HyperVGenerationVOne, + "v2": HyperVGenerationVTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HyperVGeneration(input) + return &out, nil +} + +type OperatingSystemTypes string + +const ( + OperatingSystemTypesLinux OperatingSystemTypes = "Linux" + OperatingSystemTypesWindows OperatingSystemTypes = "Windows" +) + +func PossibleValuesForOperatingSystemTypes() []string { + return []string{ + string(OperatingSystemTypesLinux), + string(OperatingSystemTypesWindows), + } +} + +func (s *OperatingSystemTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOperatingSystemTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOperatingSystemTypes(input string) (*OperatingSystemTypes, error) { + vals := map[string]OperatingSystemTypes{ + "linux": OperatingSystemTypesLinux, + "windows": OperatingSystemTypesWindows, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OperatingSystemTypes(input) + return &out, nil +} + +type ProvisioningStateEnum string + +const ( + ProvisioningStateEnumAccepted ProvisioningStateEnum = "Accepted" + ProvisioningStateEnumCanceled ProvisioningStateEnum = "Canceled" + ProvisioningStateEnumDeleting ProvisioningStateEnum = "Deleting" + ProvisioningStateEnumFailed ProvisioningStateEnum = "Failed" + ProvisioningStateEnumInProgress ProvisioningStateEnum = "InProgress" + ProvisioningStateEnumSucceeded ProvisioningStateEnum = "Succeeded" +) + +func PossibleValuesForProvisioningStateEnum() []string { + return []string{ + string(ProvisioningStateEnumAccepted), + string(ProvisioningStateEnumCanceled), + string(ProvisioningStateEnumDeleting), + string(ProvisioningStateEnumFailed), + string(ProvisioningStateEnumInProgress), + string(ProvisioningStateEnumSucceeded), + } +} + +func (s *ProvisioningStateEnum) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningStateEnum(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningStateEnum(input string) (*ProvisioningStateEnum, error) { + vals := map[string]ProvisioningStateEnum{ + "accepted": ProvisioningStateEnumAccepted, + "canceled": ProvisioningStateEnumCanceled, + "deleting": ProvisioningStateEnumDeleting, + "failed": ProvisioningStateEnumFailed, + "inprogress": ProvisioningStateEnumInProgress, + "succeeded": ProvisioningStateEnumSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningStateEnum(input) + return &out, nil +} + +type Status string + +const ( + StatusFailed Status = "Failed" + StatusInProgress Status = "InProgress" + StatusSucceeded Status = "Succeeded" +) + +func PossibleValuesForStatus() []string { + return []string{ + string(StatusFailed), + string(StatusInProgress), + string(StatusSucceeded), + } +} + +func (s *Status) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStatus(input string) (*Status, error) { + vals := map[string]Status{ + "failed": StatusFailed, + "inprogress": StatusInProgress, + "succeeded": StatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Status(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/id_marketplacegalleryimage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/id_marketplacegalleryimage.go new file mode 100644 index 000000000000..bd8def2021d6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/id_marketplacegalleryimage.go @@ -0,0 +1,125 @@ +package marketplacegalleryimages + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &MarketplaceGalleryImageId{} + +// MarketplaceGalleryImageId is a struct representing the Resource ID for a Marketplace Gallery Image +type MarketplaceGalleryImageId struct { + SubscriptionId string + ResourceGroupName string + MarketplaceGalleryImageName string +} + +// NewMarketplaceGalleryImageID returns a new MarketplaceGalleryImageId struct +func NewMarketplaceGalleryImageID(subscriptionId string, resourceGroupName string, marketplaceGalleryImageName string) MarketplaceGalleryImageId { + return MarketplaceGalleryImageId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MarketplaceGalleryImageName: marketplaceGalleryImageName, + } +} + +// ParseMarketplaceGalleryImageID parses 'input' into a MarketplaceGalleryImageId +func ParseMarketplaceGalleryImageID(input string) (*MarketplaceGalleryImageId, error) { + parser := resourceids.NewParserFromResourceIdType(&MarketplaceGalleryImageId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MarketplaceGalleryImageId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseMarketplaceGalleryImageIDInsensitively parses 'input' case-insensitively into a MarketplaceGalleryImageId +// note: this method should only be used for API response data and not user input +func ParseMarketplaceGalleryImageIDInsensitively(input string) (*MarketplaceGalleryImageId, error) { + parser := resourceids.NewParserFromResourceIdType(&MarketplaceGalleryImageId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MarketplaceGalleryImageId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MarketplaceGalleryImageId) FromParseResult(input 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.MarketplaceGalleryImageName, ok = input.Parsed["marketplaceGalleryImageName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "marketplaceGalleryImageName", input) + } + + return nil +} + +// ValidateMarketplaceGalleryImageID checks that 'input' can be parsed as a Marketplace Gallery Image ID +func ValidateMarketplaceGalleryImageID(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 := ParseMarketplaceGalleryImageID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Marketplace Gallery Image ID +func (id MarketplaceGalleryImageId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MarketplaceGalleryImageName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Marketplace Gallery Image ID +func (id MarketplaceGalleryImageId) 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("staticMicrosoftAzureStackHCI", "Microsoft.AzureStackHCI", "Microsoft.AzureStackHCI"), + resourceids.StaticSegment("staticMarketplaceGalleryImages", "marketplaceGalleryImages", "marketplaceGalleryImages"), + resourceids.UserSpecifiedSegment("marketplaceGalleryImageName", "marketplaceGalleryImageValue"), + } +} + +// String returns a human-readable description of this Marketplace Gallery Image ID +func (id MarketplaceGalleryImageId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Marketplace Gallery Image Name: %q", id.MarketplaceGalleryImageName), + } + return fmt.Sprintf("Marketplace Gallery Image (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_createorupdate.go new file mode 100644 index 000000000000..0e5370f70542 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_createorupdate.go @@ -0,0 +1,75 @@ +package marketplacegalleryimages + +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 *MarketplaceGalleryImages +} + +// CreateOrUpdate ... +func (c MarketplaceGalleryImagesClient) CreateOrUpdate(ctx context.Context, id MarketplaceGalleryImageId, input MarketplaceGalleryImages) (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 MarketplaceGalleryImagesClient) CreateOrUpdateThenPoll(ctx context.Context, id MarketplaceGalleryImageId, input MarketplaceGalleryImages) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_delete.go new file mode 100644 index 000000000000..c9ef757cc54e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_delete.go @@ -0,0 +1,70 @@ +package marketplacegalleryimages + +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 MarketplaceGalleryImagesClient) Delete(ctx context.Context, id MarketplaceGalleryImageId) (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 MarketplaceGalleryImagesClient) DeleteThenPoll(ctx context.Context, id MarketplaceGalleryImageId) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_get.go new file mode 100644 index 000000000000..9398502879e1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_get.go @@ -0,0 +1,54 @@ +package marketplacegalleryimages + +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 *MarketplaceGalleryImages +} + +// Get ... +func (c MarketplaceGalleryImagesClient) Get(ctx context.Context, id MarketplaceGalleryImageId) (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 MarketplaceGalleryImages + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_list.go new file mode 100644 index 000000000000..e7fd62764d16 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_list.go @@ -0,0 +1,92 @@ +package marketplacegalleryimages + +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 ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]MarketplaceGalleryImages +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []MarketplaceGalleryImages +} + +// List ... +func (c MarketplaceGalleryImagesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages", 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 *[]MarketplaceGalleryImages `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c MarketplaceGalleryImagesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, MarketplaceGalleryImagesOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c MarketplaceGalleryImagesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate MarketplaceGalleryImagesOperationPredicate) (result ListCompleteResult, err error) { + items := make([]MarketplaceGalleryImages, 0) + + resp, err := c.List(ctx, id) + if err != nil { + 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 = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_listall.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_listall.go new file mode 100644 index 000000000000..fa398ccfe089 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_listall.go @@ -0,0 +1,92 @@ +package marketplacegalleryimages + +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 ListAllOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]MarketplaceGalleryImages +} + +type ListAllCompleteResult struct { + LatestHttpResponse *http.Response + Items []MarketplaceGalleryImages +} + +// ListAll ... +func (c MarketplaceGalleryImagesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages", 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 *[]MarketplaceGalleryImages `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListAllComplete retrieves all the results into a single object +func (c MarketplaceGalleryImagesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { + return c.ListAllCompleteMatchingPredicate(ctx, id, MarketplaceGalleryImagesOperationPredicate{}) +} + +// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c MarketplaceGalleryImagesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate MarketplaceGalleryImagesOperationPredicate) (result ListAllCompleteResult, err error) { + items := make([]MarketplaceGalleryImages, 0) + + resp, err := c.ListAll(ctx, id) + if err != nil { + 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 = ListAllCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_update.go new file mode 100644 index 000000000000..c5bb089a731d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_update.go @@ -0,0 +1,75 @@ +package marketplacegalleryimages + +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 UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *MarketplaceGalleryImages +} + +// Update ... +func (c MarketplaceGalleryImagesClient) Update(ctx context.Context, id MarketplaceGalleryImageId, input MarketplaceGalleryImagesUpdateRequest) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c MarketplaceGalleryImagesClient) UpdateThenPoll(ctx context.Context, id MarketplaceGalleryImageId, input MarketplaceGalleryImagesUpdateRequest) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_extendedlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_extendedlocation.go new file mode 100644 index 000000000000..53cadae95d58 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_extendedlocation.go @@ -0,0 +1,9 @@ +package marketplacegalleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedLocation struct { + Name *string `json:"name,omitempty"` + Type *ExtendedLocationTypes `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_gallerydiskimage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_gallerydiskimage.go new file mode 100644 index 000000000000..317f9e6cfb10 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_gallerydiskimage.go @@ -0,0 +1,8 @@ +package marketplacegalleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GalleryDiskImage struct { + SizeInMB *int64 `json:"sizeInMB,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_galleryimageidentifier.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_galleryimageidentifier.go new file mode 100644 index 000000000000..0f3541e53382 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_galleryimageidentifier.go @@ -0,0 +1,10 @@ +package marketplacegalleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GalleryImageIdentifier struct { + Offer string `json:"offer"` + Publisher string `json:"publisher"` + Sku string `json:"sku"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_galleryimageversion.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_galleryimageversion.go new file mode 100644 index 000000000000..ac6e38f6b41d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_galleryimageversion.go @@ -0,0 +1,9 @@ +package marketplacegalleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GalleryImageVersion struct { + Name *string `json:"name,omitempty"` + Properties *GalleryImageVersionProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_galleryimageversionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_galleryimageversionproperties.go new file mode 100644 index 000000000000..c9ed2934420b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_galleryimageversionproperties.go @@ -0,0 +1,8 @@ +package marketplacegalleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GalleryImageVersionProperties struct { + StorageProfile GalleryImageVersionStorageProfile `json:"storageProfile"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_galleryimageversionstorageprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_galleryimageversionstorageprofile.go new file mode 100644 index 000000000000..74c0cb1cf131 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_galleryimageversionstorageprofile.go @@ -0,0 +1,8 @@ +package marketplacegalleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GalleryImageVersionStorageProfile struct { + OsDiskImage *GalleryDiskImage `json:"osDiskImage,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimageproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimageproperties.go new file mode 100644 index 000000000000..97b773ae78f4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimageproperties.go @@ -0,0 +1,15 @@ +package marketplacegalleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MarketplaceGalleryImageProperties struct { + CloudInitDataSource *CloudInitDataSource `json:"cloudInitDataSource,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + HyperVGeneration *HyperVGeneration `json:"hyperVGeneration,omitempty"` + Identifier *GalleryImageIdentifier `json:"identifier,omitempty"` + OsType OperatingSystemTypes `json:"osType"` + ProvisioningState *ProvisioningStateEnum `json:"provisioningState,omitempty"` + Status *MarketplaceGalleryImageStatus `json:"status,omitempty"` + Version *GalleryImageVersion `json:"version,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimages.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimages.go new file mode 100644 index 000000000000..cc450d9462f2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimages.go @@ -0,0 +1,19 @@ +package marketplacegalleryimages + +import ( + "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 MarketplaceGalleryImages struct { + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *MarketplaceGalleryImageProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimagestatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimagestatus.go new file mode 100644 index 000000000000..527539725df8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimagestatus.go @@ -0,0 +1,12 @@ +package marketplacegalleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MarketplaceGalleryImageStatus struct { + DownloadStatus *MarketplaceGalleryImageStatusDownloadStatus `json:"downloadStatus,omitempty"` + ErrorCode *string `json:"errorCode,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + ProgressPercentage *int64 `json:"progressPercentage,omitempty"` + ProvisioningStatus *MarketplaceGalleryImageStatusProvisioningStatus `json:"provisioningStatus,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimagestatusdownloadstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimagestatusdownloadstatus.go new file mode 100644 index 000000000000..85c577960504 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimagestatusdownloadstatus.go @@ -0,0 +1,8 @@ +package marketplacegalleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MarketplaceGalleryImageStatusDownloadStatus struct { + DownloadSizeInMB *int64 `json:"downloadSizeInMB,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimagestatusprovisioningstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimagestatusprovisioningstatus.go new file mode 100644 index 000000000000..9ddfb9caf2c3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimagestatusprovisioningstatus.go @@ -0,0 +1,9 @@ +package marketplacegalleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MarketplaceGalleryImageStatusProvisioningStatus struct { + OperationId *string `json:"operationId,omitempty"` + Status *Status `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimagesupdaterequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimagesupdaterequest.go new file mode 100644 index 000000000000..6639391a1a67 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/model_marketplacegalleryimagesupdaterequest.go @@ -0,0 +1,8 @@ +package marketplacegalleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MarketplaceGalleryImagesUpdateRequest struct { + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/predicates.go new file mode 100644 index 000000000000..5d612f67073d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/predicates.go @@ -0,0 +1,32 @@ +package marketplacegalleryimages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MarketplaceGalleryImagesOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p MarketplaceGalleryImagesOperationPredicate) Matches(input MarketplaceGalleryImages) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/version.go new file mode 100644 index 000000000000..fe2ba6955581 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/version.go @@ -0,0 +1,12 @@ +package marketplacegalleryimages + +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-01-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/marketplacegalleryimages/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/README.md new file mode 100644 index 000000000000..7990f55f84f1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/README.md @@ -0,0 +1,117 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces` Documentation + +The `networkinterfaces` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). + +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/azurestackhci/2024-01-01/networkinterfaces" +``` + + +### Client Initialization + +```go +client := networkinterfaces.NewNetworkInterfacesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `NetworkInterfacesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") + +payload := networkinterfaces.NetworkInterfaces{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `NetworkInterfacesClient.Delete` + +```go +ctx := context.TODO() +id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `NetworkInterfacesClient.Get` + +```go +ctx := context.TODO() +id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") + +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: `NetworkInterfacesClient.List` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `NetworkInterfacesClient.ListAll` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination +items, err := client.ListAllComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `NetworkInterfacesClient.Update` + +```go +ctx := context.TODO() +id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") + +payload := networkinterfaces.NetworkInterfacesUpdateRequest{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/client.go new file mode 100644 index 000000000000..cd098aeccdf9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/client.go @@ -0,0 +1,26 @@ +package networkinterfaces + +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 NetworkInterfacesClient struct { + Client *resourcemanager.Client +} + +func NewNetworkInterfacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkInterfacesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkinterfaces", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating NetworkInterfacesClient: %+v", err) + } + + return &NetworkInterfacesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/constants.go new file mode 100644 index 000000000000..ade27d81ffc5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/constants.go @@ -0,0 +1,145 @@ +package networkinterfaces + +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 ExtendedLocationTypes string + +const ( + ExtendedLocationTypesCustomLocation ExtendedLocationTypes = "CustomLocation" +) + +func PossibleValuesForExtendedLocationTypes() []string { + return []string{ + string(ExtendedLocationTypesCustomLocation), + } +} + +func (s *ExtendedLocationTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExtendedLocationTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExtendedLocationTypes(input string) (*ExtendedLocationTypes, error) { + vals := map[string]ExtendedLocationTypes{ + "customlocation": ExtendedLocationTypesCustomLocation, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExtendedLocationTypes(input) + return &out, nil +} + +type ProvisioningStateEnum string + +const ( + ProvisioningStateEnumAccepted ProvisioningStateEnum = "Accepted" + ProvisioningStateEnumCanceled ProvisioningStateEnum = "Canceled" + ProvisioningStateEnumDeleting ProvisioningStateEnum = "Deleting" + ProvisioningStateEnumFailed ProvisioningStateEnum = "Failed" + ProvisioningStateEnumInProgress ProvisioningStateEnum = "InProgress" + ProvisioningStateEnumSucceeded ProvisioningStateEnum = "Succeeded" +) + +func PossibleValuesForProvisioningStateEnum() []string { + return []string{ + string(ProvisioningStateEnumAccepted), + string(ProvisioningStateEnumCanceled), + string(ProvisioningStateEnumDeleting), + string(ProvisioningStateEnumFailed), + string(ProvisioningStateEnumInProgress), + string(ProvisioningStateEnumSucceeded), + } +} + +func (s *ProvisioningStateEnum) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningStateEnum(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningStateEnum(input string) (*ProvisioningStateEnum, error) { + vals := map[string]ProvisioningStateEnum{ + "accepted": ProvisioningStateEnumAccepted, + "canceled": ProvisioningStateEnumCanceled, + "deleting": ProvisioningStateEnumDeleting, + "failed": ProvisioningStateEnumFailed, + "inprogress": ProvisioningStateEnumInProgress, + "succeeded": ProvisioningStateEnumSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningStateEnum(input) + return &out, nil +} + +type Status string + +const ( + StatusFailed Status = "Failed" + StatusInProgress Status = "InProgress" + StatusSucceeded Status = "Succeeded" +) + +func PossibleValuesForStatus() []string { + return []string{ + string(StatusFailed), + string(StatusInProgress), + string(StatusSucceeded), + } +} + +func (s *Status) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStatus(input string) (*Status, error) { + vals := map[string]Status{ + "failed": StatusFailed, + "inprogress": StatusInProgress, + "succeeded": StatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Status(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/id_networkinterface.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/id_networkinterface.go new file mode 100644 index 000000000000..16a79019e005 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/id_networkinterface.go @@ -0,0 +1,125 @@ +package networkinterfaces + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &NetworkInterfaceId{} + +// NetworkInterfaceId is a struct representing the Resource ID for a Network Interface +type NetworkInterfaceId struct { + SubscriptionId string + ResourceGroupName string + NetworkInterfaceName string +} + +// NewNetworkInterfaceID returns a new NetworkInterfaceId struct +func NewNetworkInterfaceID(subscriptionId string, resourceGroupName string, networkInterfaceName string) NetworkInterfaceId { + return NetworkInterfaceId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + NetworkInterfaceName: networkInterfaceName, + } +} + +// ParseNetworkInterfaceID parses 'input' into a NetworkInterfaceId +func ParseNetworkInterfaceID(input string) (*NetworkInterfaceId, error) { + parser := resourceids.NewParserFromResourceIdType(&NetworkInterfaceId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := NetworkInterfaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseNetworkInterfaceIDInsensitively parses 'input' case-insensitively into a NetworkInterfaceId +// note: this method should only be used for API response data and not user input +func ParseNetworkInterfaceIDInsensitively(input string) (*NetworkInterfaceId, error) { + parser := resourceids.NewParserFromResourceIdType(&NetworkInterfaceId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := NetworkInterfaceId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *NetworkInterfaceId) FromParseResult(input 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.NetworkInterfaceName, ok = input.Parsed["networkInterfaceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "networkInterfaceName", input) + } + + return nil +} + +// ValidateNetworkInterfaceID checks that 'input' can be parsed as a Network Interface ID +func ValidateNetworkInterfaceID(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 := ParseNetworkInterfaceID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Network Interface ID +func (id NetworkInterfaceId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.AzureStackHCI/networkInterfaces/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkInterfaceName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Network Interface ID +func (id NetworkInterfaceId) 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("staticMicrosoftAzureStackHCI", "Microsoft.AzureStackHCI", "Microsoft.AzureStackHCI"), + resourceids.StaticSegment("staticNetworkInterfaces", "networkInterfaces", "networkInterfaces"), + resourceids.UserSpecifiedSegment("networkInterfaceName", "networkInterfaceValue"), + } +} + +// String returns a human-readable description of this Network Interface ID +func (id NetworkInterfaceId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Network Interface Name: %q", id.NetworkInterfaceName), + } + return fmt.Sprintf("Network Interface (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_createorupdate.go new file mode 100644 index 000000000000..7291691166cb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_createorupdate.go @@ -0,0 +1,75 @@ +package networkinterfaces + +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 *NetworkInterfaces +} + +// CreateOrUpdate ... +func (c NetworkInterfacesClient) CreateOrUpdate(ctx context.Context, id NetworkInterfaceId, input NetworkInterfaces) (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 NetworkInterfacesClient) CreateOrUpdateThenPoll(ctx context.Context, id NetworkInterfaceId, input NetworkInterfaces) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_delete.go new file mode 100644 index 000000000000..7b815712bf2a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_delete.go @@ -0,0 +1,70 @@ +package networkinterfaces + +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 NetworkInterfacesClient) Delete(ctx context.Context, id NetworkInterfaceId) (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 NetworkInterfacesClient) DeleteThenPoll(ctx context.Context, id NetworkInterfaceId) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_get.go new file mode 100644 index 000000000000..33da90ee600e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_get.go @@ -0,0 +1,54 @@ +package networkinterfaces + +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 *NetworkInterfaces +} + +// Get ... +func (c NetworkInterfacesClient) Get(ctx context.Context, id NetworkInterfaceId) (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 NetworkInterfaces + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_list.go new file mode 100644 index 000000000000..f9bc06e56316 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_list.go @@ -0,0 +1,92 @@ +package networkinterfaces + +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 ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]NetworkInterfaces +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []NetworkInterfaces +} + +// List ... +func (c NetworkInterfacesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/networkInterfaces", 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 *[]NetworkInterfaces `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c NetworkInterfacesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, NetworkInterfacesOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c NetworkInterfacesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate NetworkInterfacesOperationPredicate) (result ListCompleteResult, err error) { + items := make([]NetworkInterfaces, 0) + + resp, err := c.List(ctx, id) + if err != nil { + 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 = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_listall.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_listall.go new file mode 100644 index 000000000000..26c2889a8f24 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_listall.go @@ -0,0 +1,92 @@ +package networkinterfaces + +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 ListAllOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]NetworkInterfaces +} + +type ListAllCompleteResult struct { + LatestHttpResponse *http.Response + Items []NetworkInterfaces +} + +// ListAll ... +func (c NetworkInterfacesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/networkInterfaces", 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 *[]NetworkInterfaces `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListAllComplete retrieves all the results into a single object +func (c NetworkInterfacesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { + return c.ListAllCompleteMatchingPredicate(ctx, id, NetworkInterfacesOperationPredicate{}) +} + +// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c NetworkInterfacesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NetworkInterfacesOperationPredicate) (result ListAllCompleteResult, err error) { + items := make([]NetworkInterfaces, 0) + + resp, err := c.ListAll(ctx, id) + if err != nil { + 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 = ListAllCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_update.go new file mode 100644 index 000000000000..7c6f6d80cdd9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_update.go @@ -0,0 +1,75 @@ +package networkinterfaces + +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 UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *NetworkInterfaces +} + +// Update ... +func (c NetworkInterfacesClient) Update(ctx context.Context, id NetworkInterfaceId, input NetworkInterfacesUpdateRequest) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c NetworkInterfacesClient) UpdateThenPoll(ctx context.Context, id NetworkInterfaceId, input NetworkInterfacesUpdateRequest) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_extendedlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_extendedlocation.go new file mode 100644 index 000000000000..b2fc7d38b2d6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_extendedlocation.go @@ -0,0 +1,9 @@ +package networkinterfaces + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedLocation struct { + Name *string `json:"name,omitempty"` + Type *ExtendedLocationTypes `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_interfacednssettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_interfacednssettings.go new file mode 100644 index 000000000000..cb2f42c09670 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_interfacednssettings.go @@ -0,0 +1,8 @@ +package networkinterfaces + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InterfaceDNSSettings struct { + DnsServers *[]string `json:"dnsServers,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_ipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_ipconfiguration.go new file mode 100644 index 000000000000..4dba57abec27 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_ipconfiguration.go @@ -0,0 +1,9 @@ +package networkinterfaces + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPConfiguration struct { + Name *string `json:"name,omitempty"` + Properties *IPConfigurationProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_ipconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_ipconfigurationproperties.go new file mode 100644 index 000000000000..9a6acce34823 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_ipconfigurationproperties.go @@ -0,0 +1,11 @@ +package networkinterfaces + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPConfigurationProperties struct { + Gateway *string `json:"gateway,omitempty"` + PrefixLength *string `json:"prefixLength,omitempty"` + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + Subnet *IPConfigurationPropertiesSubnet `json:"subnet,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_ipconfigurationpropertiessubnet.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_ipconfigurationpropertiessubnet.go new file mode 100644 index 000000000000..b87520c7872a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_ipconfigurationpropertiessubnet.go @@ -0,0 +1,8 @@ +package networkinterfaces + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPConfigurationPropertiesSubnet struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_networkinterfaceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_networkinterfaceproperties.go new file mode 100644 index 000000000000..c39cb163aad1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_networkinterfaceproperties.go @@ -0,0 +1,12 @@ +package networkinterfaces + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkInterfaceProperties struct { + DnsSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"` + IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` + MacAddress *string `json:"macAddress,omitempty"` + ProvisioningState *ProvisioningStateEnum `json:"provisioningState,omitempty"` + Status *NetworkInterfaceStatus `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_networkinterfaces.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_networkinterfaces.go new file mode 100644 index 000000000000..5c01ce90c80d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_networkinterfaces.go @@ -0,0 +1,19 @@ +package networkinterfaces + +import ( + "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 NetworkInterfaces struct { + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *NetworkInterfaceProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_networkinterfacestatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_networkinterfacestatus.go new file mode 100644 index 000000000000..eace96b96163 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_networkinterfacestatus.go @@ -0,0 +1,10 @@ +package networkinterfaces + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkInterfaceStatus struct { + ErrorCode *string `json:"errorCode,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + ProvisioningStatus *NetworkInterfaceStatusProvisioningStatus `json:"provisioningStatus,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_networkinterfacestatusprovisioningstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_networkinterfacestatusprovisioningstatus.go new file mode 100644 index 000000000000..37d22bd02a56 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_networkinterfacestatusprovisioningstatus.go @@ -0,0 +1,9 @@ +package networkinterfaces + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkInterfaceStatusProvisioningStatus struct { + OperationId *string `json:"operationId,omitempty"` + Status *Status `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_networkinterfacesupdaterequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_networkinterfacesupdaterequest.go new file mode 100644 index 000000000000..f6cb091d079c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/model_networkinterfacesupdaterequest.go @@ -0,0 +1,8 @@ +package networkinterfaces + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkInterfacesUpdateRequest struct { + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/predicates.go new file mode 100644 index 000000000000..9e8cac5d9c5d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/predicates.go @@ -0,0 +1,32 @@ +package networkinterfaces + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkInterfacesOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p NetworkInterfacesOperationPredicate) Matches(input NetworkInterfaces) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/version.go new file mode 100644 index 000000000000..82d52844172f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces/version.go @@ -0,0 +1,12 @@ +package networkinterfaces + +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-01-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/networkinterfaces/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/README.md similarity index 94% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/README.md index d6c2e4e3f6f5..dbdc1822f8b4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers` Documentation -The `offers` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2023-08-01`). +The `offers` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). 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-sdk/resource-manager/azurestackhci/2023-08-01/offers" +import "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/client.go 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/2024-01-01/offers/id_cluster.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/id_cluster.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/id_cluster.go 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/2024-01-01/offers/id_offer.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/id_offer.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/id_offer.go 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/2024-01-01/offers/id_publisher.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/id_publisher.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/id_publisher.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/method_listbycluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/method_listbycluster.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/method_listbycluster.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/method_listbycluster.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/method_listbypublisher.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/method_listbypublisher.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/method_listbypublisher.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/method_listbypublisher.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/model_offer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/model_offer.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/model_offer.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/model_offer.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/model_offerproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/model_offerproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/model_offerproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/model_offerproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/model_skumappings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/model_skumappings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/model_skumappings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/model_skumappings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/version.go index 9e668719bf25..15e8641cec4e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers/version.go @@ -5,7 +5,7 @@ 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 = "2023-08-01" +const defaultApiVersion = "2024-01-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/offers/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/README.md similarity index 90% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/README.md index 3173db44d96d..ef69004503a1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers` Documentation -The `publishers` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2023-08-01`). +The `publishers` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). 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-sdk/resource-manager/azurestackhci/2023-08-01/publishers" +import "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/client.go 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/2024-01-01/publishers/id_cluster.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/id_cluster.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/id_cluster.go 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/2024-01-01/publishers/id_publisher.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/id_publisher.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/id_publisher.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/method_listbycluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/method_listbycluster.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/method_listbycluster.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/method_listbycluster.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/model_publisher.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/model_publisher.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/model_publisher.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/model_publisher.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/model_publisherproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/model_publisherproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/model_publisherproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/model_publisherproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/version.go index 29aedb3666cc..5283ce6cbca9 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers/version.go @@ -5,7 +5,7 @@ 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 = "2023-08-01" +const defaultApiVersion = "2024-01-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/publishers/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/README.md new file mode 100644 index 000000000000..0b4c4e241c2e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings` Documentation + +The `securitysettings` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). + +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-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings" +``` + + +### Client Initialization + +```go +client := securitysettings.NewSecuritySettingsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `SecuritySettingsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := securitysettings.NewSecuritySettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "securitySettingValue") + +payload := securitysettings.SecuritySetting{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `SecuritySettingsClient.Delete` + +```go +ctx := context.TODO() +id := securitysettings.NewSecuritySettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "securitySettingValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `SecuritySettingsClient.Get` + +```go +ctx := context.TODO() +id := securitysettings.NewSecuritySettingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "securitySettingValue") + +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: `SecuritySettingsClient.ListByClusters` + +```go +ctx := context.TODO() +id := securitysettings.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue") + +// alternatively `client.ListByClusters(ctx, id)` can be used to do batched pagination +items, err := client.ListByClustersComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/client.go new file mode 100644 index 000000000000..eaa888ea0b65 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/client.go @@ -0,0 +1,26 @@ +package securitysettings + +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 SecuritySettingsClient struct { + Client *resourcemanager.Client +} + +func NewSecuritySettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecuritySettingsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securitysettings", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating SecuritySettingsClient: %+v", err) + } + + return &SecuritySettingsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/constants.go new file mode 100644 index 000000000000..06c8bafb092b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/constants.go @@ -0,0 +1,151 @@ +package securitysettings + +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 ComplianceAssignmentType string + +const ( + ComplianceAssignmentTypeApplyAndAutoCorrect ComplianceAssignmentType = "ApplyAndAutoCorrect" + ComplianceAssignmentTypeAudit ComplianceAssignmentType = "Audit" +) + +func PossibleValuesForComplianceAssignmentType() []string { + return []string{ + string(ComplianceAssignmentTypeApplyAndAutoCorrect), + string(ComplianceAssignmentTypeAudit), + } +} + +func (s *ComplianceAssignmentType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseComplianceAssignmentType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseComplianceAssignmentType(input string) (*ComplianceAssignmentType, error) { + vals := map[string]ComplianceAssignmentType{ + "applyandautocorrect": ComplianceAssignmentTypeApplyAndAutoCorrect, + "audit": ComplianceAssignmentTypeAudit, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ComplianceAssignmentType(input) + return &out, nil +} + +type ComplianceStatus string + +const ( + ComplianceStatusCompliant ComplianceStatus = "Compliant" + ComplianceStatusNonCompliant ComplianceStatus = "NonCompliant" + ComplianceStatusPending ComplianceStatus = "Pending" +) + +func PossibleValuesForComplianceStatus() []string { + return []string{ + string(ComplianceStatusCompliant), + string(ComplianceStatusNonCompliant), + string(ComplianceStatusPending), + } +} + +func (s *ComplianceStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseComplianceStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseComplianceStatus(input string) (*ComplianceStatus, error) { + vals := map[string]ComplianceStatus{ + "compliant": ComplianceStatusCompliant, + "noncompliant": ComplianceStatusNonCompliant, + "pending": ComplianceStatusPending, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ComplianceStatus(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateAccepted ProvisioningState = "Accepted" + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateProvisioning ProvisioningState = "Provisioning" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateAccepted), + string(ProvisioningStateCanceled), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateProvisioning), + 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, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "provisioning": ProvisioningStateProvisioning, + "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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/id_cluster.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/id_cluster.go new file mode 100644 index 000000000000..25799bb8595e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/id_cluster.go @@ -0,0 +1,125 @@ +package securitysettings + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &ClusterId{} + +// ClusterId is a struct representing the Resource ID for a Cluster +type ClusterId struct { + SubscriptionId string + ResourceGroupName string + ClusterName string +} + +// NewClusterID returns a new ClusterId struct +func NewClusterID(subscriptionId string, resourceGroupName string, clusterName string) ClusterId { + return ClusterId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ClusterName: clusterName, + } +} + +// ParseClusterID parses 'input' into a ClusterId +func ParseClusterID(input string) (*ClusterId, error) { + parser := resourceids.NewParserFromResourceIdType(&ClusterId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseClusterIDInsensitively parses 'input' case-insensitively into a ClusterId +// note: this method should only be used for API response data and not user input +func ParseClusterIDInsensitively(input string) (*ClusterId, error) { + parser := resourceids.NewParserFromResourceIdType(&ClusterId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ClusterId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ClusterId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) + } + + return nil +} + +// ValidateClusterID checks that 'input' can be parsed as a Cluster ID +func ValidateClusterID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseClusterID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Cluster ID +func (id ClusterId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.AzureStackHCI/clusters/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ClusterName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Cluster ID +func (id ClusterId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftAzureStackHCI", "Microsoft.AzureStackHCI", "Microsoft.AzureStackHCI"), + resourceids.StaticSegment("staticClusters", "clusters", "clusters"), + resourceids.UserSpecifiedSegment("clusterName", "clusterValue"), + } +} + +// String returns a human-readable description of this Cluster ID +func (id ClusterId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Cluster Name: %q", id.ClusterName), + } + return fmt.Sprintf("Cluster (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/id_securitysetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/id_securitysetting.go new file mode 100644 index 000000000000..8663a5c5faad --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/id_securitysetting.go @@ -0,0 +1,134 @@ +package securitysettings + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &SecuritySettingId{} + +// SecuritySettingId is a struct representing the Resource ID for a Security Setting +type SecuritySettingId struct { + SubscriptionId string + ResourceGroupName string + ClusterName string + SecuritySettingName string +} + +// NewSecuritySettingID returns a new SecuritySettingId struct +func NewSecuritySettingID(subscriptionId string, resourceGroupName string, clusterName string, securitySettingName string) SecuritySettingId { + return SecuritySettingId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ClusterName: clusterName, + SecuritySettingName: securitySettingName, + } +} + +// ParseSecuritySettingID parses 'input' into a SecuritySettingId +func ParseSecuritySettingID(input string) (*SecuritySettingId, error) { + parser := resourceids.NewParserFromResourceIdType(&SecuritySettingId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SecuritySettingId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseSecuritySettingIDInsensitively parses 'input' case-insensitively into a SecuritySettingId +// note: this method should only be used for API response data and not user input +func ParseSecuritySettingIDInsensitively(input string) (*SecuritySettingId, error) { + parser := resourceids.NewParserFromResourceIdType(&SecuritySettingId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SecuritySettingId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SecuritySettingId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) + } + + if id.SecuritySettingName, ok = input.Parsed["securitySettingName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "securitySettingName", input) + } + + return nil +} + +// ValidateSecuritySettingID checks that 'input' can be parsed as a Security Setting ID +func ValidateSecuritySettingID(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 := ParseSecuritySettingID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Security Setting ID +func (id SecuritySettingId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.AzureStackHCI/clusters/%s/securitySettings/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ClusterName, id.SecuritySettingName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Security Setting ID +func (id SecuritySettingId) 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("staticMicrosoftAzureStackHCI", "Microsoft.AzureStackHCI", "Microsoft.AzureStackHCI"), + resourceids.StaticSegment("staticClusters", "clusters", "clusters"), + resourceids.UserSpecifiedSegment("clusterName", "clusterValue"), + resourceids.StaticSegment("staticSecuritySettings", "securitySettings", "securitySettings"), + resourceids.UserSpecifiedSegment("securitySettingName", "securitySettingValue"), + } +} + +// String returns a human-readable description of this Security Setting ID +func (id SecuritySettingId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Cluster Name: %q", id.ClusterName), + fmt.Sprintf("Security Setting Name: %q", id.SecuritySettingName), + } + return fmt.Sprintf("Security Setting (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/method_createorupdate.go new file mode 100644 index 000000000000..4048479243c0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/method_createorupdate.go @@ -0,0 +1,75 @@ +package securitysettings + +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 *SecuritySetting +} + +// CreateOrUpdate ... +func (c SecuritySettingsClient) CreateOrUpdate(ctx context.Context, id SecuritySettingId, input SecuritySetting) (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 SecuritySettingsClient) CreateOrUpdateThenPoll(ctx context.Context, id SecuritySettingId, input SecuritySetting) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/method_delete.go new file mode 100644 index 000000000000..521b079db7a4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/method_delete.go @@ -0,0 +1,70 @@ +package securitysettings + +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 SecuritySettingsClient) Delete(ctx context.Context, id SecuritySettingId) (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 SecuritySettingsClient) DeleteThenPoll(ctx context.Context, id SecuritySettingId) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/method_get.go new file mode 100644 index 000000000000..a58fd7930544 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/method_get.go @@ -0,0 +1,54 @@ +package securitysettings + +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 *SecuritySetting +} + +// Get ... +func (c SecuritySettingsClient) Get(ctx context.Context, id SecuritySettingId) (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 SecuritySetting + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/method_listbyclusters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/method_listbyclusters.go new file mode 100644 index 000000000000..e87605bb5cea --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/method_listbyclusters.go @@ -0,0 +1,91 @@ +package securitysettings + +import ( + "context" + "fmt" + "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 ListByClustersOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]SecuritySetting +} + +type ListByClustersCompleteResult struct { + LatestHttpResponse *http.Response + Items []SecuritySetting +} + +// ListByClusters ... +func (c SecuritySettingsClient) ListByClusters(ctx context.Context, id ClusterId) (result ListByClustersOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/securitySettings", 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 *[]SecuritySetting `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByClustersComplete retrieves all the results into a single object +func (c SecuritySettingsClient) ListByClustersComplete(ctx context.Context, id ClusterId) (ListByClustersCompleteResult, error) { + return c.ListByClustersCompleteMatchingPredicate(ctx, id, SecuritySettingOperationPredicate{}) +} + +// ListByClustersCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c SecuritySettingsClient) ListByClustersCompleteMatchingPredicate(ctx context.Context, id ClusterId, predicate SecuritySettingOperationPredicate) (result ListByClustersCompleteResult, err error) { + items := make([]SecuritySetting, 0) + + resp, err := c.ListByClusters(ctx, id) + if err != nil { + 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 = ListByClustersCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/model_securitycompliancestatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/model_securitycompliancestatus.go new file mode 100644 index 000000000000..5338b4845180 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/model_securitycompliancestatus.go @@ -0,0 +1,30 @@ +package securitysettings + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecurityComplianceStatus struct { + DataAtRestEncrypted *ComplianceStatus `json:"dataAtRestEncrypted,omitempty"` + DataInTransitProtected *ComplianceStatus `json:"dataInTransitProtected,omitempty"` + LastUpdated *string `json:"lastUpdated,omitempty"` + SecuredCoreCompliance *ComplianceStatus `json:"securedCoreCompliance,omitempty"` + WdacCompliance *ComplianceStatus `json:"wdacCompliance,omitempty"` +} + +func (o *SecurityComplianceStatus) GetLastUpdatedAsTime() (*time.Time, error) { + if o.LastUpdated == nil { + return nil, nil + } + return dates.ParseAsFormat(o.LastUpdated, "2006-01-02T15:04:05Z07:00") +} + +func (o *SecurityComplianceStatus) SetLastUpdatedAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.LastUpdated = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/model_securityproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/model_securityproperties.go new file mode 100644 index 000000000000..d806d6c85d09 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/model_securityproperties.go @@ -0,0 +1,10 @@ +package securitysettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecurityProperties struct { + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + SecuredCoreComplianceAssignment *ComplianceAssignmentType `json:"securedCoreComplianceAssignment,omitempty"` + SecurityComplianceStatus *SecurityComplianceStatus `json:"securityComplianceStatus,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/model_securitysetting.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/model_securitysetting.go new file mode 100644 index 000000000000..0770c05be989 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/model_securitysetting.go @@ -0,0 +1,16 @@ +package securitysettings + +import ( + "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 SecuritySetting struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *SecurityProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/predicates.go new file mode 100644 index 000000000000..754f3fcfc5b9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/predicates.go @@ -0,0 +1,27 @@ +package securitysettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecuritySettingOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p SecuritySettingOperationPredicate) Matches(input SecuritySetting) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/version.go new file mode 100644 index 000000000000..e98ba0c6deff --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings/version.go @@ -0,0 +1,12 @@ +package securitysettings + +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-01-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/securitysettings/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/README.md similarity index 92% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/README.md index f60c400b5fe6..fb2dd4be3168 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses` Documentation -The `skuses` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2023-08-01`). +The `skuses` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). 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-sdk/resource-manager/azurestackhci/2023-08-01/skuses" +import "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/client.go 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/2024-01-01/skuses/id_offer.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/id_offer.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/id_offer.go 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/2024-01-01/skuses/id_sku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/id_sku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/id_sku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/method_skusget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/method_skusget.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/method_skusget.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/method_skusget.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/method_skuslistbyoffer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/method_skuslistbyoffer.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/method_skuslistbyoffer.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/method_skuslistbyoffer.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/model_sku.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/model_sku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/model_sku.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/model_skumappings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/model_skumappings.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/model_skumappings.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/model_skumappings.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/model_skuproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/model_skuproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/model_skuproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/model_skuproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/version.go index a4a17e5b542a..671aa464d7a4 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses/version.go @@ -5,7 +5,7 @@ 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 = "2023-08-01" +const defaultApiVersion = "2024-01-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/skuses/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/README.md new file mode 100644 index 000000000000..f12b31444129 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/README.md @@ -0,0 +1,117 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers` Documentation + +The `storagecontainers` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). + +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/azurestackhci/2024-01-01/storagecontainers" +``` + + +### Client Initialization + +```go +client := storagecontainers.NewStorageContainersClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `StorageContainersClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := storagecontainers.NewStorageContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageContainerValue") + +payload := storagecontainers.StorageContainers{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `StorageContainersClient.Delete` + +```go +ctx := context.TODO() +id := storagecontainers.NewStorageContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageContainerValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `StorageContainersClient.Get` + +```go +ctx := context.TODO() +id := storagecontainers.NewStorageContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageContainerValue") + +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: `StorageContainersClient.List` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `StorageContainersClient.ListAll` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination +items, err := client.ListAllComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `StorageContainersClient.Update` + +```go +ctx := context.TODO() +id := storagecontainers.NewStorageContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageContainerValue") + +payload := storagecontainers.StorageContainersUpdateRequest{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/client.go new file mode 100644 index 000000000000..db251da0046c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/client.go @@ -0,0 +1,26 @@ +package storagecontainers + +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 StorageContainersClient struct { + Client *resourcemanager.Client +} + +func NewStorageContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageContainersClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storagecontainers", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating StorageContainersClient: %+v", err) + } + + return &StorageContainersClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/constants.go new file mode 100644 index 000000000000..eeeeb0bb7756 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/constants.go @@ -0,0 +1,145 @@ +package storagecontainers + +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 ExtendedLocationTypes string + +const ( + ExtendedLocationTypesCustomLocation ExtendedLocationTypes = "CustomLocation" +) + +func PossibleValuesForExtendedLocationTypes() []string { + return []string{ + string(ExtendedLocationTypesCustomLocation), + } +} + +func (s *ExtendedLocationTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExtendedLocationTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExtendedLocationTypes(input string) (*ExtendedLocationTypes, error) { + vals := map[string]ExtendedLocationTypes{ + "customlocation": ExtendedLocationTypesCustomLocation, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExtendedLocationTypes(input) + return &out, nil +} + +type ProvisioningStateEnum string + +const ( + ProvisioningStateEnumAccepted ProvisioningStateEnum = "Accepted" + ProvisioningStateEnumCanceled ProvisioningStateEnum = "Canceled" + ProvisioningStateEnumDeleting ProvisioningStateEnum = "Deleting" + ProvisioningStateEnumFailed ProvisioningStateEnum = "Failed" + ProvisioningStateEnumInProgress ProvisioningStateEnum = "InProgress" + ProvisioningStateEnumSucceeded ProvisioningStateEnum = "Succeeded" +) + +func PossibleValuesForProvisioningStateEnum() []string { + return []string{ + string(ProvisioningStateEnumAccepted), + string(ProvisioningStateEnumCanceled), + string(ProvisioningStateEnumDeleting), + string(ProvisioningStateEnumFailed), + string(ProvisioningStateEnumInProgress), + string(ProvisioningStateEnumSucceeded), + } +} + +func (s *ProvisioningStateEnum) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningStateEnum(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningStateEnum(input string) (*ProvisioningStateEnum, error) { + vals := map[string]ProvisioningStateEnum{ + "accepted": ProvisioningStateEnumAccepted, + "canceled": ProvisioningStateEnumCanceled, + "deleting": ProvisioningStateEnumDeleting, + "failed": ProvisioningStateEnumFailed, + "inprogress": ProvisioningStateEnumInProgress, + "succeeded": ProvisioningStateEnumSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningStateEnum(input) + return &out, nil +} + +type Status string + +const ( + StatusFailed Status = "Failed" + StatusInProgress Status = "InProgress" + StatusSucceeded Status = "Succeeded" +) + +func PossibleValuesForStatus() []string { + return []string{ + string(StatusFailed), + string(StatusInProgress), + string(StatusSucceeded), + } +} + +func (s *Status) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStatus(input string) (*Status, error) { + vals := map[string]Status{ + "failed": StatusFailed, + "inprogress": StatusInProgress, + "succeeded": StatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Status(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/id_storagecontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/id_storagecontainer.go new file mode 100644 index 000000000000..20284ffcabd2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/id_storagecontainer.go @@ -0,0 +1,125 @@ +package storagecontainers + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &StorageContainerId{} + +// StorageContainerId is a struct representing the Resource ID for a Storage Container +type StorageContainerId struct { + SubscriptionId string + ResourceGroupName string + StorageContainerName string +} + +// NewStorageContainerID returns a new StorageContainerId struct +func NewStorageContainerID(subscriptionId string, resourceGroupName string, storageContainerName string) StorageContainerId { + return StorageContainerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + StorageContainerName: storageContainerName, + } +} + +// ParseStorageContainerID parses 'input' into a StorageContainerId +func ParseStorageContainerID(input string) (*StorageContainerId, error) { + parser := resourceids.NewParserFromResourceIdType(&StorageContainerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := StorageContainerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseStorageContainerIDInsensitively parses 'input' case-insensitively into a StorageContainerId +// note: this method should only be used for API response data and not user input +func ParseStorageContainerIDInsensitively(input string) (*StorageContainerId, error) { + parser := resourceids.NewParserFromResourceIdType(&StorageContainerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := StorageContainerId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *StorageContainerId) FromParseResult(input 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.StorageContainerName, ok = input.Parsed["storageContainerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "storageContainerName", input) + } + + return nil +} + +// ValidateStorageContainerID checks that 'input' can be parsed as a Storage Container ID +func ValidateStorageContainerID(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 := ParseStorageContainerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Storage Container ID +func (id StorageContainerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.AzureStackHCI/storageContainers/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.StorageContainerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Storage Container ID +func (id StorageContainerId) 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("staticMicrosoftAzureStackHCI", "Microsoft.AzureStackHCI", "Microsoft.AzureStackHCI"), + resourceids.StaticSegment("staticStorageContainers", "storageContainers", "storageContainers"), + resourceids.UserSpecifiedSegment("storageContainerName", "storageContainerValue"), + } +} + +// String returns a human-readable description of this Storage Container ID +func (id StorageContainerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Storage Container Name: %q", id.StorageContainerName), + } + return fmt.Sprintf("Storage Container (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_createorupdate.go new file mode 100644 index 000000000000..224d388ec6ca --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_createorupdate.go @@ -0,0 +1,75 @@ +package storagecontainers + +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 *StorageContainers +} + +// CreateOrUpdate ... +func (c StorageContainersClient) CreateOrUpdate(ctx context.Context, id StorageContainerId, input StorageContainers) (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 StorageContainersClient) CreateOrUpdateThenPoll(ctx context.Context, id StorageContainerId, input StorageContainers) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_delete.go new file mode 100644 index 000000000000..4c2f5715cf47 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_delete.go @@ -0,0 +1,70 @@ +package storagecontainers + +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 StorageContainersClient) Delete(ctx context.Context, id StorageContainerId) (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 StorageContainersClient) DeleteThenPoll(ctx context.Context, id StorageContainerId) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_get.go new file mode 100644 index 000000000000..3ead82b221ba --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_get.go @@ -0,0 +1,54 @@ +package storagecontainers + +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 *StorageContainers +} + +// Get ... +func (c StorageContainersClient) Get(ctx context.Context, id StorageContainerId) (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 StorageContainers + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_list.go new file mode 100644 index 000000000000..6c64a2ba76f4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_list.go @@ -0,0 +1,92 @@ +package storagecontainers + +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 ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]StorageContainers +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []StorageContainers +} + +// List ... +func (c StorageContainersClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/storageContainers", 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 *[]StorageContainers `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c StorageContainersClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, StorageContainersOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c StorageContainersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate StorageContainersOperationPredicate) (result ListCompleteResult, err error) { + items := make([]StorageContainers, 0) + + resp, err := c.List(ctx, id) + if err != nil { + 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 = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_listall.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_listall.go new file mode 100644 index 000000000000..c924bd0169d4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_listall.go @@ -0,0 +1,92 @@ +package storagecontainers + +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 ListAllOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]StorageContainers +} + +type ListAllCompleteResult struct { + LatestHttpResponse *http.Response + Items []StorageContainers +} + +// ListAll ... +func (c StorageContainersClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/storageContainers", 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 *[]StorageContainers `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListAllComplete retrieves all the results into a single object +func (c StorageContainersClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { + return c.ListAllCompleteMatchingPredicate(ctx, id, StorageContainersOperationPredicate{}) +} + +// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c StorageContainersClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate StorageContainersOperationPredicate) (result ListAllCompleteResult, err error) { + items := make([]StorageContainers, 0) + + resp, err := c.ListAll(ctx, id) + if err != nil { + 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 = ListAllCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_update.go new file mode 100644 index 000000000000..796a838c3be4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_update.go @@ -0,0 +1,75 @@ +package storagecontainers + +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 UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *StorageContainers +} + +// Update ... +func (c StorageContainersClient) Update(ctx context.Context, id StorageContainerId, input StorageContainersUpdateRequest) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c StorageContainersClient) UpdateThenPoll(ctx context.Context, id StorageContainerId, input StorageContainersUpdateRequest) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_extendedlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_extendedlocation.go new file mode 100644 index 000000000000..e1936c7961ac --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_extendedlocation.go @@ -0,0 +1,9 @@ +package storagecontainers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedLocation struct { + Name *string `json:"name,omitempty"` + Type *ExtendedLocationTypes `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_storagecontainerproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_storagecontainerproperties.go new file mode 100644 index 000000000000..6cdde28e1f2a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_storagecontainerproperties.go @@ -0,0 +1,10 @@ +package storagecontainers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageContainerProperties struct { + Path string `json:"path"` + ProvisioningState *ProvisioningStateEnum `json:"provisioningState,omitempty"` + Status *StorageContainerStatus `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_storagecontainers.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_storagecontainers.go new file mode 100644 index 000000000000..f669724072d2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_storagecontainers.go @@ -0,0 +1,19 @@ +package storagecontainers + +import ( + "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 StorageContainers struct { + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *StorageContainerProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_storagecontainerstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_storagecontainerstatus.go new file mode 100644 index 000000000000..f4ee8603c335 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_storagecontainerstatus.go @@ -0,0 +1,12 @@ +package storagecontainers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageContainerStatus struct { + AvailableSizeMB *int64 `json:"availableSizeMB,omitempty"` + ContainerSizeMB *int64 `json:"containerSizeMB,omitempty"` + ErrorCode *string `json:"errorCode,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + ProvisioningStatus *StorageContainerStatusProvisioningStatus `json:"provisioningStatus,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_storagecontainerstatusprovisioningstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_storagecontainerstatusprovisioningstatus.go new file mode 100644 index 000000000000..ae2e6ebaff85 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_storagecontainerstatusprovisioningstatus.go @@ -0,0 +1,9 @@ +package storagecontainers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageContainerStatusProvisioningStatus struct { + OperationId *string `json:"operationId,omitempty"` + Status *Status `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_storagecontainersupdaterequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_storagecontainersupdaterequest.go new file mode 100644 index 000000000000..f7961c17b3c9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/model_storagecontainersupdaterequest.go @@ -0,0 +1,8 @@ +package storagecontainers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageContainersUpdateRequest struct { + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/predicates.go new file mode 100644 index 000000000000..0ca6fa521906 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/predicates.go @@ -0,0 +1,32 @@ +package storagecontainers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageContainersOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p StorageContainersOperationPredicate) Matches(input StorageContainers) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/version.go new file mode 100644 index 000000000000..35add40d4710 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers/version.go @@ -0,0 +1,12 @@ +package storagecontainers + +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-01-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/storagecontainers/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/README.md similarity index 93% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/README.md index 2341f358f0ae..ab0f47905407 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns` Documentation -The `updateruns` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2023-08-01`). +The `updateruns` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). 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-sdk/resource-manager/azurestackhci/2023-08-01/updateruns" +import "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/constants.go 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/2024-01-01/updateruns/id_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/id_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/id_update.go 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/2024-01-01/updateruns/id_updaterun.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/id_updaterun.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/id_updaterun.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/method_put.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/method_put.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/method_put.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/method_put.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/model_step.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/model_step.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/model_step.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/model_step.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/model_updaterun.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/model_updaterun.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/model_updaterun.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/model_updaterun.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/model_updaterunproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/model_updaterunproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/model_updaterunproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/model_updaterunproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/version.go index 41042b37934a..a4ea5ab3baf8 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns/version.go @@ -5,7 +5,7 @@ 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 = "2023-08-01" +const defaultApiVersion = "2024-01-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/updateruns/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/README.md similarity index 94% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/README.md index cd761e488e49..87cf76fa1d03 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates` Documentation -The `updates` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2023-08-01`). +The `updates` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). 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-sdk/resource-manager/azurestackhci/2023-08-01/updates" +import "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/constants.go similarity index 94% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/constants.go index 648846294a9a..93ca47b61426 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/constants.go @@ -250,6 +250,7 @@ func parseSeverity(input string) (*Severity, error) { type State string const ( + StateAdditionalContentRequired State = "AdditionalContentRequired" StateDownloadFailed State = "DownloadFailed" StateDownloading State = "Downloading" StateHasPrerequisite State = "HasPrerequisite" @@ -272,6 +273,7 @@ const ( func PossibleValuesForState() []string { return []string{ + string(StateAdditionalContentRequired), string(StateDownloadFailed), string(StateDownloading), string(StateHasPrerequisite), @@ -308,15 +310,16 @@ func (s *State) UnmarshalJSON(bytes []byte) error { func parseState(input string) (*State, error) { vals := map[string]State{ - "downloadfailed": StateDownloadFailed, - "downloading": StateDownloading, - "hasprerequisite": StateHasPrerequisite, - "healthcheckfailed": StateHealthCheckFailed, - "healthchecking": StateHealthChecking, - "installationfailed": StateInstallationFailed, - "installed": StateInstalled, - "installing": StateInstalling, - "invalid": StateInvalid, + "additionalcontentrequired": StateAdditionalContentRequired, + "downloadfailed": StateDownloadFailed, + "downloading": StateDownloading, + "hasprerequisite": StateHasPrerequisite, + "healthcheckfailed": StateHealthCheckFailed, + "healthchecking": StateHealthChecking, + "installationfailed": StateInstallationFailed, + "installed": StateInstalled, + "installing": StateInstalling, + "invalid": StateInvalid, "notapplicablebecauseanotherupdateisinprogress": StateNotApplicableBecauseAnotherUpdateIsInProgress, "obsolete": StateObsolete, "preparationfailed": StatePreparationFailed, 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/2024-01-01/updates/id_cluster.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/id_cluster.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/id_cluster.go 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/2024-01-01/updates/id_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/id_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/id_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/method_post.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/method_post.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/method_post.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/method_post.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/method_put.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/method_put.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/method_put.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/method_put.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/model_packageversioninfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/model_packageversioninfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/model_packageversioninfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/model_packageversioninfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/model_precheckresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/model_precheckresult.go similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/model_precheckresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/model_precheckresult.go index 22b924a1d10d..17a8760a952f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/model_precheckresult.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/model_precheckresult.go @@ -12,6 +12,7 @@ import ( type PrecheckResult struct { AdditionalData *string `json:"additionalData,omitempty"` Description *string `json:"description,omitempty"` + DisplayName *string `json:"displayName,omitempty"` HealthCheckSource *string `json:"healthCheckSource,omitempty"` Name *string `json:"name,omitempty"` Remediation *string `json:"remediation,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/model_precheckresulttags.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/model_precheckresulttags.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/model_precheckresulttags.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/model_precheckresulttags.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/model_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/model_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/model_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/model_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/model_updateprerequisite.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/model_updateprerequisite.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/model_updateprerequisite.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/model_updateprerequisite.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/model_updateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/model_updateproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/model_updateproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/model_updateproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/model_updatestateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/model_updatestateproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/model_updatestateproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/model_updatestateproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/version.go index 5cc2633fd5f0..c20c9326dd65 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates/version.go @@ -5,7 +5,7 @@ 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 = "2023-08-01" +const defaultApiVersion = "2024-01-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/updates/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/README.md similarity index 93% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/README.md index fdabe651d0b7..55a9be0c7e35 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries` Documentation -The `updatesummaries` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2023-08-01`). +The `updatesummaries` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). 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-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries" +import "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/constants.go 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/2024-01-01/updatesummaries/id_cluster.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/id_cluster.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/id_cluster.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/method_put.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/method_put.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/method_put.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/method_put.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/model_packageversioninfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/model_packageversioninfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/model_packageversioninfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/model_packageversioninfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/model_precheckresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/model_precheckresult.go similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/model_precheckresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/model_precheckresult.go index 877f1918f9ee..e500d617de5d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/model_precheckresult.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/model_precheckresult.go @@ -12,6 +12,7 @@ import ( type PrecheckResult struct { AdditionalData *string `json:"additionalData,omitempty"` Description *string `json:"description,omitempty"` + DisplayName *string `json:"displayName,omitempty"` HealthCheckSource *string `json:"healthCheckSource,omitempty"` Name *string `json:"name,omitempty"` Remediation *string `json:"remediation,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/model_precheckresulttags.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/model_precheckresulttags.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/model_precheckresulttags.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/model_precheckresulttags.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/model_updatesummaries.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/model_updatesummaries.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/model_updatesummaries.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/model_updatesummaries.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/model_updatesummariesproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/model_updatesummariesproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/model_updatesummariesproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/model_updatesummariesproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/version.go similarity index 88% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/version.go index ffeebf3e56fb..c771197bf1d0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries/version.go @@ -5,7 +5,7 @@ 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 = "2023-08-01" +const defaultApiVersion = "2024-01-01" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/updatesummaries/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/README.md new file mode 100644 index 000000000000..103485fd08f5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/README.md @@ -0,0 +1,117 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks` Documentation + +The `virtualharddisks` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). + +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/azurestackhci/2024-01-01/virtualharddisks" +``` + + +### Client Initialization + +```go +client := virtualharddisks.NewVirtualHardDisksClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `VirtualHardDisksClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := virtualharddisks.NewVirtualHardDiskID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHardDiskValue") + +payload := virtualharddisks.VirtualHardDisks{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualHardDisksClient.Delete` + +```go +ctx := context.TODO() +id := virtualharddisks.NewVirtualHardDiskID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHardDiskValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualHardDisksClient.Get` + +```go +ctx := context.TODO() +id := virtualharddisks.NewVirtualHardDiskID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHardDiskValue") + +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: `VirtualHardDisksClient.List` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `VirtualHardDisksClient.ListAll` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination +items, err := client.ListAllComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `VirtualHardDisksClient.Update` + +```go +ctx := context.TODO() +id := virtualharddisks.NewVirtualHardDiskID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHardDiskValue") + +payload := virtualharddisks.VirtualHardDisksUpdateRequest{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/client.go new file mode 100644 index 000000000000..337d4efa6595 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/client.go @@ -0,0 +1,26 @@ +package virtualharddisks + +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 VirtualHardDisksClient struct { + Client *resourcemanager.Client +} + +func NewVirtualHardDisksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualHardDisksClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualharddisks", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating VirtualHardDisksClient: %+v", err) + } + + return &VirtualHardDisksClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/constants.go new file mode 100644 index 000000000000..6387b527b493 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/constants.go @@ -0,0 +1,227 @@ +package virtualharddisks + +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 DiskFileFormat string + +const ( + DiskFileFormatVhd DiskFileFormat = "vhd" + DiskFileFormatVhdx DiskFileFormat = "vhdx" +) + +func PossibleValuesForDiskFileFormat() []string { + return []string{ + string(DiskFileFormatVhd), + string(DiskFileFormatVhdx), + } +} + +func (s *DiskFileFormat) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDiskFileFormat(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDiskFileFormat(input string) (*DiskFileFormat, error) { + vals := map[string]DiskFileFormat{ + "vhd": DiskFileFormatVhd, + "vhdx": DiskFileFormatVhdx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DiskFileFormat(input) + return &out, nil +} + +type ExtendedLocationTypes string + +const ( + ExtendedLocationTypesCustomLocation ExtendedLocationTypes = "CustomLocation" +) + +func PossibleValuesForExtendedLocationTypes() []string { + return []string{ + string(ExtendedLocationTypesCustomLocation), + } +} + +func (s *ExtendedLocationTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExtendedLocationTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExtendedLocationTypes(input string) (*ExtendedLocationTypes, error) { + vals := map[string]ExtendedLocationTypes{ + "customlocation": ExtendedLocationTypesCustomLocation, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExtendedLocationTypes(input) + return &out, nil +} + +type HyperVGeneration string + +const ( + HyperVGenerationVOne HyperVGeneration = "V1" + HyperVGenerationVTwo HyperVGeneration = "V2" +) + +func PossibleValuesForHyperVGeneration() []string { + return []string{ + string(HyperVGenerationVOne), + string(HyperVGenerationVTwo), + } +} + +func (s *HyperVGeneration) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHyperVGeneration(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHyperVGeneration(input string) (*HyperVGeneration, error) { + vals := map[string]HyperVGeneration{ + "v1": HyperVGenerationVOne, + "v2": HyperVGenerationVTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HyperVGeneration(input) + return &out, nil +} + +type ProvisioningStateEnum string + +const ( + ProvisioningStateEnumAccepted ProvisioningStateEnum = "Accepted" + ProvisioningStateEnumCanceled ProvisioningStateEnum = "Canceled" + ProvisioningStateEnumDeleting ProvisioningStateEnum = "Deleting" + ProvisioningStateEnumFailed ProvisioningStateEnum = "Failed" + ProvisioningStateEnumInProgress ProvisioningStateEnum = "InProgress" + ProvisioningStateEnumSucceeded ProvisioningStateEnum = "Succeeded" +) + +func PossibleValuesForProvisioningStateEnum() []string { + return []string{ + string(ProvisioningStateEnumAccepted), + string(ProvisioningStateEnumCanceled), + string(ProvisioningStateEnumDeleting), + string(ProvisioningStateEnumFailed), + string(ProvisioningStateEnumInProgress), + string(ProvisioningStateEnumSucceeded), + } +} + +func (s *ProvisioningStateEnum) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningStateEnum(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningStateEnum(input string) (*ProvisioningStateEnum, error) { + vals := map[string]ProvisioningStateEnum{ + "accepted": ProvisioningStateEnumAccepted, + "canceled": ProvisioningStateEnumCanceled, + "deleting": ProvisioningStateEnumDeleting, + "failed": ProvisioningStateEnumFailed, + "inprogress": ProvisioningStateEnumInProgress, + "succeeded": ProvisioningStateEnumSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningStateEnum(input) + return &out, nil +} + +type Status string + +const ( + StatusFailed Status = "Failed" + StatusInProgress Status = "InProgress" + StatusSucceeded Status = "Succeeded" +) + +func PossibleValuesForStatus() []string { + return []string{ + string(StatusFailed), + string(StatusInProgress), + string(StatusSucceeded), + } +} + +func (s *Status) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStatus(input string) (*Status, error) { + vals := map[string]Status{ + "failed": StatusFailed, + "inprogress": StatusInProgress, + "succeeded": StatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Status(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/id_virtualharddisk.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/id_virtualharddisk.go new file mode 100644 index 000000000000..db4eb3fb44c9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/id_virtualharddisk.go @@ -0,0 +1,125 @@ +package virtualharddisks + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &VirtualHardDiskId{} + +// VirtualHardDiskId is a struct representing the Resource ID for a Virtual Hard Disk +type VirtualHardDiskId struct { + SubscriptionId string + ResourceGroupName string + VirtualHardDiskName string +} + +// NewVirtualHardDiskID returns a new VirtualHardDiskId struct +func NewVirtualHardDiskID(subscriptionId string, resourceGroupName string, virtualHardDiskName string) VirtualHardDiskId { + return VirtualHardDiskId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + VirtualHardDiskName: virtualHardDiskName, + } +} + +// ParseVirtualHardDiskID parses 'input' into a VirtualHardDiskId +func ParseVirtualHardDiskID(input string) (*VirtualHardDiskId, error) { + parser := resourceids.NewParserFromResourceIdType(&VirtualHardDiskId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := VirtualHardDiskId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseVirtualHardDiskIDInsensitively parses 'input' case-insensitively into a VirtualHardDiskId +// note: this method should only be used for API response data and not user input +func ParseVirtualHardDiskIDInsensitively(input string) (*VirtualHardDiskId, error) { + parser := resourceids.NewParserFromResourceIdType(&VirtualHardDiskId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := VirtualHardDiskId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *VirtualHardDiskId) FromParseResult(input 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.VirtualHardDiskName, ok = input.Parsed["virtualHardDiskName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "virtualHardDiskName", input) + } + + return nil +} + +// ValidateVirtualHardDiskID checks that 'input' can be parsed as a Virtual Hard Disk ID +func ValidateVirtualHardDiskID(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 := ParseVirtualHardDiskID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Virtual Hard Disk ID +func (id VirtualHardDiskId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.AzureStackHCI/virtualHardDisks/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualHardDiskName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Virtual Hard Disk ID +func (id VirtualHardDiskId) 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("staticMicrosoftAzureStackHCI", "Microsoft.AzureStackHCI", "Microsoft.AzureStackHCI"), + resourceids.StaticSegment("staticVirtualHardDisks", "virtualHardDisks", "virtualHardDisks"), + resourceids.UserSpecifiedSegment("virtualHardDiskName", "virtualHardDiskValue"), + } +} + +// String returns a human-readable description of this Virtual Hard Disk ID +func (id VirtualHardDiskId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Virtual Hard Disk Name: %q", id.VirtualHardDiskName), + } + return fmt.Sprintf("Virtual Hard Disk (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_createorupdate.go new file mode 100644 index 000000000000..fe36930d4287 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_createorupdate.go @@ -0,0 +1,75 @@ +package virtualharddisks + +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 *VirtualHardDisks +} + +// CreateOrUpdate ... +func (c VirtualHardDisksClient) CreateOrUpdate(ctx context.Context, id VirtualHardDiskId, input VirtualHardDisks) (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 VirtualHardDisksClient) CreateOrUpdateThenPoll(ctx context.Context, id VirtualHardDiskId, input VirtualHardDisks) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_delete.go new file mode 100644 index 000000000000..6abc25288228 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_delete.go @@ -0,0 +1,70 @@ +package virtualharddisks + +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 VirtualHardDisksClient) Delete(ctx context.Context, id VirtualHardDiskId) (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 VirtualHardDisksClient) DeleteThenPoll(ctx context.Context, id VirtualHardDiskId) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_get.go new file mode 100644 index 000000000000..7917d287d9bf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_get.go @@ -0,0 +1,54 @@ +package virtualharddisks + +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 *VirtualHardDisks +} + +// Get ... +func (c VirtualHardDisksClient) Get(ctx context.Context, id VirtualHardDiskId) (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 VirtualHardDisks + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_list.go new file mode 100644 index 000000000000..4988494c02e3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_list.go @@ -0,0 +1,92 @@ +package virtualharddisks + +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 ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]VirtualHardDisks +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []VirtualHardDisks +} + +// List ... +func (c VirtualHardDisksClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/virtualHardDisks", 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 *[]VirtualHardDisks `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c VirtualHardDisksClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, VirtualHardDisksOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c VirtualHardDisksClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualHardDisksOperationPredicate) (result ListCompleteResult, err error) { + items := make([]VirtualHardDisks, 0) + + resp, err := c.List(ctx, id) + if err != nil { + 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 = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_listall.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_listall.go new file mode 100644 index 000000000000..e8b12a2784d6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_listall.go @@ -0,0 +1,92 @@ +package virtualharddisks + +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 ListAllOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]VirtualHardDisks +} + +type ListAllCompleteResult struct { + LatestHttpResponse *http.Response + Items []VirtualHardDisks +} + +// ListAll ... +func (c VirtualHardDisksClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/virtualHardDisks", 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 *[]VirtualHardDisks `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListAllComplete retrieves all the results into a single object +func (c VirtualHardDisksClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { + return c.ListAllCompleteMatchingPredicate(ctx, id, VirtualHardDisksOperationPredicate{}) +} + +// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c VirtualHardDisksClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VirtualHardDisksOperationPredicate) (result ListAllCompleteResult, err error) { + items := make([]VirtualHardDisks, 0) + + resp, err := c.ListAll(ctx, id) + if err != nil { + 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 = ListAllCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_update.go new file mode 100644 index 000000000000..8ce1cd790ad5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_update.go @@ -0,0 +1,75 @@ +package virtualharddisks + +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 UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *VirtualHardDisks +} + +// Update ... +func (c VirtualHardDisksClient) Update(ctx context.Context, id VirtualHardDiskId, input VirtualHardDisksUpdateRequest) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + 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 + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c VirtualHardDisksClient) UpdateThenPoll(ctx context.Context, id VirtualHardDiskId, input VirtualHardDisksUpdateRequest) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_extendedlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_extendedlocation.go new file mode 100644 index 000000000000..1769d210ca74 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_extendedlocation.go @@ -0,0 +1,9 @@ +package virtualharddisks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedLocation struct { + Name *string `json:"name,omitempty"` + Type *ExtendedLocationTypes `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_virtualharddiskproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_virtualharddiskproperties.go new file mode 100644 index 000000000000..943616085852 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_virtualharddiskproperties.go @@ -0,0 +1,17 @@ +package virtualharddisks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualHardDiskProperties struct { + BlockSizeBytes *int64 `json:"blockSizeBytes,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + DiskFileFormat *DiskFileFormat `json:"diskFileFormat,omitempty"` + DiskSizeGB *int64 `json:"diskSizeGB,omitempty"` + Dynamic *bool `json:"dynamic,omitempty"` + HyperVGeneration *HyperVGeneration `json:"hyperVGeneration,omitempty"` + LogicalSectorBytes *int64 `json:"logicalSectorBytes,omitempty"` + PhysicalSectorBytes *int64 `json:"physicalSectorBytes,omitempty"` + ProvisioningState *ProvisioningStateEnum `json:"provisioningState,omitempty"` + Status *VirtualHardDiskStatus `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_virtualharddisks.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_virtualharddisks.go new file mode 100644 index 000000000000..761800d5c3c6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_virtualharddisks.go @@ -0,0 +1,19 @@ +package virtualharddisks + +import ( + "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 VirtualHardDisks struct { + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *VirtualHardDiskProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_virtualharddiskstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_virtualharddiskstatus.go new file mode 100644 index 000000000000..589b9607ee18 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_virtualharddiskstatus.go @@ -0,0 +1,10 @@ +package virtualharddisks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualHardDiskStatus struct { + ErrorCode *string `json:"errorCode,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + ProvisioningStatus *VirtualHardDiskStatusProvisioningStatus `json:"provisioningStatus,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_virtualharddiskstatusprovisioningstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_virtualharddiskstatusprovisioningstatus.go new file mode 100644 index 000000000000..66fd03afc8bc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_virtualharddiskstatusprovisioningstatus.go @@ -0,0 +1,9 @@ +package virtualharddisks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualHardDiskStatusProvisioningStatus struct { + OperationId *string `json:"operationId,omitempty"` + Status *Status `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_virtualharddisksupdaterequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_virtualharddisksupdaterequest.go new file mode 100644 index 000000000000..1de25f7b8de3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/model_virtualharddisksupdaterequest.go @@ -0,0 +1,8 @@ +package virtualharddisks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualHardDisksUpdateRequest struct { + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/predicates.go new file mode 100644 index 000000000000..793ce512e65f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/predicates.go @@ -0,0 +1,32 @@ +package virtualharddisks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualHardDisksOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p VirtualHardDisksOperationPredicate) Matches(input VirtualHardDisks) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/version.go new file mode 100644 index 000000000000..833f8432f8ba --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks/version.go @@ -0,0 +1,12 @@ +package virtualharddisks + +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-01-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/virtualharddisks/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/README.md new file mode 100644 index 000000000000..1368193d4559 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/README.md @@ -0,0 +1,136 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances` Documentation + +The `virtualmachineinstances` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). + +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/azurestackhci/2024-01-01/virtualmachineinstances" +``` + + +### Client Initialization + +```go +client := virtualmachineinstances.NewVirtualMachineInstancesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `VirtualMachineInstancesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group") + +payload := virtualmachineinstances.VirtualMachineInstance{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineInstancesClient.Delete` + +```go +ctx := context.TODO() +id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineInstancesClient.Get` + +```go +ctx := context.TODO() +id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group") + +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: `VirtualMachineInstancesClient.List` + +```go +ctx := context.TODO() +id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `VirtualMachineInstancesClient.Restart` + +```go +ctx := context.TODO() +id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group") + +if err := client.RestartThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineInstancesClient.Start` + +```go +ctx := context.TODO() +id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group") + +if err := client.StartThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineInstancesClient.Stop` + +```go +ctx := context.TODO() +id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group") + +if err := client.StopThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `VirtualMachineInstancesClient.Update` + +```go +ctx := context.TODO() +id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group") + +payload := virtualmachineinstances.VirtualMachineInstanceUpdateRequest{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/client.go new file mode 100644 index 000000000000..e40ddc4adf55 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/client.go @@ -0,0 +1,26 @@ +package virtualmachineinstances + +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 VirtualMachineInstancesClient struct { + Client *resourcemanager.Client +} + +func NewVirtualMachineInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineInstancesClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineinstances", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating VirtualMachineInstancesClient: %+v", err) + } + + return &VirtualMachineInstancesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/constants.go new file mode 100644 index 000000000000..ecc73bd57b08 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/constants.go @@ -0,0 +1,475 @@ +package virtualmachineinstances + +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 ExtendedLocationTypes string + +const ( + ExtendedLocationTypesCustomLocation ExtendedLocationTypes = "CustomLocation" +) + +func PossibleValuesForExtendedLocationTypes() []string { + return []string{ + string(ExtendedLocationTypesCustomLocation), + } +} + +func (s *ExtendedLocationTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExtendedLocationTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExtendedLocationTypes(input string) (*ExtendedLocationTypes, error) { + vals := map[string]ExtendedLocationTypes{ + "customlocation": ExtendedLocationTypesCustomLocation, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExtendedLocationTypes(input) + return &out, nil +} + +type OperatingSystemTypes string + +const ( + OperatingSystemTypesLinux OperatingSystemTypes = "Linux" + OperatingSystemTypesWindows OperatingSystemTypes = "Windows" +) + +func PossibleValuesForOperatingSystemTypes() []string { + return []string{ + string(OperatingSystemTypesLinux), + string(OperatingSystemTypesWindows), + } +} + +func (s *OperatingSystemTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOperatingSystemTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOperatingSystemTypes(input string) (*OperatingSystemTypes, error) { + vals := map[string]OperatingSystemTypes{ + "linux": OperatingSystemTypesLinux, + "windows": OperatingSystemTypesWindows, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OperatingSystemTypes(input) + return &out, nil +} + +type PowerStateEnum string + +const ( + PowerStateEnumDeallocated PowerStateEnum = "Deallocated" + PowerStateEnumDeallocating PowerStateEnum = "Deallocating" + PowerStateEnumRunning PowerStateEnum = "Running" + PowerStateEnumStarting PowerStateEnum = "Starting" + PowerStateEnumStopped PowerStateEnum = "Stopped" + PowerStateEnumStopping PowerStateEnum = "Stopping" + PowerStateEnumUnknown PowerStateEnum = "Unknown" +) + +func PossibleValuesForPowerStateEnum() []string { + return []string{ + string(PowerStateEnumDeallocated), + string(PowerStateEnumDeallocating), + string(PowerStateEnumRunning), + string(PowerStateEnumStarting), + string(PowerStateEnumStopped), + string(PowerStateEnumStopping), + string(PowerStateEnumUnknown), + } +} + +func (s *PowerStateEnum) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePowerStateEnum(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePowerStateEnum(input string) (*PowerStateEnum, error) { + vals := map[string]PowerStateEnum{ + "deallocated": PowerStateEnumDeallocated, + "deallocating": PowerStateEnumDeallocating, + "running": PowerStateEnumRunning, + "starting": PowerStateEnumStarting, + "stopped": PowerStateEnumStopped, + "stopping": PowerStateEnumStopping, + "unknown": PowerStateEnumUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PowerStateEnum(input) + return &out, nil +} + +type ProvisioningStateEnum string + +const ( + ProvisioningStateEnumAccepted ProvisioningStateEnum = "Accepted" + ProvisioningStateEnumCanceled ProvisioningStateEnum = "Canceled" + ProvisioningStateEnumDeleting ProvisioningStateEnum = "Deleting" + ProvisioningStateEnumFailed ProvisioningStateEnum = "Failed" + ProvisioningStateEnumInProgress ProvisioningStateEnum = "InProgress" + ProvisioningStateEnumSucceeded ProvisioningStateEnum = "Succeeded" +) + +func PossibleValuesForProvisioningStateEnum() []string { + return []string{ + string(ProvisioningStateEnumAccepted), + string(ProvisioningStateEnumCanceled), + string(ProvisioningStateEnumDeleting), + string(ProvisioningStateEnumFailed), + string(ProvisioningStateEnumInProgress), + string(ProvisioningStateEnumSucceeded), + } +} + +func (s *ProvisioningStateEnum) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningStateEnum(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningStateEnum(input string) (*ProvisioningStateEnum, error) { + vals := map[string]ProvisioningStateEnum{ + "accepted": ProvisioningStateEnumAccepted, + "canceled": ProvisioningStateEnumCanceled, + "deleting": ProvisioningStateEnumDeleting, + "failed": ProvisioningStateEnumFailed, + "inprogress": ProvisioningStateEnumInProgress, + "succeeded": ProvisioningStateEnumSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningStateEnum(input) + return &out, nil +} + +type SecurityTypes string + +const ( + SecurityTypesConfidentialVM SecurityTypes = "ConfidentialVM" + SecurityTypesTrustedLaunch SecurityTypes = "TrustedLaunch" +) + +func PossibleValuesForSecurityTypes() []string { + return []string{ + string(SecurityTypesConfidentialVM), + string(SecurityTypesTrustedLaunch), + } +} + +func (s *SecurityTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSecurityTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSecurityTypes(input string) (*SecurityTypes, error) { + vals := map[string]SecurityTypes{ + "confidentialvm": SecurityTypesConfidentialVM, + "trustedlaunch": SecurityTypesTrustedLaunch, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SecurityTypes(input) + return &out, nil +} + +type Status string + +const ( + StatusFailed Status = "Failed" + StatusInProgress Status = "InProgress" + StatusSucceeded Status = "Succeeded" +) + +func PossibleValuesForStatus() []string { + return []string{ + string(StatusFailed), + string(StatusInProgress), + string(StatusSucceeded), + } +} + +func (s *Status) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStatus(input string) (*Status, error) { + vals := map[string]Status{ + "failed": StatusFailed, + "inprogress": StatusInProgress, + "succeeded": StatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Status(input) + return &out, nil +} + +type StatusLevelTypes string + +const ( + StatusLevelTypesError StatusLevelTypes = "Error" + StatusLevelTypesInfo StatusLevelTypes = "Info" + StatusLevelTypesWarning StatusLevelTypes = "Warning" +) + +func PossibleValuesForStatusLevelTypes() []string { + return []string{ + string(StatusLevelTypesError), + string(StatusLevelTypesInfo), + string(StatusLevelTypesWarning), + } +} + +func (s *StatusLevelTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStatusLevelTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStatusLevelTypes(input string) (*StatusLevelTypes, error) { + vals := map[string]StatusLevelTypes{ + "error": StatusLevelTypesError, + "info": StatusLevelTypesInfo, + "warning": StatusLevelTypesWarning, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StatusLevelTypes(input) + return &out, nil +} + +type StatusTypes string + +const ( + StatusTypesFailed StatusTypes = "Failed" + StatusTypesInProgress StatusTypes = "InProgress" + StatusTypesSucceeded StatusTypes = "Succeeded" +) + +func PossibleValuesForStatusTypes() []string { + return []string{ + string(StatusTypesFailed), + string(StatusTypesInProgress), + string(StatusTypesSucceeded), + } +} + +func (s *StatusTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStatusTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStatusTypes(input string) (*StatusTypes, error) { + vals := map[string]StatusTypes{ + "failed": StatusTypesFailed, + "inprogress": StatusTypesInProgress, + "succeeded": StatusTypesSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StatusTypes(input) + return &out, nil +} + +type VMSizeEnum string + +const ( + VMSizeEnumCustom VMSizeEnum = "Custom" + VMSizeEnumDefault VMSizeEnum = "Default" + VMSizeEnumStandardAFourVTwo VMSizeEnum = "Standard_A4_v2" + VMSizeEnumStandardATwoVTwo VMSizeEnum = "Standard_A2_v2" + VMSizeEnumStandardDEightsVThree VMSizeEnum = "Standard_D8s_v3" + VMSizeEnumStandardDFoursVThree VMSizeEnum = "Standard_D4s_v3" + VMSizeEnumStandardDOneSixsVThree VMSizeEnum = "Standard_D16s_v3" + VMSizeEnumStandardDSFiveVTwo VMSizeEnum = "Standard_DS5_v2" + VMSizeEnumStandardDSFourVTwo VMSizeEnum = "Standard_DS4_v2" + VMSizeEnumStandardDSOneThreeVTwo VMSizeEnum = "Standard_DS13_v2" + VMSizeEnumStandardDSThreeVTwo VMSizeEnum = "Standard_DS3_v2" + VMSizeEnumStandardDSTwoVTwo VMSizeEnum = "Standard_DS2_v2" + VMSizeEnumStandardDThreeTwosVThree VMSizeEnum = "Standard_D32s_v3" + VMSizeEnumStandardDTwosVThree VMSizeEnum = "Standard_D2s_v3" + VMSizeEnumStandardKEightSFiveVOne VMSizeEnum = "Standard_K8S5_v1" + VMSizeEnumStandardKEightSFourVOne VMSizeEnum = "Standard_K8S4_v1" + VMSizeEnumStandardKEightSThreeVOne VMSizeEnum = "Standard_K8S3_v1" + VMSizeEnumStandardKEightSTwoVOne VMSizeEnum = "Standard_K8S2_v1" + VMSizeEnumStandardKEightSVOne VMSizeEnum = "Standard_K8S_v1" + VMSizeEnumStandardNKOneTwo VMSizeEnum = "Standard_NK12" + VMSizeEnumStandardNKSix VMSizeEnum = "Standard_NK6" + VMSizeEnumStandardNVOneTwo VMSizeEnum = "Standard_NV12" + VMSizeEnumStandardNVSix VMSizeEnum = "Standard_NV6" +) + +func PossibleValuesForVMSizeEnum() []string { + return []string{ + string(VMSizeEnumCustom), + string(VMSizeEnumDefault), + string(VMSizeEnumStandardAFourVTwo), + string(VMSizeEnumStandardATwoVTwo), + string(VMSizeEnumStandardDEightsVThree), + string(VMSizeEnumStandardDFoursVThree), + string(VMSizeEnumStandardDOneSixsVThree), + string(VMSizeEnumStandardDSFiveVTwo), + string(VMSizeEnumStandardDSFourVTwo), + string(VMSizeEnumStandardDSOneThreeVTwo), + string(VMSizeEnumStandardDSThreeVTwo), + string(VMSizeEnumStandardDSTwoVTwo), + string(VMSizeEnumStandardDThreeTwosVThree), + string(VMSizeEnumStandardDTwosVThree), + string(VMSizeEnumStandardKEightSFiveVOne), + string(VMSizeEnumStandardKEightSFourVOne), + string(VMSizeEnumStandardKEightSThreeVOne), + string(VMSizeEnumStandardKEightSTwoVOne), + string(VMSizeEnumStandardKEightSVOne), + string(VMSizeEnumStandardNKOneTwo), + string(VMSizeEnumStandardNKSix), + string(VMSizeEnumStandardNVOneTwo), + string(VMSizeEnumStandardNVSix), + } +} + +func (s *VMSizeEnum) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseVMSizeEnum(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseVMSizeEnum(input string) (*VMSizeEnum, error) { + vals := map[string]VMSizeEnum{ + "custom": VMSizeEnumCustom, + "default": VMSizeEnumDefault, + "standard_a4_v2": VMSizeEnumStandardAFourVTwo, + "standard_a2_v2": VMSizeEnumStandardATwoVTwo, + "standard_d8s_v3": VMSizeEnumStandardDEightsVThree, + "standard_d4s_v3": VMSizeEnumStandardDFoursVThree, + "standard_d16s_v3": VMSizeEnumStandardDOneSixsVThree, + "standard_ds5_v2": VMSizeEnumStandardDSFiveVTwo, + "standard_ds4_v2": VMSizeEnumStandardDSFourVTwo, + "standard_ds13_v2": VMSizeEnumStandardDSOneThreeVTwo, + "standard_ds3_v2": VMSizeEnumStandardDSThreeVTwo, + "standard_ds2_v2": VMSizeEnumStandardDSTwoVTwo, + "standard_d32s_v3": VMSizeEnumStandardDThreeTwosVThree, + "standard_d2s_v3": VMSizeEnumStandardDTwosVThree, + "standard_k8s5_v1": VMSizeEnumStandardKEightSFiveVOne, + "standard_k8s4_v1": VMSizeEnumStandardKEightSFourVOne, + "standard_k8s3_v1": VMSizeEnumStandardKEightSThreeVOne, + "standard_k8s2_v1": VMSizeEnumStandardKEightSTwoVOne, + "standard_k8s_v1": VMSizeEnumStandardKEightSVOne, + "standard_nk12": VMSizeEnumStandardNKOneTwo, + "standard_nk6": VMSizeEnumStandardNKSix, + "standard_nv12": VMSizeEnumStandardNVOneTwo, + "standard_nv6": VMSizeEnumStandardNVSix, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := VMSizeEnum(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_createorupdate.go new file mode 100644 index 000000000000..3101b4317591 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_createorupdate.go @@ -0,0 +1,76 @@ +package virtualmachineinstances + +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/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 *VirtualMachineInstance +} + +// CreateOrUpdate ... +func (c VirtualMachineInstancesClient) CreateOrUpdate(ctx context.Context, id commonids.ScopeId, input VirtualMachineInstance) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", 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 VirtualMachineInstancesClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.ScopeId, input VirtualMachineInstance) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_delete.go new file mode 100644 index 000000000000..e71f0c564c71 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_delete.go @@ -0,0 +1,71 @@ +package virtualmachineinstances + +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/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 VirtualMachineInstancesClient) Delete(ctx context.Context, id commonids.ScopeId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + }, + HttpMethod: http.MethodDelete, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", 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 VirtualMachineInstancesClient) DeleteThenPoll(ctx context.Context, id commonids.ScopeId) 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_get.go new file mode 100644 index 000000000000..083f0bcc7a1b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_get.go @@ -0,0 +1,56 @@ +package virtualmachineinstances + +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 GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *VirtualMachineInstance +} + +// Get ... +func (c VirtualMachineInstancesClient) Get(ctx context.Context, id commonids.ScopeId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", 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 VirtualMachineInstance + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_list.go new file mode 100644 index 000000000000..266c91df4a19 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_list.go @@ -0,0 +1,92 @@ +package virtualmachineinstances + +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 ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]VirtualMachineInstance +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []VirtualMachineInstance +} + +// List ... +func (c VirtualMachineInstancesClient) List(ctx context.Context, id commonids.ScopeId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/virtualMachineInstances", 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 *[]VirtualMachineInstance `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c VirtualMachineInstancesClient) ListComplete(ctx context.Context, id commonids.ScopeId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, VirtualMachineInstanceOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c VirtualMachineInstancesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate VirtualMachineInstanceOperationPredicate) (result ListCompleteResult, err error) { + items := make([]VirtualMachineInstance, 0) + + resp, err := c.List(ctx, id) + if err != nil { + 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 = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_restart.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_restart.go new file mode 100644 index 000000000000..34a84430c7c3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_restart.go @@ -0,0 +1,72 @@ +package virtualmachineinstances + +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/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 RestartOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *VirtualMachineInstance +} + +// Restart ... +func (c VirtualMachineInstancesClient) Restart(ctx context.Context, id commonids.ScopeId) (result RestartOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/restart", 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 +} + +// RestartThenPoll performs Restart then polls until it's completed +func (c VirtualMachineInstancesClient) RestartThenPoll(ctx context.Context, id commonids.ScopeId) error { + result, err := c.Restart(ctx, id) + if err != nil { + return fmt.Errorf("performing Restart: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Restart: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_start.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_start.go new file mode 100644 index 000000000000..df64e7711d5e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_start.go @@ -0,0 +1,72 @@ +package virtualmachineinstances + +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/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 StartOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *VirtualMachineInstance +} + +// Start ... +func (c VirtualMachineInstancesClient) Start(ctx context.Context, id commonids.ScopeId) (result StartOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/start", 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 +} + +// StartThenPoll performs Start then polls until it's completed +func (c VirtualMachineInstancesClient) StartThenPoll(ctx context.Context, id commonids.ScopeId) error { + result, err := c.Start(ctx, id) + if err != nil { + return fmt.Errorf("performing Start: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Start: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_stop.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_stop.go new file mode 100644 index 000000000000..dff3ddd04d6f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_stop.go @@ -0,0 +1,72 @@ +package virtualmachineinstances + +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/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 StopOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *VirtualMachineInstance +} + +// Stop ... +func (c VirtualMachineInstancesClient) Stop(ctx context.Context, id commonids.ScopeId) (result StopOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/stop", 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 +} + +// StopThenPoll performs Stop then polls until it's completed +func (c VirtualMachineInstancesClient) StopThenPoll(ctx context.Context, id commonids.ScopeId) error { + result, err := c.Stop(ctx, id) + if err != nil { + return fmt.Errorf("performing Stop: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Stop: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_update.go new file mode 100644 index 000000000000..9e5a68b37e4a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_update.go @@ -0,0 +1,76 @@ +package virtualmachineinstances + +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/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 UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *VirtualMachineInstance +} + +// Update ... +func (c VirtualMachineInstancesClient) Update(ctx context.Context, id commonids.ScopeId, input VirtualMachineInstanceUpdateRequest) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: fmt.Sprintf("%s/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", 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 +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c VirtualMachineInstancesClient) UpdateThenPoll(ctx context.Context, id commonids.ScopeId, input VirtualMachineInstanceUpdateRequest) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_erroradditionalinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_erroradditionalinfo.go new file mode 100644 index 000000000000..4bc54a9ce015 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_erroradditionalinfo.go @@ -0,0 +1,9 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorAdditionalInfo struct { + Info *interface{} `json:"info,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_errordetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_errordetail.go new file mode 100644 index 000000000000..27f742621215 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_errordetail.go @@ -0,0 +1,12 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorDetail struct { + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` + Code *string `json:"code,omitempty"` + Details *[]ErrorDetail `json:"details,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_extendedlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_extendedlocation.go new file mode 100644 index 000000000000..91c570023b03 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_extendedlocation.go @@ -0,0 +1,9 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedLocation struct { + Name *string `json:"name,omitempty"` + Type *ExtendedLocationTypes `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_guestagentinstallstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_guestagentinstallstatus.go new file mode 100644 index 000000000000..d840ed26b08a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_guestagentinstallstatus.go @@ -0,0 +1,30 @@ +package virtualmachineinstances + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GuestAgentInstallStatus struct { + AgentVersion *string `json:"agentVersion,omitempty"` + ErrorDetails *[]ErrorDetail `json:"errorDetails,omitempty"` + LastStatusChange *string `json:"lastStatusChange,omitempty"` + Status *StatusTypes `json:"status,omitempty"` + VMUuid *string `json:"vmUuid,omitempty"` +} + +func (o *GuestAgentInstallStatus) GetLastStatusChangeAsTime() (*time.Time, error) { + if o.LastStatusChange == nil { + return nil, nil + } + return dates.ParseAsFormat(o.LastStatusChange, "2006-01-02T15:04:05Z07:00") +} + +func (o *GuestAgentInstallStatus) SetLastStatusChangeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.LastStatusChange = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_hardwareprofileupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_hardwareprofileupdate.go new file mode 100644 index 000000000000..8ac33a2aac27 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_hardwareprofileupdate.go @@ -0,0 +1,10 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HardwareProfileUpdate struct { + MemoryMB *int64 `json:"memoryMB,omitempty"` + Processors *int64 `json:"processors,omitempty"` + VMSize *VMSizeEnum `json:"vmSize,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_httpproxyconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_httpproxyconfiguration.go new file mode 100644 index 000000000000..e6b9fe48464c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_httpproxyconfiguration.go @@ -0,0 +1,11 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HTTPProxyConfiguration struct { + HTTPProxy *string `json:"httpProxy,omitempty"` + HTTPSProxy *string `json:"httpsProxy,omitempty"` + NoProxy *[]string `json:"noProxy,omitempty"` + TrustedCa *string `json:"trustedCa,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_instanceviewstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_instanceviewstatus.go new file mode 100644 index 000000000000..cf090359480f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_instanceviewstatus.go @@ -0,0 +1,30 @@ +package virtualmachineinstances + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InstanceViewStatus struct { + Code *string `json:"code,omitempty"` + DisplayStatus *string `json:"displayStatus,omitempty"` + Level *StatusLevelTypes `json:"level,omitempty"` + Message *string `json:"message,omitempty"` + Time *string `json:"time,omitempty"` +} + +func (o *InstanceViewStatus) GetTimeAsTime() (*time.Time, error) { + if o.Time == nil { + return nil, nil + } + return dates.ParseAsFormat(o.Time, "2006-01-02T15:04:05Z07:00") +} + +func (o *InstanceViewStatus) SetTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.Time = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_networkprofileupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_networkprofileupdate.go new file mode 100644 index 000000000000..38d8b2ce83b9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_networkprofileupdate.go @@ -0,0 +1,8 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkProfileUpdate struct { + NetworkInterfaces *[]NetworkProfileUpdateNetworkInterfacesInlined `json:"networkInterfaces,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_networkprofileupdatenetworkinterfacesinlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_networkprofileupdatenetworkinterfacesinlined.go new file mode 100644 index 000000000000..06e4797a9eb5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_networkprofileupdatenetworkinterfacesinlined.go @@ -0,0 +1,8 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkProfileUpdateNetworkInterfacesInlined struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_osprofileupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_osprofileupdate.go new file mode 100644 index 000000000000..68fb327421ea --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_osprofileupdate.go @@ -0,0 +1,10 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OsProfileUpdate struct { + ComputerName *string `json:"computerName,omitempty"` + LinuxConfiguration *OsProfileUpdateLinuxConfiguration `json:"linuxConfiguration,omitempty"` + WindowsConfiguration *OsProfileUpdateWindowsConfiguration `json:"windowsConfiguration,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_osprofileupdatelinuxconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_osprofileupdatelinuxconfiguration.go new file mode 100644 index 000000000000..771d0cad5636 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_osprofileupdatelinuxconfiguration.go @@ -0,0 +1,9 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OsProfileUpdateLinuxConfiguration struct { + ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"` + ProvisionVMConfigAgent *bool `json:"provisionVMConfigAgent,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_osprofileupdatewindowsconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_osprofileupdatewindowsconfiguration.go new file mode 100644 index 000000000000..556f6158585b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_osprofileupdatewindowsconfiguration.go @@ -0,0 +1,9 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OsProfileUpdateWindowsConfiguration struct { + ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"` + ProvisionVMConfigAgent *bool `json:"provisionVMConfigAgent,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_sshconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_sshconfiguration.go new file mode 100644 index 000000000000..65cfc412539b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_sshconfiguration.go @@ -0,0 +1,8 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SshConfiguration struct { + PublicKeys *[]SshPublicKey `json:"publicKeys,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_sshpublickey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_sshpublickey.go new file mode 100644 index 000000000000..24b2239ea7e3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_sshpublickey.go @@ -0,0 +1,9 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SshPublicKey struct { + KeyData *string `json:"keyData,omitempty"` + Path *string `json:"path,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_storageprofileupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_storageprofileupdate.go new file mode 100644 index 000000000000..f9315c680f48 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_storageprofileupdate.go @@ -0,0 +1,8 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageProfileUpdate struct { + DataDisks *[]StorageProfileUpdateDataDisksInlined `json:"dataDisks,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_storageprofileupdatedatadisksinlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_storageprofileupdatedatadisksinlined.go new file mode 100644 index 000000000000..53c62f6a3384 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_storageprofileupdatedatadisksinlined.go @@ -0,0 +1,8 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageProfileUpdateDataDisksInlined struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineconfigagentinstanceview.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineconfigagentinstanceview.go new file mode 100644 index 000000000000..17a3de99b14f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineconfigagentinstanceview.go @@ -0,0 +1,9 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineConfigAgentInstanceView struct { + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` + VMConfigAgentVersion *string `json:"vmConfigAgentVersion,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstance.go new file mode 100644 index 000000000000..c7042f001152 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstance.go @@ -0,0 +1,19 @@ +package virtualmachineinstances + +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 VirtualMachineInstance struct { + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + Id *string `json:"id,omitempty"` + Identity *identity.SystemAssigned `json:"identity,omitempty"` + Name *string `json:"name,omitempty"` + Properties *VirtualMachineInstanceProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstanceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstanceproperties.go new file mode 100644 index 000000000000..2958663da504 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstanceproperties.go @@ -0,0 +1,19 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstanceProperties struct { + GuestAgentInstallStatus *GuestAgentInstallStatus `json:"guestAgentInstallStatus,omitempty"` + HTTPProxyConfig *HTTPProxyConfiguration `json:"httpProxyConfig,omitempty"` + HardwareProfile *VirtualMachineInstancePropertiesHardwareProfile `json:"hardwareProfile,omitempty"` + InstanceView *VirtualMachineInstanceView `json:"instanceView,omitempty"` + NetworkProfile *VirtualMachineInstancePropertiesNetworkProfile `json:"networkProfile,omitempty"` + OsProfile *VirtualMachineInstancePropertiesOsProfile `json:"osProfile,omitempty"` + ProvisioningState *ProvisioningStateEnum `json:"provisioningState,omitempty"` + ResourceUid *string `json:"resourceUid,omitempty"` + SecurityProfile *VirtualMachineInstancePropertiesSecurityProfile `json:"securityProfile,omitempty"` + Status *VirtualMachineInstanceStatus `json:"status,omitempty"` + StorageProfile *VirtualMachineInstancePropertiesStorageProfile `json:"storageProfile,omitempty"` + VMId *string `json:"vmId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertieshardwareprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertieshardwareprofile.go new file mode 100644 index 000000000000..6477a3e0e821 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertieshardwareprofile.go @@ -0,0 +1,11 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstancePropertiesHardwareProfile struct { + DynamicMemoryConfig *VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig `json:"dynamicMemoryConfig,omitempty"` + MemoryMB *int64 `json:"memoryMB,omitempty"` + Processors *int64 `json:"processors,omitempty"` + VMSize *VMSizeEnum `json:"vmSize,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertieshardwareprofiledynamicmemoryconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertieshardwareprofiledynamicmemoryconfig.go new file mode 100644 index 000000000000..71edd8791651 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertieshardwareprofiledynamicmemoryconfig.go @@ -0,0 +1,10 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig struct { + MaximumMemoryMB *int64 `json:"maximumMemoryMB,omitempty"` + MinimumMemoryMB *int64 `json:"minimumMemoryMB,omitempty"` + TargetMemoryBuffer *int64 `json:"targetMemoryBuffer,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesnetworkprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesnetworkprofile.go new file mode 100644 index 000000000000..66c9a7934471 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesnetworkprofile.go @@ -0,0 +1,8 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstancePropertiesNetworkProfile struct { + NetworkInterfaces *[]VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesInlined `json:"networkInterfaces,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesnetworkprofilenetworkinterfacesinlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesnetworkprofilenetworkinterfacesinlined.go new file mode 100644 index 000000000000..4b7bfad467fc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesnetworkprofilenetworkinterfacesinlined.go @@ -0,0 +1,8 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesInlined struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesosprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesosprofile.go new file mode 100644 index 000000000000..9e3a604396d8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesosprofile.go @@ -0,0 +1,12 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstancePropertiesOsProfile struct { + AdminPassword *string `json:"adminPassword,omitempty"` + AdminUsername *string `json:"adminUsername,omitempty"` + ComputerName *string `json:"computerName,omitempty"` + LinuxConfiguration *VirtualMachineInstancePropertiesOsProfileLinuxConfiguration `json:"linuxConfiguration,omitempty"` + WindowsConfiguration *VirtualMachineInstancePropertiesOsProfileWindowsConfiguration `json:"windowsConfiguration,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesosprofilelinuxconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesosprofilelinuxconfiguration.go new file mode 100644 index 000000000000..795bef566611 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesosprofilelinuxconfiguration.go @@ -0,0 +1,11 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstancePropertiesOsProfileLinuxConfiguration struct { + DisablePasswordAuthentication *bool `json:"disablePasswordAuthentication,omitempty"` + ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"` + ProvisionVMConfigAgent *bool `json:"provisionVMConfigAgent,omitempty"` + Ssh *SshConfiguration `json:"ssh,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesosprofilewindowsconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesosprofilewindowsconfiguration.go new file mode 100644 index 000000000000..bee8ebecd070 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesosprofilewindowsconfiguration.go @@ -0,0 +1,12 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstancePropertiesOsProfileWindowsConfiguration struct { + EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"` + ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"` + ProvisionVMConfigAgent *bool `json:"provisionVMConfigAgent,omitempty"` + Ssh *SshConfiguration `json:"ssh,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiessecurityprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiessecurityprofile.go new file mode 100644 index 000000000000..606e35a685c6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiessecurityprofile.go @@ -0,0 +1,10 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstancePropertiesSecurityProfile struct { + EnableTPM *bool `json:"enableTPM,omitempty"` + SecurityType *SecurityTypes `json:"securityType,omitempty"` + UefiSettings *VirtualMachineInstancePropertiesSecurityProfileUefiSettings `json:"uefiSettings,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiessecurityprofileuefisettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiessecurityprofileuefisettings.go new file mode 100644 index 000000000000..575c3806034b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiessecurityprofileuefisettings.go @@ -0,0 +1,8 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstancePropertiesSecurityProfileUefiSettings struct { + SecureBootEnabled *bool `json:"secureBootEnabled,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesstorageprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesstorageprofile.go new file mode 100644 index 000000000000..a3ca01aa2f3a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesstorageprofile.go @@ -0,0 +1,11 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstancePropertiesStorageProfile struct { + DataDisks *[]VirtualMachineInstancePropertiesStorageProfileDataDisksInlined `json:"dataDisks,omitempty"` + ImageReference *VirtualMachineInstancePropertiesStorageProfileImageReference `json:"imageReference,omitempty"` + OsDisk *VirtualMachineInstancePropertiesStorageProfileOsDisk `json:"osDisk,omitempty"` + VMConfigStoragePathId *string `json:"vmConfigStoragePathId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesstorageprofiledatadisksinlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesstorageprofiledatadisksinlined.go new file mode 100644 index 000000000000..e53aab331c15 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesstorageprofiledatadisksinlined.go @@ -0,0 +1,8 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstancePropertiesStorageProfileDataDisksInlined struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesstorageprofileimagereference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesstorageprofileimagereference.go new file mode 100644 index 000000000000..e2b09c81d5b7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesstorageprofileimagereference.go @@ -0,0 +1,8 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstancePropertiesStorageProfileImageReference struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesstorageprofileosdisk.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesstorageprofileosdisk.go new file mode 100644 index 000000000000..a2817dfd2941 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancepropertiesstorageprofileosdisk.go @@ -0,0 +1,9 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstancePropertiesStorageProfileOsDisk struct { + Id *string `json:"id,omitempty"` + OsType *OperatingSystemTypes `json:"osType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancestatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancestatus.go new file mode 100644 index 000000000000..692614617be9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancestatus.go @@ -0,0 +1,11 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstanceStatus struct { + ErrorCode *string `json:"errorCode,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + PowerState *PowerStateEnum `json:"powerState,omitempty"` + ProvisioningStatus *VirtualMachineInstanceStatusProvisioningStatus `json:"provisioningStatus,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancestatusprovisioningstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancestatusprovisioningstatus.go new file mode 100644 index 000000000000..01216f610126 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstancestatusprovisioningstatus.go @@ -0,0 +1,9 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstanceStatusProvisioningStatus struct { + OperationId *string `json:"operationId,omitempty"` + Status *Status `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstanceupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstanceupdateproperties.go new file mode 100644 index 000000000000..3cef824dba63 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstanceupdateproperties.go @@ -0,0 +1,11 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstanceUpdateProperties struct { + HardwareProfile *HardwareProfileUpdate `json:"hardwareProfile,omitempty"` + NetworkProfile *NetworkProfileUpdate `json:"networkProfile,omitempty"` + OsProfile *OsProfileUpdate `json:"osProfile,omitempty"` + StorageProfile *StorageProfileUpdate `json:"storageProfile,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstanceupdaterequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstanceupdaterequest.go new file mode 100644 index 000000000000..4bc62e740414 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstanceupdaterequest.go @@ -0,0 +1,13 @@ +package virtualmachineinstances + +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 VirtualMachineInstanceUpdateRequest struct { + Identity *identity.SystemAssigned `json:"identity,omitempty"` + Properties *VirtualMachineInstanceUpdateProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstanceview.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstanceview.go new file mode 100644 index 000000000000..06414a259e59 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/model_virtualmachineinstanceview.go @@ -0,0 +1,8 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstanceView struct { + VMAgent *VirtualMachineConfigAgentInstanceView `json:"vmAgent,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/predicates.go new file mode 100644 index 000000000000..e4d7d84f3570 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/predicates.go @@ -0,0 +1,27 @@ +package virtualmachineinstances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualMachineInstanceOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p VirtualMachineInstanceOperationPredicate) Matches(input VirtualMachineInstance) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + 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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/version.go new file mode 100644 index 000000000000..6fb9ac01a312 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/version.go @@ -0,0 +1,12 @@ +package virtualmachineinstances + +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-01-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineinstances/%s", defaultApiVersion) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 5a0b1ca60086..94b8f6929185 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -269,17 +269,29 @@ github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/typefie github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/usages github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/variable github.com/hashicorp/go-azure-sdk/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings -github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01 -github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/arcsettings -github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/cluster -github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/clusters -github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/extensions -github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/offers -github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/publishers -github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/skuses -github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns -github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updates -github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updatesummaries +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01 +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks +github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/application github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/batchaccount github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/certificate