From 54fb23a550e1dc97b89503de55dfaed90043f91a Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Thu, 23 Nov 2023 10:06:34 +0100 Subject: [PATCH 1/5] `storagecache`: consolidating into a single SDK Client/API Version Both `AzureManagedLustreFileSystem` and `HPCCache` have resources available from the same API Version therefore there's no need to import two different versions of the API - when the newer API version has both. However at the same time since these resource groupings both exist within the same service these should be housed in the same service package. --- internal/clients/client.go | 253 +++++++++--------- .../managed_lustre_file_system_resource.go | 8 +- ...anaged_lustre_file_system_resource_test.go | 2 +- internal/services/hpccache/client/client.go | 37 --- internal/services/hpccache/hpc_cache.go | 4 +- .../hpc_cache_access_policy_resource.go | 8 +- .../hpc_cache_access_policy_resource_test.go | 4 +- .../hpc_cache_blob_nfs_target_resource.go | 8 +- ...hpc_cache_blob_nfs_target_resource_test.go | 4 +- .../hpc_cache_blob_target_resource.go | 8 +- .../hpc_cache_blob_target_resource_test.go | 4 +- .../hpccache/hpc_cache_nfs_target_resource.go | 8 +- .../hpc_cache_nfs_target_resource_test.go | 4 +- .../services/hpccache/hpc_cache_resource.go | 12 +- .../hpccache/hpc_cache_resource_test.go | 4 +- 15 files changed, 163 insertions(+), 205 deletions(-) delete mode 100644 internal/services/hpccache/client/client.go diff --git a/internal/clients/client.go b/internal/clients/client.go index d3bd75d140c7..0c2b8fea02f9 100644 --- a/internal/clients/client.go +++ b/internal/clients/client.go @@ -76,7 +76,6 @@ import ( graph "github.com/hashicorp/terraform-provider-azurerm/internal/services/graphservices/client" hdinsight "github.com/hashicorp/terraform-provider-azurerm/internal/services/hdinsight/client" healthcare "github.com/hashicorp/terraform-provider-azurerm/internal/services/healthcare/client" - hpccache "github.com/hashicorp/terraform-provider-azurerm/internal/services/hpccache/client" hsm "github.com/hashicorp/terraform-provider-azurerm/internal/services/hsm/client" hybridcompute "github.com/hashicorp/terraform-provider-azurerm/internal/services/hybridcompute/client" iotcentral "github.com/hashicorp/terraform-provider-azurerm/internal/services/iotcentral/client" @@ -156,128 +155,127 @@ type Client struct { Account *ResourceManagerAccount Features features.UserFeatures - AadB2c *aadb2c_v2021_04_01_preview.Client - Advisor *advisor.Client - AnalysisServices *analysisservices_v2017_08_01.Client - ApiManagement *apiManagement.Client - AppConfiguration *appConfiguration.Client - AppInsights *applicationInsights.Client - AppPlatform *appPlatform.Client - AppService *appService.Client - ArcKubernetes *arckubernetes.Client - ArcResourceBridge *arcResourceBridge.Client - Attestation *attestation.Client - Authorization *authorization.Client - Automanage *automanage.Client - Automation *automation.Client - AzureManagedLustreFileSystem *storagecache_2023_05_01.Client - AzureStackHCI *azurestackhci_v2023_08_01.Client - Batch *batch.Client - Blueprints *blueprints.Client - Bot *bot.Client - Cdn *cdn.Client - Cognitive *cognitiveServices.Client - Communication *communication.Client - Compute *compute.Client - ConfidentialLedger *confidentialledger.Client - Connections *connections.Client - Consumption *consumption.Client - ContainerApps *containerapps.Client - Containers *containerServices.Client - Cosmos *cosmosdb.Client - CostManagement *costmanagement.Client - CustomProviders *customproviders.Client - Dashboard *dashboard.Client - DatabaseMigration *datamigration.Client - DataBricks *databricks.Client - DataboxEdge *databoxedge.Client - Datadog *datadog_v2021_03_01.Client - DataFactory *datafactory.Client - DataProtection *dataprotection.Client - DataShare *datashare.Client - DesktopVirtualization *desktopvirtualization.Client - DevTestLabs *devtestlabs.Client - DigitalTwins *digitaltwins.Client - Disks *disks.Client - Dns *dns_v2018_05_01.Client - DomainServices *domainservices.Client - Elastic *elastic.Client - EventGrid *eventgrid_v2022_06_15.Client - Eventhub *eventhub.Client - Firewall *firewall.Client - FluidRelay *fluidrelay_2022_05_26.Client - Frontdoor *frontdoor.Client - Graph *graph.Client - HPCCache *hpccache.Client - HSM *hsm.Client - HDInsight *hdinsight.Client - HybridCompute *hybridcompute.Client - HealthCare *healthcare.Client - IoTCentral *iotcentral.Client - IoTHub *iothub.Client - IoTTimeSeriesInsights *timeseriesinsights_v2020_05_15.Client - KeyVault *keyvault.Client - Kusto *kusto.Client - LabService *labservice.Client - Legacy *legacy.Client - Lighthouse *lighthouse.Client - LoadBalancers *loadbalancers.Client - LogAnalytics *loganalytics.Client - Logic *logic.Client - Logz *logz.Client - MachineLearning *machinelearning.Client - Maintenance *maintenance.Client - ManagedApplication *managedapplication.Client - ManagementGroups *managementgroup.Client - Maps *maps.Client - MariaDB *mariadb.Client - Media *media.Client - MixedReality *mixedreality.Client - Monitor *monitor.Client - MobileNetwork *mobilenetwork.Client - MSSQL *mssql.Client - MSSQLManagedInstance *mssqlmanagedinstance.Client - MySQL *mysql.Client - NetApp *netapp.Client - Network *network.Client - NetworkFunction *networkfunction.Client - NewRelic *newrelic.Client - Nginx *nginx2.Client - NotificationHubs *notificationhub.Client - Orbital *orbital.Client - PaloAlto *paloalto.Client - Policy *policy.Client - Portal *portal.Client - Postgres *postgres.Client - PowerBI *powerBI.Client - PrivateDns *privatedns.Client - PrivateDnsResolver *dnsresolver.Client - Purview *purview.Client - RecoveryServices *recoveryServices.Client - Redis *redis_2023_08_01.Client - RedisEnterprise *redisenterprise.Client - Relay *relay.Client - Resource *resource.Client - Search *search.Client - SecurityCenter *securityCenter.Client - Sentinel *sentinel.Client - ServiceBus *serviceBus.Client - ServiceConnector *serviceConnector.Client - ServiceFabric *serviceFabric.Client - ServiceFabricManaged *serviceFabricManaged.Client - ServiceNetworking *servicenetworking_v2023_05_01_preview.Client - SignalR *signalr.Client - Storage *storage.Client - StorageMover *storageMover.Client - StreamAnalytics *streamAnalytics.Client - Subscription *subscription.Client - Sql *sql.Client - Synapse *synapse.Client - TrafficManager *trafficManager.Client - VideoAnalyzer *videoAnalyzer.Client - Vmware *vmware.Client - VoiceServices *voiceServices.Client - Web *web.Client + AadB2c *aadb2c_v2021_04_01_preview.Client + Advisor *advisor.Client + AnalysisServices *analysisservices_v2017_08_01.Client + ApiManagement *apiManagement.Client + AppConfiguration *appConfiguration.Client + AppInsights *applicationInsights.Client + AppPlatform *appPlatform.Client + AppService *appService.Client + ArcKubernetes *arckubernetes.Client + ArcResourceBridge *arcResourceBridge.Client + Attestation *attestation.Client + Authorization *authorization.Client + Automanage *automanage.Client + Automation *automation.Client + AzureStackHCI *azurestackhci_v2023_08_01.Client + Batch *batch.Client + Blueprints *blueprints.Client + Bot *bot.Client + Cdn *cdn.Client + Cognitive *cognitiveServices.Client + Communication *communication.Client + Compute *compute.Client + ConfidentialLedger *confidentialledger.Client + Connections *connections.Client + Consumption *consumption.Client + ContainerApps *containerapps.Client + Containers *containerServices.Client + Cosmos *cosmosdb.Client + CostManagement *costmanagement.Client + CustomProviders *customproviders.Client + Dashboard *dashboard.Client + DatabaseMigration *datamigration.Client + DataBricks *databricks.Client + DataboxEdge *databoxedge.Client + Datadog *datadog_v2021_03_01.Client + DataFactory *datafactory.Client + DataProtection *dataprotection.Client + DataShare *datashare.Client + DesktopVirtualization *desktopvirtualization.Client + DevTestLabs *devtestlabs.Client + DigitalTwins *digitaltwins.Client + Disks *disks.Client + Dns *dns_v2018_05_01.Client + DomainServices *domainservices.Client + Elastic *elastic.Client + EventGrid *eventgrid_v2022_06_15.Client + Eventhub *eventhub.Client + Firewall *firewall.Client + FluidRelay *fluidrelay_2022_05_26.Client + Frontdoor *frontdoor.Client + Graph *graph.Client + HSM *hsm.Client + HDInsight *hdinsight.Client + HybridCompute *hybridcompute.Client + HealthCare *healthcare.Client + IoTCentral *iotcentral.Client + IoTHub *iothub.Client + IoTTimeSeriesInsights *timeseriesinsights_v2020_05_15.Client + KeyVault *keyvault.Client + Kusto *kusto.Client + LabService *labservice.Client + Legacy *legacy.Client + Lighthouse *lighthouse.Client + LoadBalancers *loadbalancers.Client + LogAnalytics *loganalytics.Client + Logic *logic.Client + Logz *logz.Client + MachineLearning *machinelearning.Client + Maintenance *maintenance.Client + ManagedApplication *managedapplication.Client + ManagementGroups *managementgroup.Client + Maps *maps.Client + MariaDB *mariadb.Client + Media *media.Client + MixedReality *mixedreality.Client + Monitor *monitor.Client + MobileNetwork *mobilenetwork.Client + MSSQL *mssql.Client + MSSQLManagedInstance *mssqlmanagedinstance.Client + MySQL *mysql.Client + NetApp *netapp.Client + Network *network.Client + NetworkFunction *networkfunction.Client + NewRelic *newrelic.Client + Nginx *nginx2.Client + NotificationHubs *notificationhub.Client + Orbital *orbital.Client + PaloAlto *paloalto.Client + Policy *policy.Client + Portal *portal.Client + Postgres *postgres.Client + PowerBI *powerBI.Client + PrivateDns *privatedns.Client + PrivateDnsResolver *dnsresolver.Client + Purview *purview.Client + RecoveryServices *recoveryServices.Client + Redis *redis_2023_08_01.Client + RedisEnterprise *redisenterprise.Client + Relay *relay.Client + Resource *resource.Client + Search *search.Client + SecurityCenter *securityCenter.Client + Sentinel *sentinel.Client + ServiceBus *serviceBus.Client + ServiceConnector *serviceConnector.Client + ServiceFabric *serviceFabric.Client + ServiceFabricManaged *serviceFabricManaged.Client + ServiceNetworking *servicenetworking_v2023_05_01_preview.Client + SignalR *signalr.Client + Storage *storage.Client + StorageCache *storagecache_2023_05_01.Client + StorageMover *storageMover.Client + StreamAnalytics *streamAnalytics.Client + Subscription *subscription.Client + Sql *sql.Client + Synapse *synapse.Client + TrafficManager *trafficManager.Client + VideoAnalyzer *videoAnalyzer.Client + Vmware *vmware.Client + VoiceServices *voiceServices.Client + Web *web.Client } // NOTE: it should be possible for this method to become Private once the top level Client's removed @@ -334,9 +332,6 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error if client.Automation, err = automation.NewClient(o); err != nil { return fmt.Errorf("building clients for Automation: %+v", err) } - if client.AzureManagedLustreFileSystem, err = azureManagedLustreFileSystem.NewClient(o); err != nil { - return fmt.Errorf("building clients for Azure Managed Lustre File System: %+v", err) - } if client.AzureStackHCI, err = azureStackHCI.NewClient(o); err != nil { return fmt.Errorf("building clients for AzureStackHCI: %+v", err) } @@ -440,9 +435,6 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error if client.Graph, err = graph.NewClient(o); err != nil { return fmt.Errorf("building clients for Graph: %+v", err) } - if client.HPCCache, err = hpccache.NewClient(o); err != nil { - return fmt.Errorf("building clients for HPC Cache: %+v", err) - } if client.HSM, err = hsm.NewClient(o); err != nil { return fmt.Errorf("building clients for HSM: %+v", err) } @@ -595,6 +587,9 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error if client.Storage, err = storage.NewClient(o); err != nil { return fmt.Errorf("building clients for StorageMover: %+v", err) } + if client.StorageCache, err = azureManagedLustreFileSystem.NewClient(o); err != nil { + return fmt.Errorf("building clients for Azure Managed Lustre File System: %+v", err) + } if client.StorageMover, err = storageMover.NewClient(o); err != nil { return fmt.Errorf("building Storage for StorageMover: %+v", err) } diff --git a/internal/services/azuremanagedlustrefilesystem/managed_lustre_file_system_resource.go b/internal/services/azuremanagedlustrefilesystem/managed_lustre_file_system_resource.go index 293625b1b390..34d38ea3a2ab 100644 --- a/internal/services/azuremanagedlustrefilesystem/managed_lustre_file_system_resource.go +++ b/internal/services/azuremanagedlustrefilesystem/managed_lustre_file_system_resource.go @@ -276,7 +276,7 @@ func (r ManagedLustreFileSystemResource) Create() sdk.ResourceFunc { return fmt.Errorf("decoding: %+v", err) } - client := metadata.Client.AzureManagedLustreFileSystem.AmlFilesystems + client := metadata.Client.StorageCache.AmlFilesystems subscriptionId := metadata.Client.Account.SubscriptionId id := amlfilesystems.NewAmlFilesystemID(subscriptionId, model.ResourceGroupName, model.Name) @@ -325,7 +325,7 @@ func (r ManagedLustreFileSystemResource) Update() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 30 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.AzureManagedLustreFileSystem.AmlFilesystems + client := metadata.Client.StorageCache.AmlFilesystems id, err := amlfilesystems.ParseAmlFilesystemID(metadata.ResourceData.Id()) if err != nil { @@ -366,7 +366,7 @@ func (r ManagedLustreFileSystemResource) Read() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 5 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.AzureManagedLustreFileSystem.AmlFilesystems + client := metadata.Client.StorageCache.AmlFilesystems id, err := amlfilesystems.ParseAmlFilesystemID(metadata.ResourceData.Id()) if err != nil { @@ -421,7 +421,7 @@ func (r ManagedLustreFileSystemResource) Delete() sdk.ResourceFunc { return sdk.ResourceFunc{ Timeout: 30 * time.Minute, Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { - client := metadata.Client.AzureManagedLustreFileSystem.AmlFilesystems + client := metadata.Client.StorageCache.AmlFilesystems id, err := amlfilesystems.ParseAmlFilesystemID(metadata.ResourceData.Id()) if err != nil { diff --git a/internal/services/azuremanagedlustrefilesystem/managed_lustre_file_system_resource_test.go b/internal/services/azuremanagedlustrefilesystem/managed_lustre_file_system_resource_test.go index 568e132fe7a7..b13fca2d9038 100644 --- a/internal/services/azuremanagedlustrefilesystem/managed_lustre_file_system_resource_test.go +++ b/internal/services/azuremanagedlustrefilesystem/managed_lustre_file_system_resource_test.go @@ -90,7 +90,7 @@ func (r ManagedLustreFileSystemResource) Exists(ctx context.Context, clients *cl return nil, err } - client := clients.AzureManagedLustreFileSystem.AmlFilesystems + client := clients.StorageCache.AmlFilesystems resp, err := client.Get(ctx, *id) if err != nil { if response.WasNotFound(resp.HttpResponse) { diff --git a/internal/services/hpccache/client/client.go b/internal/services/hpccache/client/client.go deleted file mode 100644 index 3715971c59a6..000000000000 --- a/internal/services/hpccache/client/client.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package client - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets" - "github.com/hashicorp/terraform-provider-azurerm/internal/common" -) - -type Client struct { - CachesClient *caches.CachesClient - StorageTargetsClient *storagetargets.StorageTargetsClient -} - -func NewClient(o *common.ClientOptions) (*Client, error) { - - cachesClient, err := caches.NewCachesClientWithBaseURI(o.Environment.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building Caches Client: %+v", err) - } - o.Configure(cachesClient.Client, o.Authorizers.ResourceManager) - - storageTargetsClient, err := storagetargets.NewStorageTargetsClientWithBaseURI(o.Environment.ResourceManager) - if err != nil { - return nil, fmt.Errorf("building Storage Targets Client: %+v", err) - } - o.Configure(storageTargetsClient.Client, o.Authorizers.ResourceManager) - - return &Client{ - CachesClient: cachesClient, - StorageTargetsClient: storageTargetsClient, - }, nil -} diff --git a/internal/services/hpccache/hpc_cache.go b/internal/services/hpccache/hpc_cache.go index 89129e648a93..7fad4adac3e8 100644 --- a/internal/services/hpccache/hpc_cache.go +++ b/internal/services/hpccache/hpc_cache.go @@ -9,8 +9,8 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets" + "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/caches" + "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" ) diff --git a/internal/services/hpccache/hpc_cache_access_policy_resource.go b/internal/services/hpccache/hpc_cache_access_policy_resource.go index d3e7e1e66db0..44f2b5d177b8 100644 --- a/internal/services/hpccache/hpc_cache_access_policy_resource.go +++ b/internal/services/hpccache/hpc_cache_access_policy_resource.go @@ -9,7 +9,7 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches" + "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/caches" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" @@ -121,7 +121,7 @@ func resourceHPCCacheAccessPolicy() *pluginsdk.Resource { } func resourceHPCCacheAccessPolicyCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).HPCCache.CachesClient + client := meta.(*clients.Client).StorageCache.Caches ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -186,7 +186,7 @@ func resourceHPCCacheAccessPolicyCreateUpdate(d *pluginsdk.ResourceData, meta in } func resourceHPCCacheAccessPolicyRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).HPCCache.CachesClient + client := meta.(*clients.Client).StorageCache.Caches ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() @@ -249,7 +249,7 @@ func resourceHPCCacheAccessPolicyRead(d *pluginsdk.ResourceData, meta interface{ } func resourceHPCCacheAccessPolicyDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).HPCCache.CachesClient + client := meta.(*clients.Client).StorageCache.Caches ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() diff --git a/internal/services/hpccache/hpc_cache_access_policy_resource_test.go b/internal/services/hpccache/hpc_cache_access_policy_resource_test.go index e8088c3d2d8b..6412ba424e30 100644 --- a/internal/services/hpccache/hpc_cache_access_policy_resource_test.go +++ b/internal/services/hpccache/hpc_cache_access_policy_resource_test.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches" + "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/caches" "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" @@ -96,7 +96,7 @@ func TestAccHPCCacheAccessPolicy_requiresImport(t *testing.T) { } func (r HPCCacheAccessPolicyResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - client := clients.HPCCache.CachesClient + client := clients.StorageCache.Caches id, err := parse.CacheAccessPolicyID(state.ID) if err != nil { diff --git a/internal/services/hpccache/hpc_cache_blob_nfs_target_resource.go b/internal/services/hpccache/hpc_cache_blob_nfs_target_resource.go index 3b1d65a8ef77..3d39159a3d90 100644 --- a/internal/services/hpccache/hpc_cache_blob_nfs_target_resource.go +++ b/internal/services/hpccache/hpc_cache_blob_nfs_target_resource.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets" + "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/hpccache/validate" @@ -99,7 +99,7 @@ func resourceHPCCacheBlobNFSTarget() *pluginsdk.Resource { } func resourceHPCCacheBlobNFSTargetCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).HPCCache.StorageTargetsClient + client := meta.(*clients.Client).StorageCache.StorageTargets subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -155,7 +155,7 @@ func resourceHPCCacheBlobNFSTargetCreateUpdate(d *pluginsdk.ResourceData, meta i } func resourceHPCCacheBlobNFSTargetRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).HPCCache.StorageTargetsClient + client := meta.(*clients.Client).StorageCache.StorageTargets ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() @@ -210,7 +210,7 @@ func resourceHPCCacheBlobNFSTargetRead(d *pluginsdk.ResourceData, meta interface } func resourceHPCCacheBlobNFSTargetDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).HPCCache.StorageTargetsClient + client := meta.(*clients.Client).StorageCache.StorageTargets ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() diff --git a/internal/services/hpccache/hpc_cache_blob_nfs_target_resource_test.go b/internal/services/hpccache/hpc_cache_blob_nfs_target_resource_test.go index b8ad3717589c..b3d9b2b3224b 100644 --- a/internal/services/hpccache/hpc_cache_blob_nfs_target_resource_test.go +++ b/internal/services/hpccache/hpc_cache_blob_nfs_target_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets" + "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets" "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" @@ -134,7 +134,7 @@ func (HPCCacheBlobNFSTargetResource) Exists(ctx context.Context, clients *client return nil, err } - resp, err := clients.HPCCache.StorageTargetsClient.Get(ctx, *id) + resp, err := clients.StorageCache.StorageTargets.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("retrieving HPC Cache Blob Target (%s): %+v", id.String(), err) } diff --git a/internal/services/hpccache/hpc_cache_blob_target_resource.go b/internal/services/hpccache/hpc_cache_blob_target_resource.go index 54896bfff812..8e5b59ac2b98 100644 --- a/internal/services/hpccache/hpc_cache_blob_target_resource.go +++ b/internal/services/hpccache/hpc_cache_blob_target_resource.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets" + "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/hpccache/validate" @@ -81,7 +81,7 @@ func resourceHPCCacheBlobTarget() *pluginsdk.Resource { } func resourceHPCCacheBlobTargetCreateOrUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).HPCCache.StorageTargetsClient + client := meta.(*clients.Client).StorageCache.StorageTargets subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -132,7 +132,7 @@ func resourceHPCCacheBlobTargetCreateOrUpdate(d *pluginsdk.ResourceData, meta in } func resourceHPCCacheBlobTargetRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).HPCCache.StorageTargetsClient + client := meta.(*clients.Client).StorageCache.StorageTargets ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() @@ -185,7 +185,7 @@ func resourceHPCCacheBlobTargetRead(d *pluginsdk.ResourceData, meta interface{}) } func resourceHPCCacheBlobTargetDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).HPCCache.StorageTargetsClient + client := meta.(*clients.Client).StorageCache.StorageTargets ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() diff --git a/internal/services/hpccache/hpc_cache_blob_target_resource_test.go b/internal/services/hpccache/hpc_cache_blob_target_resource_test.go index 441f734edbda..723e03e11a1e 100644 --- a/internal/services/hpccache/hpc_cache_blob_target_resource_test.go +++ b/internal/services/hpccache/hpc_cache_blob_target_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets" + "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets" "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" @@ -112,7 +112,7 @@ func (HPCCacheBlobTargetResource) Exists(ctx context.Context, clients *clients.C return nil, err } - resp, err := clients.HPCCache.StorageTargetsClient.Get(ctx, *id) + resp, err := clients.StorageCache.StorageTargets.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("retrieving HPC Cache Blob Target (%s): %+v", id.String(), err) } diff --git a/internal/services/hpccache/hpc_cache_nfs_target_resource.go b/internal/services/hpccache/hpc_cache_nfs_target_resource.go index 5c159ed97974..55b3227d5cfc 100644 --- a/internal/services/hpccache/hpc_cache_nfs_target_resource.go +++ b/internal/services/hpccache/hpc_cache_nfs_target_resource.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets" + "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/hpccache/validate" @@ -120,7 +120,7 @@ func resourceHPCCacheNFSTarget() *pluginsdk.Resource { } func resourceHPCCacheNFSTargetCreateOrUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).HPCCache.StorageTargetsClient + client := meta.(*clients.Client).StorageCache.StorageTargets subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -163,7 +163,7 @@ func resourceHPCCacheNFSTargetCreateOrUpdate(d *pluginsdk.ResourceData, meta int } func resourceHPCCacheNFSTargetRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).HPCCache.StorageTargetsClient + client := meta.(*clients.Client).StorageCache.StorageTargets ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() @@ -205,7 +205,7 @@ func resourceHPCCacheNFSTargetRead(d *pluginsdk.ResourceData, meta interface{}) } func resourceHPCCacheNFSTargetDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).HPCCache.StorageTargetsClient + client := meta.(*clients.Client).StorageCache.StorageTargets ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() diff --git a/internal/services/hpccache/hpc_cache_nfs_target_resource_test.go b/internal/services/hpccache/hpc_cache_nfs_target_resource_test.go index 31cb33b47659..f79d29a28be7 100644 --- a/internal/services/hpccache/hpc_cache_nfs_target_resource_test.go +++ b/internal/services/hpccache/hpc_cache_nfs_target_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets" + "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets" "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" @@ -162,7 +162,7 @@ func (HPCCacheNFSTargetResource) Exists(ctx context.Context, clients *clients.Cl return nil, err } - resp, err := clients.HPCCache.StorageTargetsClient.Get(ctx, *id) + resp, err := clients.StorageCache.StorageTargets.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("retrieving HPC Cache NFS Target (%s): %+v", id.String(), err) } diff --git a/internal/services/hpccache/hpc_cache_resource.go b/internal/services/hpccache/hpc_cache_resource.go index 329865211519..256b3dc5561f 100644 --- a/internal/services/hpccache/hpc_cache_resource.go +++ b/internal/services/hpccache/hpc_cache_resource.go @@ -18,7 +18,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/storagecache/2023-01-01/caches" + "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/caches" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -55,7 +55,7 @@ func resourceHPCCache() *pluginsdk.Resource { } func resourceHPCCacheCreateOrUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).HPCCache.CachesClient + client := meta.(*clients.Client).StorageCache.Caches keyVaultsClient := meta.(*clients.Client).KeyVault resourcesClient := meta.(*clients.Client).Resource subscriptionId := meta.(*clients.Client).Account.SubscriptionId @@ -248,7 +248,7 @@ func resourceHPCCacheCreateOrUpdate(d *pluginsdk.ResourceData, meta interface{}) d.SetId(id.ID()) // wait for HPC Cache provision state to be succeeded. or further operations with it may fail. - cacheClient := meta.(*clients.Client).HPCCache.CachesClient + cacheClient := meta.(*clients.Client).StorageCache.Caches if _, err = resourceHPCCacheWaitForCreating(ctx, cacheClient, id, d); err != nil { return fmt.Errorf("waiting for the HPC Cache provision state %s (Resource Group: %s) : %+v", name, resourceGroup, err) } @@ -257,7 +257,7 @@ func resourceHPCCacheCreateOrUpdate(d *pluginsdk.ResourceData, meta interface{}) } func resourceHPCCacheRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).HPCCache.CachesClient + client := meta.(*clients.Client).StorageCache.Caches ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() @@ -360,7 +360,7 @@ func resourceHPCCacheRead(d *pluginsdk.ResourceData, meta interface{}) error { } func resourceHPCCacheDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).HPCCache.CachesClient + client := meta.(*clients.Client).StorageCache.Caches ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() @@ -513,7 +513,7 @@ func expandStorageCacheDirectorySettings(d *pluginsdk.ResourceData) *caches.Cach DomainNetBiosName: b["domain_netbios_name"].(string), Credentials: &caches.CacheActiveDirectorySettingsCredentials{ Username: b["username"].(string), - Password: b["password"].(string), + Password: pointer.To(b["password"].(string)), }, }, } diff --git a/internal/services/hpccache/hpc_cache_resource_test.go b/internal/services/hpccache/hpc_cache_resource_test.go index d4e22a52fbc7..340f37410a7c 100644 --- a/internal/services/hpccache/hpc_cache_resource_test.go +++ b/internal/services/hpccache/hpc_cache_resource_test.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches" + "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/caches" "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" @@ -420,7 +420,7 @@ func (HPCCacheResource) Exists(ctx context.Context, clients *clients.Client, sta return nil, err } - resp, err := clients.HPCCache.CachesClient.Get(ctx, *id) + resp, err := clients.StorageCache.Caches.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("retrieving HPC Cache (%s): %+v", id.String(), err) } From d0f3967fab030b90d991eff2c33427ac5b188da6 Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Thu, 23 Nov 2023 10:09:54 +0100 Subject: [PATCH 2/5] `go mod vendor` to remove the older API Version `2023-01-01` --- .../storagecache/2023-01-01/caches/README.md | 257 ---------- .../storagecache/2023-01-01/caches/client.go | 26 - .../2023-01-01/caches/constants.go | 445 ------------------ .../2023-01-01/caches/id_cache.go | 127 ----- .../caches/method_createorupdate.go | 75 --- .../2023-01-01/caches/method_debuginfo.go | 71 --- .../2023-01-01/caches/method_delete.go | 71 --- .../2023-01-01/caches/method_flush.go | 71 --- .../2023-01-01/caches/method_get.go | 51 -- .../2023-01-01/caches/method_list.go | 90 ---- .../caches/method_listbyresourcegroup.go | 90 ---- .../caches/method_pauseprimingjob.go | 74 --- .../caches/method_resumeprimingjob.go | 74 --- .../caches/method_spaceallocation.go | 73 --- .../2023-01-01/caches/method_start.go | 71 --- .../caches/method_startprimingjob.go | 73 --- .../2023-01-01/caches/method_stop.go | 71 --- .../caches/method_stopprimingjob.go | 74 --- .../2023-01-01/caches/method_update.go | 74 --- .../caches/method_upgradefirmware.go | 71 --- .../2023-01-01/caches/model_cache.go | 21 - .../model_cacheactivedirectorysettings.go | 14 - ...cacheactivedirectorysettingscredentials.go | 9 - .../caches/model_cachedirectorysettings.go | 9 - .../caches/model_cacheencryptionsettings.go | 9 - .../2023-01-01/caches/model_cachehealth.go | 10 - .../caches/model_cachenetworksettings.go | 12 - .../caches/model_cacheproperties.go | 25 - .../caches/model_cachesecuritysettings.go | 8 - .../2023-01-01/caches/model_cachesku.go | 8 - .../caches/model_cacheupgradesettings.go | 27 -- .../caches/model_cacheupgradestatus.go | 42 -- .../model_cacheusernamedownloadsettings.go | 19 - ...acheusernamedownloadsettingscredentials.go | 9 - .../2023-01-01/caches/model_condition.go | 27 -- .../caches/model_keyvaultkeyreference.go | 9 - .../model_keyvaultkeyreferencesourcevault.go | 8 - .../caches/model_nfsaccesspolicy.go | 9 - .../2023-01-01/caches/model_nfsaccessrule.go | 15 - .../2023-01-01/caches/model_primingjob.go | 14 - .../caches/model_primingjobidparameter.go | 8 - .../model_storagetargetspaceallocation.go | 9 - .../2023-01-01/caches/predicates.go | 32 -- .../storagecache/2023-01-01/caches/version.go | 12 - .../2023-01-01/storagetargets/README.md | 154 ------ .../2023-01-01/storagetargets/client.go | 26 - .../2023-01-01/storagetargets/constants.go | 157 ------ .../2023-01-01/storagetargets/id_cache.go | 127 ----- .../storagetargets/id_storagetarget.go | 140 ------ .../storagetargets/method_createorupdate.go | 75 --- .../storagetargets/method_delete.go | 99 ---- .../storagetargets/method_dnsrefresh.go | 70 --- .../2023-01-01/storagetargets/method_get.go | 51 -- .../storagetargets/method_listbycache.go | 89 ---- .../storagetargets/method_restoredefaults.go | 70 --- .../method_storagetargetflush.go | 71 --- .../method_storagetargetinvalidate.go | 71 --- .../method_storagetargetresume.go | 71 --- .../method_storagetargetsuspend.go | 71 --- .../storagetargets/model_blobnfstarget.go | 11 - .../storagetargets/model_clfstarget.go | 8 - .../storagetargets/model_namespacejunction.go | 11 - .../storagetargets/model_nfs3target.go | 11 - .../storagetargets/model_storagetarget.go | 17 - .../model_storagetargetproperties.go | 16 - .../storagetargets/model_unknowntarget.go | 8 - .../2023-01-01/storagetargets/predicates.go | 32 -- .../2023-01-01/storagetargets/version.go | 12 - vendor/modules.txt | 2 - 69 files changed, 3864 deletions(-) delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/README.md delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/client.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/constants.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/id_cache.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_createorupdate.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_debuginfo.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_delete.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_flush.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_get.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_list.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_listbyresourcegroup.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_pauseprimingjob.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_resumeprimingjob.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_spaceallocation.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_start.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_startprimingjob.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_stop.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_stopprimingjob.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_update.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_upgradefirmware.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cache.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheactivedirectorysettings.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheactivedirectorysettingscredentials.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachedirectorysettings.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheencryptionsettings.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachehealth.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachenetworksettings.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheproperties.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachesecuritysettings.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachesku.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheupgradesettings.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheupgradestatus.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheusernamedownloadsettings.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheusernamedownloadsettingscredentials.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_condition.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_keyvaultkeyreference.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_keyvaultkeyreferencesourcevault.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_nfsaccesspolicy.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_nfsaccessrule.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_primingjob.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_primingjobidparameter.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_storagetargetspaceallocation.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/predicates.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/version.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/README.md delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/client.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/constants.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/id_cache.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/id_storagetarget.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_createorupdate.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_delete.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_dnsrefresh.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_get.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_listbycache.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_restoredefaults.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_storagetargetflush.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_storagetargetinvalidate.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_storagetargetresume.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_storagetargetsuspend.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_blobnfstarget.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_clfstarget.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_namespacejunction.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_nfs3target.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_storagetarget.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_storagetargetproperties.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_unknowntarget.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/predicates.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/version.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/README.md deleted file mode 100644 index 51b731e01949..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/README.md +++ /dev/null @@ -1,257 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches` Documentation - -The `caches` SDK allows for interaction with the Azure Resource Manager Service `storagecache` (API Version `2023-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/storagecache/2023-01-01/caches" -``` - - -### Client Initialization - -```go -client := caches.NewCachesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `CachesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue") - -payload := caches.Cache{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `CachesClient.DebugInfo` - -```go -ctx := context.TODO() -id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue") - -if err := client.DebugInfoThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `CachesClient.Delete` - -```go -ctx := context.TODO() -id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `CachesClient.Flush` - -```go -ctx := context.TODO() -id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue") - -if err := client.FlushThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `CachesClient.Get` - -```go -ctx := context.TODO() -id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue") - -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: `CachesClient.List` - -```go -ctx := context.TODO() -id := caches.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// 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: `CachesClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := caches.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `CachesClient.PausePrimingJob` - -```go -ctx := context.TODO() -id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue") - -payload := caches.PrimingJobIdParameter{ - // ... -} - - -if err := client.PausePrimingJobThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `CachesClient.ResumePrimingJob` - -```go -ctx := context.TODO() -id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue") - -payload := caches.PrimingJobIdParameter{ - // ... -} - - -if err := client.ResumePrimingJobThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `CachesClient.SpaceAllocation` - -```go -ctx := context.TODO() -id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue") -var payload []StorageTargetSpaceAllocation - -if err := client.SpaceAllocationThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `CachesClient.Start` - -```go -ctx := context.TODO() -id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue") - -if err := client.StartThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `CachesClient.StartPrimingJob` - -```go -ctx := context.TODO() -id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue") - -payload := caches.PrimingJob{ - // ... -} - - -if err := client.StartPrimingJobThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `CachesClient.Stop` - -```go -ctx := context.TODO() -id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue") - -if err := client.StopThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `CachesClient.StopPrimingJob` - -```go -ctx := context.TODO() -id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue") - -payload := caches.PrimingJobIdParameter{ - // ... -} - - -if err := client.StopPrimingJobThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `CachesClient.Update` - -```go -ctx := context.TODO() -id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue") - -payload := caches.Cache{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `CachesClient.UpgradeFirmware` - -```go -ctx := context.TODO() -id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue") - -if err := client.UpgradeFirmwareThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/client.go deleted file mode 100644 index 0502f89bac3d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package caches - -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 CachesClient struct { - Client *resourcemanager.Client -} - -func NewCachesClientWithBaseURI(sdkApi sdkEnv.Api) (*CachesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "caches", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating CachesClient: %+v", err) - } - - return &CachesClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/constants.go deleted file mode 100644 index 8f56b12d2ce2..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/constants.go +++ /dev/null @@ -1,445 +0,0 @@ -package caches - -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 DomainJoinedType string - -const ( - DomainJoinedTypeError DomainJoinedType = "Error" - DomainJoinedTypeNo DomainJoinedType = "No" - DomainJoinedTypeYes DomainJoinedType = "Yes" -) - -func PossibleValuesForDomainJoinedType() []string { - return []string{ - string(DomainJoinedTypeError), - string(DomainJoinedTypeNo), - string(DomainJoinedTypeYes), - } -} - -func (s *DomainJoinedType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDomainJoinedType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDomainJoinedType(input string) (*DomainJoinedType, error) { - vals := map[string]DomainJoinedType{ - "error": DomainJoinedTypeError, - "no": DomainJoinedTypeNo, - "yes": DomainJoinedTypeYes, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DomainJoinedType(input) - return &out, nil -} - -type FirmwareStatusType string - -const ( - FirmwareStatusTypeAvailable FirmwareStatusType = "available" - FirmwareStatusTypeUnavailable FirmwareStatusType = "unavailable" -) - -func PossibleValuesForFirmwareStatusType() []string { - return []string{ - string(FirmwareStatusTypeAvailable), - string(FirmwareStatusTypeUnavailable), - } -} - -func (s *FirmwareStatusType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirmwareStatusType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirmwareStatusType(input string) (*FirmwareStatusType, error) { - vals := map[string]FirmwareStatusType{ - "available": FirmwareStatusTypeAvailable, - "unavailable": FirmwareStatusTypeUnavailable, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirmwareStatusType(input) - return &out, nil -} - -type HealthStateType string - -const ( - HealthStateTypeDegraded HealthStateType = "Degraded" - HealthStateTypeDown HealthStateType = "Down" - HealthStateTypeFlushing HealthStateType = "Flushing" - HealthStateTypeHealthy HealthStateType = "Healthy" - HealthStateTypeStartFailed HealthStateType = "StartFailed" - HealthStateTypeStopped HealthStateType = "Stopped" - HealthStateTypeStopping HealthStateType = "Stopping" - HealthStateTypeTransitioning HealthStateType = "Transitioning" - HealthStateTypeUnknown HealthStateType = "Unknown" - HealthStateTypeUpgradeFailed HealthStateType = "UpgradeFailed" - HealthStateTypeUpgrading HealthStateType = "Upgrading" - HealthStateTypeWaitingForKey HealthStateType = "WaitingForKey" -) - -func PossibleValuesForHealthStateType() []string { - return []string{ - string(HealthStateTypeDegraded), - string(HealthStateTypeDown), - string(HealthStateTypeFlushing), - string(HealthStateTypeHealthy), - string(HealthStateTypeStartFailed), - string(HealthStateTypeStopped), - string(HealthStateTypeStopping), - string(HealthStateTypeTransitioning), - string(HealthStateTypeUnknown), - string(HealthStateTypeUpgradeFailed), - string(HealthStateTypeUpgrading), - string(HealthStateTypeWaitingForKey), - } -} - -func (s *HealthStateType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseHealthStateType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseHealthStateType(input string) (*HealthStateType, error) { - vals := map[string]HealthStateType{ - "degraded": HealthStateTypeDegraded, - "down": HealthStateTypeDown, - "flushing": HealthStateTypeFlushing, - "healthy": HealthStateTypeHealthy, - "startfailed": HealthStateTypeStartFailed, - "stopped": HealthStateTypeStopped, - "stopping": HealthStateTypeStopping, - "transitioning": HealthStateTypeTransitioning, - "unknown": HealthStateTypeUnknown, - "upgradefailed": HealthStateTypeUpgradeFailed, - "upgrading": HealthStateTypeUpgrading, - "waitingforkey": HealthStateTypeWaitingForKey, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := HealthStateType(input) - return &out, nil -} - -type NfsAccessRuleAccess string - -const ( - NfsAccessRuleAccessNo NfsAccessRuleAccess = "no" - NfsAccessRuleAccessRo NfsAccessRuleAccess = "ro" - NfsAccessRuleAccessRw NfsAccessRuleAccess = "rw" -) - -func PossibleValuesForNfsAccessRuleAccess() []string { - return []string{ - string(NfsAccessRuleAccessNo), - string(NfsAccessRuleAccessRo), - string(NfsAccessRuleAccessRw), - } -} - -func (s *NfsAccessRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNfsAccessRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNfsAccessRuleAccess(input string) (*NfsAccessRuleAccess, error) { - vals := map[string]NfsAccessRuleAccess{ - "no": NfsAccessRuleAccessNo, - "ro": NfsAccessRuleAccessRo, - "rw": NfsAccessRuleAccessRw, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NfsAccessRuleAccess(input) - return &out, nil -} - -type NfsAccessRuleScope string - -const ( - NfsAccessRuleScopeDefault NfsAccessRuleScope = "default" - NfsAccessRuleScopeHost NfsAccessRuleScope = "host" - NfsAccessRuleScopeNetwork NfsAccessRuleScope = "network" -) - -func PossibleValuesForNfsAccessRuleScope() []string { - return []string{ - string(NfsAccessRuleScopeDefault), - string(NfsAccessRuleScopeHost), - string(NfsAccessRuleScopeNetwork), - } -} - -func (s *NfsAccessRuleScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNfsAccessRuleScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNfsAccessRuleScope(input string) (*NfsAccessRuleScope, error) { - vals := map[string]NfsAccessRuleScope{ - "default": NfsAccessRuleScopeDefault, - "host": NfsAccessRuleScopeHost, - "network": NfsAccessRuleScopeNetwork, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NfsAccessRuleScope(input) - return &out, nil -} - -type PrimingJobState string - -const ( - PrimingJobStateComplete PrimingJobState = "Complete" - PrimingJobStatePaused PrimingJobState = "Paused" - PrimingJobStateQueued PrimingJobState = "Queued" - PrimingJobStateRunning PrimingJobState = "Running" -) - -func PossibleValuesForPrimingJobState() []string { - return []string{ - string(PrimingJobStateComplete), - string(PrimingJobStatePaused), - string(PrimingJobStateQueued), - string(PrimingJobStateRunning), - } -} - -func (s *PrimingJobState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePrimingJobState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePrimingJobState(input string) (*PrimingJobState, error) { - vals := map[string]PrimingJobState{ - "complete": PrimingJobStateComplete, - "paused": PrimingJobStatePaused, - "queued": PrimingJobStateQueued, - "running": PrimingJobStateRunning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PrimingJobState(input) - return &out, nil -} - -type ProvisioningStateType string - -const ( - ProvisioningStateTypeCancelled ProvisioningStateType = "Cancelled" - ProvisioningStateTypeCreating ProvisioningStateType = "Creating" - ProvisioningStateTypeDeleting ProvisioningStateType = "Deleting" - ProvisioningStateTypeFailed ProvisioningStateType = "Failed" - ProvisioningStateTypeSucceeded ProvisioningStateType = "Succeeded" - ProvisioningStateTypeUpdating ProvisioningStateType = "Updating" -) - -func PossibleValuesForProvisioningStateType() []string { - return []string{ - string(ProvisioningStateTypeCancelled), - string(ProvisioningStateTypeCreating), - string(ProvisioningStateTypeDeleting), - string(ProvisioningStateTypeFailed), - string(ProvisioningStateTypeSucceeded), - string(ProvisioningStateTypeUpdating), - } -} - -func (s *ProvisioningStateType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningStateType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningStateType(input string) (*ProvisioningStateType, error) { - vals := map[string]ProvisioningStateType{ - "cancelled": ProvisioningStateTypeCancelled, - "creating": ProvisioningStateTypeCreating, - "deleting": ProvisioningStateTypeDeleting, - "failed": ProvisioningStateTypeFailed, - "succeeded": ProvisioningStateTypeSucceeded, - "updating": ProvisioningStateTypeUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningStateType(input) - return &out, nil -} - -type UsernameDownloadedType string - -const ( - UsernameDownloadedTypeError UsernameDownloadedType = "Error" - UsernameDownloadedTypeNo UsernameDownloadedType = "No" - UsernameDownloadedTypeYes UsernameDownloadedType = "Yes" -) - -func PossibleValuesForUsernameDownloadedType() []string { - return []string{ - string(UsernameDownloadedTypeError), - string(UsernameDownloadedTypeNo), - string(UsernameDownloadedTypeYes), - } -} - -func (s *UsernameDownloadedType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUsernameDownloadedType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUsernameDownloadedType(input string) (*UsernameDownloadedType, error) { - vals := map[string]UsernameDownloadedType{ - "error": UsernameDownloadedTypeError, - "no": UsernameDownloadedTypeNo, - "yes": UsernameDownloadedTypeYes, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UsernameDownloadedType(input) - return &out, nil -} - -type UsernameSource string - -const ( - UsernameSourceAD UsernameSource = "AD" - UsernameSourceFile UsernameSource = "File" - UsernameSourceLDAP UsernameSource = "LDAP" - UsernameSourceNone UsernameSource = "None" -) - -func PossibleValuesForUsernameSource() []string { - return []string{ - string(UsernameSourceAD), - string(UsernameSourceFile), - string(UsernameSourceLDAP), - string(UsernameSourceNone), - } -} - -func (s *UsernameSource) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUsernameSource(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUsernameSource(input string) (*UsernameSource, error) { - vals := map[string]UsernameSource{ - "ad": UsernameSourceAD, - "file": UsernameSourceFile, - "ldap": UsernameSourceLDAP, - "none": UsernameSourceNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UsernameSource(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/id_cache.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/id_cache.go deleted file mode 100644 index d048b1a7ff57..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/id_cache.go +++ /dev/null @@ -1,127 +0,0 @@ -package caches - -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 = CacheId{} - -// CacheId is a struct representing the Resource ID for a Cache -type CacheId struct { - SubscriptionId string - ResourceGroupName string - CacheName string -} - -// NewCacheID returns a new CacheId struct -func NewCacheID(subscriptionId string, resourceGroupName string, cacheName string) CacheId { - return CacheId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - CacheName: cacheName, - } -} - -// ParseCacheID parses 'input' into a CacheId -func ParseCacheID(input string) (*CacheId, error) { - parser := resourceids.NewParserFromResourceIdType(CacheId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := CacheId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CacheName, ok = parsed.Parsed["cacheName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cacheName", *parsed) - } - - return &id, nil -} - -// ParseCacheIDInsensitively parses 'input' case-insensitively into a CacheId -// note: this method should only be used for API response data and not user input -func ParseCacheIDInsensitively(input string) (*CacheId, error) { - parser := resourceids.NewParserFromResourceIdType(CacheId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := CacheId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CacheName, ok = parsed.Parsed["cacheName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cacheName", *parsed) - } - - return &id, nil -} - -// ValidateCacheID checks that 'input' can be parsed as a Cache ID -func ValidateCacheID(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 := ParseCacheID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Cache ID -func (id CacheId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.StorageCache/caches/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.CacheName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Cache ID -func (id CacheId) 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("staticMicrosoftStorageCache", "Microsoft.StorageCache", "Microsoft.StorageCache"), - resourceids.StaticSegment("staticCaches", "caches", "caches"), - resourceids.UserSpecifiedSegment("cacheName", "cacheValue"), - } -} - -// String returns a human-readable description of this Cache ID -func (id CacheId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cache Name: %q", id.CacheName), - } - return fmt.Sprintf("Cache (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_createorupdate.go deleted file mode 100644 index f847dca09a81..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package caches - -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 -} - -// CreateOrUpdate ... -func (c CachesClient) CreateOrUpdate(ctx context.Context, id CacheId, input Cache) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - 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 CachesClient) CreateOrUpdateThenPoll(ctx context.Context, id CacheId, input Cache) 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/storagecache/2023-01-01/caches/method_debuginfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_debuginfo.go deleted file mode 100644 index 2f7d7d7e5d35..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_debuginfo.go +++ /dev/null @@ -1,71 +0,0 @@ -package caches - -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 DebugInfoOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// DebugInfo ... -func (c CachesClient) DebugInfo(ctx context.Context, id CacheId) (result DebugInfoOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/debugInfo", 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 -} - -// DebugInfoThenPoll performs DebugInfo then polls until it's completed -func (c CachesClient) DebugInfoThenPoll(ctx context.Context, id CacheId) error { - result, err := c.DebugInfo(ctx, id) - if err != nil { - return fmt.Errorf("performing DebugInfo: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after DebugInfo: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_delete.go deleted file mode 100644 index 68c13fe9d3ed..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package caches - -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 CachesClient) Delete(ctx context.Context, id CacheId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - 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 CachesClient) DeleteThenPoll(ctx context.Context, id CacheId) 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/storagecache/2023-01-01/caches/method_flush.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_flush.go deleted file mode 100644 index f48100c40b32..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_flush.go +++ /dev/null @@ -1,71 +0,0 @@ -package caches - -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 FlushOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Flush ... -func (c CachesClient) Flush(ctx context.Context, id CacheId) (result FlushOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/flush", 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 -} - -// FlushThenPoll performs Flush then polls until it's completed -func (c CachesClient) FlushThenPoll(ctx context.Context, id CacheId) error { - result, err := c.Flush(ctx, id) - if err != nil { - return fmt.Errorf("performing Flush: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Flush: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_get.go deleted file mode 100644 index 956728991bfb..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package caches - -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 *Cache -} - -// Get ... -func (c CachesClient) Get(ctx context.Context, id CacheId) (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 - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_list.go deleted file mode 100644 index 3e42da8cb034..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package caches - -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 *[]Cache -} - -type ListCompleteResult struct { - Items []Cache -} - -// List ... -func (c CachesClient) List(ctx context.Context, id commonids.SubscriptionId) (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.StorageCache/caches", 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 *[]Cache `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 CachesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, CacheOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c CachesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate CacheOperationPredicate) (result ListCompleteResult, err error) { - items := make([]Cache, 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{ - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_listbyresourcegroup.go deleted file mode 100644 index a0b28f26c354..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package caches - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Cache -} - -type ListByResourceGroupCompleteResult struct { - Items []Cache -} - -// ListByResourceGroup ... -func (c CachesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.StorageCache/caches", 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 *[]Cache `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c CachesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, CacheOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c CachesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate CacheOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]Cache, 0) - - resp, err := c.ListByResourceGroup(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 = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_pauseprimingjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_pauseprimingjob.go deleted file mode 100644 index 2143408e156e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_pauseprimingjob.go +++ /dev/null @@ -1,74 +0,0 @@ -package caches - -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 PausePrimingJobOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// PausePrimingJob ... -func (c CachesClient) PausePrimingJob(ctx context.Context, id CacheId, input PrimingJobIdParameter) (result PausePrimingJobOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/pausePrimingJob", 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 -} - -// PausePrimingJobThenPoll performs PausePrimingJob then polls until it's completed -func (c CachesClient) PausePrimingJobThenPoll(ctx context.Context, id CacheId, input PrimingJobIdParameter) error { - result, err := c.PausePrimingJob(ctx, id, input) - if err != nil { - return fmt.Errorf("performing PausePrimingJob: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after PausePrimingJob: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_resumeprimingjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_resumeprimingjob.go deleted file mode 100644 index cdf78c14813d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_resumeprimingjob.go +++ /dev/null @@ -1,74 +0,0 @@ -package caches - -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 ResumePrimingJobOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ResumePrimingJob ... -func (c CachesClient) ResumePrimingJob(ctx context.Context, id CacheId, input PrimingJobIdParameter) (result ResumePrimingJobOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/resumePrimingJob", 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 -} - -// ResumePrimingJobThenPoll performs ResumePrimingJob then polls until it's completed -func (c CachesClient) ResumePrimingJobThenPoll(ctx context.Context, id CacheId, input PrimingJobIdParameter) error { - result, err := c.ResumePrimingJob(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ResumePrimingJob: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ResumePrimingJob: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_spaceallocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_spaceallocation.go deleted file mode 100644 index 0c40b20a7ea1..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_spaceallocation.go +++ /dev/null @@ -1,73 +0,0 @@ -package caches - -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 SpaceAllocationOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// SpaceAllocation ... -func (c CachesClient) SpaceAllocation(ctx context.Context, id CacheId, input []StorageTargetSpaceAllocation) (result SpaceAllocationOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/spaceAllocation", 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 -} - -// SpaceAllocationThenPoll performs SpaceAllocation then polls until it's completed -func (c CachesClient) SpaceAllocationThenPoll(ctx context.Context, id CacheId, input []StorageTargetSpaceAllocation) error { - result, err := c.SpaceAllocation(ctx, id, input) - if err != nil { - return fmt.Errorf("performing SpaceAllocation: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after SpaceAllocation: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_start.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_start.go deleted file mode 100644 index 27b018179c2c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_start.go +++ /dev/null @@ -1,71 +0,0 @@ -package caches - -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 StartOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Start ... -func (c CachesClient) Start(ctx context.Context, id CacheId) (result StartOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/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 CachesClient) StartThenPoll(ctx context.Context, id CacheId) 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/storagecache/2023-01-01/caches/method_startprimingjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_startprimingjob.go deleted file mode 100644 index 79c3ebe5003b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_startprimingjob.go +++ /dev/null @@ -1,73 +0,0 @@ -package caches - -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 StartPrimingJobOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StartPrimingJob ... -func (c CachesClient) StartPrimingJob(ctx context.Context, id CacheId, input PrimingJob) (result StartPrimingJobOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/startPrimingJob", 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 -} - -// StartPrimingJobThenPoll performs StartPrimingJob then polls until it's completed -func (c CachesClient) StartPrimingJobThenPoll(ctx context.Context, id CacheId, input PrimingJob) error { - result, err := c.StartPrimingJob(ctx, id, input) - if err != nil { - return fmt.Errorf("performing StartPrimingJob: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StartPrimingJob: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_stop.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_stop.go deleted file mode 100644 index deb00ecf879a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_stop.go +++ /dev/null @@ -1,71 +0,0 @@ -package caches - -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 StopOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Stop ... -func (c CachesClient) Stop(ctx context.Context, id CacheId) (result StopOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/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 CachesClient) StopThenPoll(ctx context.Context, id CacheId) 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/storagecache/2023-01-01/caches/method_stopprimingjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_stopprimingjob.go deleted file mode 100644 index 59f381692d8a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_stopprimingjob.go +++ /dev/null @@ -1,74 +0,0 @@ -package caches - -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 StopPrimingJobOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StopPrimingJob ... -func (c CachesClient) StopPrimingJob(ctx context.Context, id CacheId, input PrimingJobIdParameter) (result StopPrimingJobOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stopPrimingJob", 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 -} - -// StopPrimingJobThenPoll performs StopPrimingJob then polls until it's completed -func (c CachesClient) StopPrimingJobThenPoll(ctx context.Context, id CacheId, input PrimingJobIdParameter) error { - result, err := c.StopPrimingJob(ctx, id, input) - if err != nil { - return fmt.Errorf("performing StopPrimingJob: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StopPrimingJob: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_update.go deleted file mode 100644 index 40c018de4267..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_update.go +++ /dev/null @@ -1,74 +0,0 @@ -package caches - -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 -} - -// Update ... -func (c CachesClient) Update(ctx context.Context, id CacheId, input Cache) (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 CachesClient) UpdateThenPoll(ctx context.Context, id CacheId, input Cache) 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/storagecache/2023-01-01/caches/method_upgradefirmware.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_upgradefirmware.go deleted file mode 100644 index 1cf4338b22fa..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/method_upgradefirmware.go +++ /dev/null @@ -1,71 +0,0 @@ -package caches - -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 UpgradeFirmwareOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// UpgradeFirmware ... -func (c CachesClient) UpgradeFirmware(ctx context.Context, id CacheId) (result UpgradeFirmwareOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusCreated, - http.StatusNoContent, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/upgrade", 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 -} - -// UpgradeFirmwareThenPoll performs UpgradeFirmware then polls until it's completed -func (c CachesClient) UpgradeFirmwareThenPoll(ctx context.Context, id CacheId) error { - result, err := c.UpgradeFirmware(ctx, id) - if err != nil { - return fmt.Errorf("performing UpgradeFirmware: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after UpgradeFirmware: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cache.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cache.go deleted file mode 100644 index ec5f83013247..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cache.go +++ /dev/null @@ -1,21 +0,0 @@ -package caches - -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 Cache struct { - Id *string `json:"id,omitempty"` - Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *CacheProperties `json:"properties,omitempty"` - Sku *CacheSku `json:"sku,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/storagecache/2023-01-01/caches/model_cacheactivedirectorysettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheactivedirectorysettings.go deleted file mode 100644 index b3f3fa18db0c..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheactivedirectorysettings.go +++ /dev/null @@ -1,14 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CacheActiveDirectorySettings struct { - CacheNetBiosName string `json:"cacheNetBiosName"` - Credentials *CacheActiveDirectorySettingsCredentials `json:"credentials,omitempty"` - DomainJoined *DomainJoinedType `json:"domainJoined,omitempty"` - DomainName string `json:"domainName"` - DomainNetBiosName string `json:"domainNetBiosName"` - PrimaryDnsIPAddress string `json:"primaryDnsIpAddress"` - SecondaryDnsIPAddress *string `json:"secondaryDnsIpAddress,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheactivedirectorysettingscredentials.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheactivedirectorysettingscredentials.go deleted file mode 100644 index 20d63763fa0f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheactivedirectorysettingscredentials.go +++ /dev/null @@ -1,9 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CacheActiveDirectorySettingsCredentials struct { - Password string `json:"password"` - Username string `json:"username"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachedirectorysettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachedirectorysettings.go deleted file mode 100644 index f54753212106..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachedirectorysettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CacheDirectorySettings struct { - ActiveDirectory *CacheActiveDirectorySettings `json:"activeDirectory,omitempty"` - UsernameDownload *CacheUsernameDownloadSettings `json:"usernameDownload,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheencryptionsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheencryptionsettings.go deleted file mode 100644 index 764929ae6ea2..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheencryptionsettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CacheEncryptionSettings struct { - KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"` - RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachehealth.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachehealth.go deleted file mode 100644 index d3b11bd12513..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachehealth.go +++ /dev/null @@ -1,10 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CacheHealth struct { - Conditions *[]Condition `json:"conditions,omitempty"` - State *HealthStateType `json:"state,omitempty"` - StatusDescription *string `json:"statusDescription,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachenetworksettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachenetworksettings.go deleted file mode 100644 index b7c9e73a6a63..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachenetworksettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CacheNetworkSettings struct { - DnsSearchDomain *string `json:"dnsSearchDomain,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - Mtu *int64 `json:"mtu,omitempty"` - NtpServer *string `json:"ntpServer,omitempty"` - UtilityAddresses *[]string `json:"utilityAddresses,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheproperties.go deleted file mode 100644 index 80c654fbe57d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheproperties.go +++ /dev/null @@ -1,25 +0,0 @@ -package caches - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CacheProperties struct { - CacheSizeGB *int64 `json:"cacheSizeGB,omitempty"` - DirectoryServicesSettings *CacheDirectorySettings `json:"directoryServicesSettings,omitempty"` - EncryptionSettings *CacheEncryptionSettings `json:"encryptionSettings,omitempty"` - Health *CacheHealth `json:"health,omitempty"` - MountAddresses *[]string `json:"mountAddresses,omitempty"` - NetworkSettings *CacheNetworkSettings `json:"networkSettings,omitempty"` - PrimingJobs *[]PrimingJob `json:"primingJobs,omitempty"` - ProvisioningState *ProvisioningStateType `json:"provisioningState,omitempty"` - SecuritySettings *CacheSecuritySettings `json:"securitySettings,omitempty"` - SpaceAllocation *[]StorageTargetSpaceAllocation `json:"spaceAllocation,omitempty"` - Subnet *string `json:"subnet,omitempty"` - UpgradeSettings *CacheUpgradeSettings `json:"upgradeSettings,omitempty"` - UpgradeStatus *CacheUpgradeStatus `json:"upgradeStatus,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachesecuritysettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachesecuritysettings.go deleted file mode 100644 index bd288b1293a5..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachesecuritysettings.go +++ /dev/null @@ -1,8 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CacheSecuritySettings struct { - AccessPolicies *[]NfsAccessPolicy `json:"accessPolicies,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachesku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachesku.go deleted file mode 100644 index 2e1c71cdc5f7..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cachesku.go +++ /dev/null @@ -1,8 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CacheSku struct { - Name *string `json:"name,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheupgradesettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheupgradesettings.go deleted file mode 100644 index 87eb629f630a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheupgradesettings.go +++ /dev/null @@ -1,27 +0,0 @@ -package caches - -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 CacheUpgradeSettings struct { - ScheduledTime *string `json:"scheduledTime,omitempty"` - UpgradeScheduleEnabled *bool `json:"upgradeScheduleEnabled,omitempty"` -} - -func (o *CacheUpgradeSettings) GetScheduledTimeAsTime() (*time.Time, error) { - if o.ScheduledTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ScheduledTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *CacheUpgradeSettings) SetScheduledTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ScheduledTime = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheupgradestatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheupgradestatus.go deleted file mode 100644 index bcf2d5e2f429..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheupgradestatus.go +++ /dev/null @@ -1,42 +0,0 @@ -package caches - -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 CacheUpgradeStatus struct { - CurrentFirmwareVersion *string `json:"currentFirmwareVersion,omitempty"` - FirmwareUpdateDeadline *string `json:"firmwareUpdateDeadline,omitempty"` - FirmwareUpdateStatus *FirmwareStatusType `json:"firmwareUpdateStatus,omitempty"` - LastFirmwareUpdate *string `json:"lastFirmwareUpdate,omitempty"` - PendingFirmwareVersion *string `json:"pendingFirmwareVersion,omitempty"` -} - -func (o *CacheUpgradeStatus) GetFirmwareUpdateDeadlineAsTime() (*time.Time, error) { - if o.FirmwareUpdateDeadline == nil { - return nil, nil - } - return dates.ParseAsFormat(o.FirmwareUpdateDeadline, "2006-01-02T15:04:05Z07:00") -} - -func (o *CacheUpgradeStatus) SetFirmwareUpdateDeadlineAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.FirmwareUpdateDeadline = &formatted -} - -func (o *CacheUpgradeStatus) GetLastFirmwareUpdateAsTime() (*time.Time, error) { - if o.LastFirmwareUpdate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastFirmwareUpdate, "2006-01-02T15:04:05Z07:00") -} - -func (o *CacheUpgradeStatus) SetLastFirmwareUpdateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastFirmwareUpdate = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheusernamedownloadsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheusernamedownloadsettings.go deleted file mode 100644 index 3bf85af6380d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheusernamedownloadsettings.go +++ /dev/null @@ -1,19 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CacheUsernameDownloadSettings struct { - AutoDownloadCertificate *bool `json:"autoDownloadCertificate,omitempty"` - CaCertificateURI *string `json:"caCertificateURI,omitempty"` - Credentials *CacheUsernameDownloadSettingsCredentials `json:"credentials,omitempty"` - EncryptLdapConnection *bool `json:"encryptLdapConnection,omitempty"` - ExtendedGroups *bool `json:"extendedGroups,omitempty"` - GroupFileURI *string `json:"groupFileURI,omitempty"` - LdapBaseDN *string `json:"ldapBaseDN,omitempty"` - LdapServer *string `json:"ldapServer,omitempty"` - RequireValidCertificate *bool `json:"requireValidCertificate,omitempty"` - UserFileURI *string `json:"userFileURI,omitempty"` - UsernameDownloaded *UsernameDownloadedType `json:"usernameDownloaded,omitempty"` - UsernameSource *UsernameSource `json:"usernameSource,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheusernamedownloadsettingscredentials.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheusernamedownloadsettingscredentials.go deleted file mode 100644 index d3cd2f73e582..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_cacheusernamedownloadsettingscredentials.go +++ /dev/null @@ -1,9 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CacheUsernameDownloadSettingsCredentials struct { - BindDn *string `json:"bindDn,omitempty"` - BindPassword *string `json:"bindPassword,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_condition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_condition.go deleted file mode 100644 index 1f8853b97b86..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_condition.go +++ /dev/null @@ -1,27 +0,0 @@ -package caches - -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 Condition struct { - Message *string `json:"message,omitempty"` - Timestamp *string `json:"timestamp,omitempty"` -} - -func (o *Condition) GetTimestampAsTime() (*time.Time, error) { - if o.Timestamp == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Timestamp, "2006-01-02T15:04:05Z07:00") -} - -func (o *Condition) SetTimestampAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Timestamp = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_keyvaultkeyreference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_keyvaultkeyreference.go deleted file mode 100644 index b5e432d0e6f4..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_keyvaultkeyreference.go +++ /dev/null @@ -1,9 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type KeyVaultKeyReference struct { - KeyUrl string `json:"keyUrl"` - SourceVault KeyVaultKeyReferenceSourceVault `json:"sourceVault"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_keyvaultkeyreferencesourcevault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_keyvaultkeyreferencesourcevault.go deleted file mode 100644 index b40bced4f85d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_keyvaultkeyreferencesourcevault.go +++ /dev/null @@ -1,8 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type KeyVaultKeyReferenceSourceVault struct { - Id *string `json:"id,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_nfsaccesspolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_nfsaccesspolicy.go deleted file mode 100644 index 0c7abc41b768..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_nfsaccesspolicy.go +++ /dev/null @@ -1,9 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NfsAccessPolicy struct { - AccessRules []NfsAccessRule `json:"accessRules"` - Name string `json:"name"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_nfsaccessrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_nfsaccessrule.go deleted file mode 100644 index 55683cce978e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_nfsaccessrule.go +++ /dev/null @@ -1,15 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NfsAccessRule struct { - Access NfsAccessRuleAccess `json:"access"` - AnonymousGID *string `json:"anonymousGID,omitempty"` - AnonymousUID *string `json:"anonymousUID,omitempty"` - Filter *string `json:"filter,omitempty"` - RootSquash *bool `json:"rootSquash,omitempty"` - Scope NfsAccessRuleScope `json:"scope"` - SubmountAccess *bool `json:"submountAccess,omitempty"` - Suid *bool `json:"suid,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_primingjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_primingjob.go deleted file mode 100644 index 7050afae80cf..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_primingjob.go +++ /dev/null @@ -1,14 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrimingJob struct { - PrimingJobDetails *string `json:"primingJobDetails,omitempty"` - PrimingJobId *string `json:"primingJobId,omitempty"` - PrimingJobName string `json:"primingJobName"` - PrimingJobPercentComplete *float64 `json:"primingJobPercentComplete,omitempty"` - PrimingJobState *PrimingJobState `json:"primingJobState,omitempty"` - PrimingJobStatus *string `json:"primingJobStatus,omitempty"` - PrimingManifestUrl string `json:"primingManifestUrl"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_primingjobidparameter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_primingjobidparameter.go deleted file mode 100644 index bcdefcadf6a4..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_primingjobidparameter.go +++ /dev/null @@ -1,8 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrimingJobIdParameter struct { - PrimingJobId string `json:"primingJobId"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_storagetargetspaceallocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_storagetargetspaceallocation.go deleted file mode 100644 index d0787a3a423b..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/model_storagetargetspaceallocation.go +++ /dev/null @@ -1,9 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StorageTargetSpaceAllocation struct { - AllocationPercentage *int64 `json:"allocationPercentage,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/predicates.go deleted file mode 100644 index 67fc4aa4f866..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package caches - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CacheOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p CacheOperationPredicate) Matches(input Cache) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.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/storagecache/2023-01-01/caches/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/version.go deleted file mode 100644 index 4b6961f69bb5..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package caches - -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-01-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/caches/%s", defaultApiVersion) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/README.md deleted file mode 100644 index c83e713b1aec..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/README.md +++ /dev/null @@ -1,154 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets` Documentation - -The `storagetargets` SDK allows for interaction with the Azure Resource Manager Service `storagecache` (API Version `2023-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/storagecache/2023-01-01/storagetargets" -``` - - -### Client Initialization - -```go -client := storagetargets.NewStorageTargetsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `StorageTargetsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := storagetargets.NewStorageTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue", "storageTargetValue") - -payload := storagetargets.StorageTarget{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `StorageTargetsClient.Delete` - -```go -ctx := context.TODO() -id := storagetargets.NewStorageTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue", "storageTargetValue") - -if err := client.DeleteThenPoll(ctx, id, storagetargets.DefaultDeleteOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `StorageTargetsClient.DnsRefresh` - -```go -ctx := context.TODO() -id := storagetargets.NewStorageTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue", "storageTargetValue") - -if err := client.DnsRefreshThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `StorageTargetsClient.Get` - -```go -ctx := context.TODO() -id := storagetargets.NewStorageTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue", "storageTargetValue") - -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: `StorageTargetsClient.ListByCache` - -```go -ctx := context.TODO() -id := storagetargets.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue") - -// alternatively `client.ListByCache(ctx, id)` can be used to do batched pagination -items, err := client.ListByCacheComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `StorageTargetsClient.RestoreDefaults` - -```go -ctx := context.TODO() -id := storagetargets.NewStorageTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue", "storageTargetValue") - -if err := client.RestoreDefaultsThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `StorageTargetsClient.StorageTargetFlush` - -```go -ctx := context.TODO() -id := storagetargets.NewStorageTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue", "storageTargetValue") - -if err := client.StorageTargetFlushThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `StorageTargetsClient.StorageTargetInvalidate` - -```go -ctx := context.TODO() -id := storagetargets.NewStorageTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue", "storageTargetValue") - -if err := client.StorageTargetInvalidateThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `StorageTargetsClient.StorageTargetResume` - -```go -ctx := context.TODO() -id := storagetargets.NewStorageTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue", "storageTargetValue") - -if err := client.StorageTargetResumeThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `StorageTargetsClient.StorageTargetSuspend` - -```go -ctx := context.TODO() -id := storagetargets.NewStorageTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue", "storageTargetValue") - -if err := client.StorageTargetSuspendThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/client.go deleted file mode 100644 index 06219399bc45..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package storagetargets - -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 StorageTargetsClient struct { - Client *resourcemanager.Client -} - -func NewStorageTargetsClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageTargetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storagetargets", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating StorageTargetsClient: %+v", err) - } - - return &StorageTargetsClient{ - Client: client, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/constants.go deleted file mode 100644 index 922dc4cd28fe..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/constants.go +++ /dev/null @@ -1,157 +0,0 @@ -package storagetargets - -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 OperationalStateType string - -const ( - OperationalStateTypeBusy OperationalStateType = "Busy" - OperationalStateTypeFlushing OperationalStateType = "Flushing" - OperationalStateTypeReady OperationalStateType = "Ready" - OperationalStateTypeSuspended OperationalStateType = "Suspended" -) - -func PossibleValuesForOperationalStateType() []string { - return []string{ - string(OperationalStateTypeBusy), - string(OperationalStateTypeFlushing), - string(OperationalStateTypeReady), - string(OperationalStateTypeSuspended), - } -} - -func (s *OperationalStateType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOperationalStateType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOperationalStateType(input string) (*OperationalStateType, error) { - vals := map[string]OperationalStateType{ - "busy": OperationalStateTypeBusy, - "flushing": OperationalStateTypeFlushing, - "ready": OperationalStateTypeReady, - "suspended": OperationalStateTypeSuspended, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OperationalStateType(input) - return &out, nil -} - -type ProvisioningStateType string - -const ( - ProvisioningStateTypeCancelled ProvisioningStateType = "Cancelled" - ProvisioningStateTypeCreating ProvisioningStateType = "Creating" - ProvisioningStateTypeDeleting ProvisioningStateType = "Deleting" - ProvisioningStateTypeFailed ProvisioningStateType = "Failed" - ProvisioningStateTypeSucceeded ProvisioningStateType = "Succeeded" - ProvisioningStateTypeUpdating ProvisioningStateType = "Updating" -) - -func PossibleValuesForProvisioningStateType() []string { - return []string{ - string(ProvisioningStateTypeCancelled), - string(ProvisioningStateTypeCreating), - string(ProvisioningStateTypeDeleting), - string(ProvisioningStateTypeFailed), - string(ProvisioningStateTypeSucceeded), - string(ProvisioningStateTypeUpdating), - } -} - -func (s *ProvisioningStateType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningStateType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningStateType(input string) (*ProvisioningStateType, error) { - vals := map[string]ProvisioningStateType{ - "cancelled": ProvisioningStateTypeCancelled, - "creating": ProvisioningStateTypeCreating, - "deleting": ProvisioningStateTypeDeleting, - "failed": ProvisioningStateTypeFailed, - "succeeded": ProvisioningStateTypeSucceeded, - "updating": ProvisioningStateTypeUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningStateType(input) - return &out, nil -} - -type StorageTargetType string - -const ( - StorageTargetTypeBlobNfs StorageTargetType = "blobNfs" - StorageTargetTypeClfs StorageTargetType = "clfs" - StorageTargetTypeNfsThree StorageTargetType = "nfs3" - StorageTargetTypeUnknown StorageTargetType = "unknown" -) - -func PossibleValuesForStorageTargetType() []string { - return []string{ - string(StorageTargetTypeBlobNfs), - string(StorageTargetTypeClfs), - string(StorageTargetTypeNfsThree), - string(StorageTargetTypeUnknown), - } -} - -func (s *StorageTargetType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStorageTargetType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStorageTargetType(input string) (*StorageTargetType, error) { - vals := map[string]StorageTargetType{ - "blobnfs": StorageTargetTypeBlobNfs, - "clfs": StorageTargetTypeClfs, - "nfs3": StorageTargetTypeNfsThree, - "unknown": StorageTargetTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StorageTargetType(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/id_cache.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/id_cache.go deleted file mode 100644 index 383376c605be..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/id_cache.go +++ /dev/null @@ -1,127 +0,0 @@ -package storagetargets - -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 = CacheId{} - -// CacheId is a struct representing the Resource ID for a Cache -type CacheId struct { - SubscriptionId string - ResourceGroupName string - CacheName string -} - -// NewCacheID returns a new CacheId struct -func NewCacheID(subscriptionId string, resourceGroupName string, cacheName string) CacheId { - return CacheId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - CacheName: cacheName, - } -} - -// ParseCacheID parses 'input' into a CacheId -func ParseCacheID(input string) (*CacheId, error) { - parser := resourceids.NewParserFromResourceIdType(CacheId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := CacheId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CacheName, ok = parsed.Parsed["cacheName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cacheName", *parsed) - } - - return &id, nil -} - -// ParseCacheIDInsensitively parses 'input' case-insensitively into a CacheId -// note: this method should only be used for API response data and not user input -func ParseCacheIDInsensitively(input string) (*CacheId, error) { - parser := resourceids.NewParserFromResourceIdType(CacheId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := CacheId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CacheName, ok = parsed.Parsed["cacheName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cacheName", *parsed) - } - - return &id, nil -} - -// ValidateCacheID checks that 'input' can be parsed as a Cache ID -func ValidateCacheID(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 := ParseCacheID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Cache ID -func (id CacheId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.StorageCache/caches/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.CacheName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Cache ID -func (id CacheId) 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("staticMicrosoftStorageCache", "Microsoft.StorageCache", "Microsoft.StorageCache"), - resourceids.StaticSegment("staticCaches", "caches", "caches"), - resourceids.UserSpecifiedSegment("cacheName", "cacheValue"), - } -} - -// String returns a human-readable description of this Cache ID -func (id CacheId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cache Name: %q", id.CacheName), - } - return fmt.Sprintf("Cache (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/id_storagetarget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/id_storagetarget.go deleted file mode 100644 index d3b75b75d477..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/id_storagetarget.go +++ /dev/null @@ -1,140 +0,0 @@ -package storagetargets - -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 = StorageTargetId{} - -// StorageTargetId is a struct representing the Resource ID for a Storage Target -type StorageTargetId struct { - SubscriptionId string - ResourceGroupName string - CacheName string - StorageTargetName string -} - -// NewStorageTargetID returns a new StorageTargetId struct -func NewStorageTargetID(subscriptionId string, resourceGroupName string, cacheName string, storageTargetName string) StorageTargetId { - return StorageTargetId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - CacheName: cacheName, - StorageTargetName: storageTargetName, - } -} - -// ParseStorageTargetID parses 'input' into a StorageTargetId -func ParseStorageTargetID(input string) (*StorageTargetId, error) { - parser := resourceids.NewParserFromResourceIdType(StorageTargetId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := StorageTargetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CacheName, ok = parsed.Parsed["cacheName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cacheName", *parsed) - } - - if id.StorageTargetName, ok = parsed.Parsed["storageTargetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageTargetName", *parsed) - } - - return &id, nil -} - -// ParseStorageTargetIDInsensitively parses 'input' case-insensitively into a StorageTargetId -// note: this method should only be used for API response data and not user input -func ParseStorageTargetIDInsensitively(input string) (*StorageTargetId, error) { - parser := resourceids.NewParserFromResourceIdType(StorageTargetId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := StorageTargetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CacheName, ok = parsed.Parsed["cacheName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cacheName", *parsed) - } - - if id.StorageTargetName, ok = parsed.Parsed["storageTargetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "storageTargetName", *parsed) - } - - return &id, nil -} - -// ValidateStorageTargetID checks that 'input' can be parsed as a Storage Target ID -func ValidateStorageTargetID(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 := ParseStorageTargetID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Storage Target ID -func (id StorageTargetId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.StorageCache/caches/%s/storageTargets/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.CacheName, id.StorageTargetName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Storage Target ID -func (id StorageTargetId) 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("staticMicrosoftStorageCache", "Microsoft.StorageCache", "Microsoft.StorageCache"), - resourceids.StaticSegment("staticCaches", "caches", "caches"), - resourceids.UserSpecifiedSegment("cacheName", "cacheValue"), - resourceids.StaticSegment("staticStorageTargets", "storageTargets", "storageTargets"), - resourceids.UserSpecifiedSegment("storageTargetName", "storageTargetValue"), - } -} - -// String returns a human-readable description of this Storage Target ID -func (id StorageTargetId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cache Name: %q", id.CacheName), - fmt.Sprintf("Storage Target Name: %q", id.StorageTargetName), - } - return fmt.Sprintf("Storage Target (%s)", strings.Join(components, "\n")) -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_createorupdate.go deleted file mode 100644 index e625aea6a53a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package storagetargets - -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 -} - -// CreateOrUpdate ... -func (c StorageTargetsClient) CreateOrUpdate(ctx context.Context, id StorageTargetId, input StorageTarget) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - 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 StorageTargetsClient) CreateOrUpdateThenPoll(ctx context.Context, id StorageTargetId, input StorageTarget) 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/storagecache/2023-01-01/storagetargets/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_delete.go deleted file mode 100644 index 504473e8fd31..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_delete.go +++ /dev/null @@ -1,99 +0,0 @@ -package storagetargets - -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 -} - -type DeleteOperationOptions struct { - Force *string -} - -func DefaultDeleteOperationOptions() DeleteOperationOptions { - return DeleteOperationOptions{} -} - -func (o DeleteOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o DeleteOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o DeleteOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Force != nil { - out.Append("force", fmt.Sprintf("%v", *o.Force)) - } - return &out -} - -// Delete ... -func (c StorageTargetsClient) Delete(ctx context.Context, id StorageTargetId, options DeleteOperationOptions) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - OptionsObject: options, - } - - 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 StorageTargetsClient) DeleteThenPoll(ctx context.Context, id StorageTargetId, options DeleteOperationOptions) error { - result, err := c.Delete(ctx, id, options) - 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/storagecache/2023-01-01/storagetargets/method_dnsrefresh.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_dnsrefresh.go deleted file mode 100644 index bbee43e3e1ab..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_dnsrefresh.go +++ /dev/null @@ -1,70 +0,0 @@ -package storagetargets - -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 DnsRefreshOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// DnsRefresh ... -func (c StorageTargetsClient) DnsRefresh(ctx context.Context, id StorageTargetId) (result DnsRefreshOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/dnsRefresh", 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 -} - -// DnsRefreshThenPoll performs DnsRefresh then polls until it's completed -func (c StorageTargetsClient) DnsRefreshThenPoll(ctx context.Context, id StorageTargetId) error { - result, err := c.DnsRefresh(ctx, id) - if err != nil { - return fmt.Errorf("performing DnsRefresh: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after DnsRefresh: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_get.go deleted file mode 100644 index 96f0f3baf8f4..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package storagetargets - -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 *StorageTarget -} - -// Get ... -func (c StorageTargetsClient) Get(ctx context.Context, id StorageTargetId) (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 - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_listbycache.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_listbycache.go deleted file mode 100644 index 97795a568f0d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_listbycache.go +++ /dev/null @@ -1,89 +0,0 @@ -package storagetargets - -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 ListByCacheOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]StorageTarget -} - -type ListByCacheCompleteResult struct { - Items []StorageTarget -} - -// ListByCache ... -func (c StorageTargetsClient) ListByCache(ctx context.Context, id CacheId) (result ListByCacheOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/storageTargets", 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 *[]StorageTarget `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByCacheComplete retrieves all the results into a single object -func (c StorageTargetsClient) ListByCacheComplete(ctx context.Context, id CacheId) (ListByCacheCompleteResult, error) { - return c.ListByCacheCompleteMatchingPredicate(ctx, id, StorageTargetOperationPredicate{}) -} - -// ListByCacheCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c StorageTargetsClient) ListByCacheCompleteMatchingPredicate(ctx context.Context, id CacheId, predicate StorageTargetOperationPredicate) (result ListByCacheCompleteResult, err error) { - items := make([]StorageTarget, 0) - - resp, err := c.ListByCache(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 = ListByCacheCompleteResult{ - Items: items, - } - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_restoredefaults.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_restoredefaults.go deleted file mode 100644 index e04112416ca0..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_restoredefaults.go +++ /dev/null @@ -1,70 +0,0 @@ -package storagetargets - -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 RestoreDefaultsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// RestoreDefaults ... -func (c StorageTargetsClient) RestoreDefaults(ctx context.Context, id StorageTargetId) (result RestoreDefaultsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/restoreDefaults", 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 -} - -// RestoreDefaultsThenPoll performs RestoreDefaults then polls until it's completed -func (c StorageTargetsClient) RestoreDefaultsThenPoll(ctx context.Context, id StorageTargetId) error { - result, err := c.RestoreDefaults(ctx, id) - if err != nil { - return fmt.Errorf("performing RestoreDefaults: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after RestoreDefaults: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_storagetargetflush.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_storagetargetflush.go deleted file mode 100644 index 5efd48cf8fb6..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_storagetargetflush.go +++ /dev/null @@ -1,71 +0,0 @@ -package storagetargets - -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 StorageTargetFlushOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StorageTargetFlush ... -func (c StorageTargetsClient) StorageTargetFlush(ctx context.Context, id StorageTargetId) (result StorageTargetFlushOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/flush", 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 -} - -// StorageTargetFlushThenPoll performs StorageTargetFlush then polls until it's completed -func (c StorageTargetsClient) StorageTargetFlushThenPoll(ctx context.Context, id StorageTargetId) error { - result, err := c.StorageTargetFlush(ctx, id) - if err != nil { - return fmt.Errorf("performing StorageTargetFlush: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StorageTargetFlush: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_storagetargetinvalidate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_storagetargetinvalidate.go deleted file mode 100644 index 35f6d7277f4d..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_storagetargetinvalidate.go +++ /dev/null @@ -1,71 +0,0 @@ -package storagetargets - -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 StorageTargetInvalidateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StorageTargetInvalidate ... -func (c StorageTargetsClient) StorageTargetInvalidate(ctx context.Context, id StorageTargetId) (result StorageTargetInvalidateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/invalidate", 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 -} - -// StorageTargetInvalidateThenPoll performs StorageTargetInvalidate then polls until it's completed -func (c StorageTargetsClient) StorageTargetInvalidateThenPoll(ctx context.Context, id StorageTargetId) error { - result, err := c.StorageTargetInvalidate(ctx, id) - if err != nil { - return fmt.Errorf("performing StorageTargetInvalidate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StorageTargetInvalidate: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_storagetargetresume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_storagetargetresume.go deleted file mode 100644 index 92af63d5779a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_storagetargetresume.go +++ /dev/null @@ -1,71 +0,0 @@ -package storagetargets - -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 StorageTargetResumeOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StorageTargetResume ... -func (c StorageTargetsClient) StorageTargetResume(ctx context.Context, id StorageTargetId) (result StorageTargetResumeOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/resume", 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 -} - -// StorageTargetResumeThenPoll performs StorageTargetResume then polls until it's completed -func (c StorageTargetsClient) StorageTargetResumeThenPoll(ctx context.Context, id StorageTargetId) error { - result, err := c.StorageTargetResume(ctx, id) - if err != nil { - return fmt.Errorf("performing StorageTargetResume: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StorageTargetResume: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_storagetargetsuspend.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_storagetargetsuspend.go deleted file mode 100644 index 72981e955bb6..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/method_storagetargetsuspend.go +++ /dev/null @@ -1,71 +0,0 @@ -package storagetargets - -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 StorageTargetSuspendOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StorageTargetSuspend ... -func (c StorageTargetsClient) StorageTargetSuspend(ctx context.Context, id StorageTargetId) (result StorageTargetSuspendOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/suspend", 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 -} - -// StorageTargetSuspendThenPoll performs StorageTargetSuspend then polls until it's completed -func (c StorageTargetsClient) StorageTargetSuspendThenPoll(ctx context.Context, id StorageTargetId) error { - result, err := c.StorageTargetSuspend(ctx, id) - if err != nil { - return fmt.Errorf("performing StorageTargetSuspend: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StorageTargetSuspend: %+v", err) - } - - return nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_blobnfstarget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_blobnfstarget.go deleted file mode 100644 index 0ae0d625095e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_blobnfstarget.go +++ /dev/null @@ -1,11 +0,0 @@ -package storagetargets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BlobNfsTarget struct { - Target *string `json:"target,omitempty"` - UsageModel *string `json:"usageModel,omitempty"` - VerificationTimer *int64 `json:"verificationTimer,omitempty"` - WriteBackTimer *int64 `json:"writeBackTimer,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_clfstarget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_clfstarget.go deleted file mode 100644 index c9be9c2c727a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_clfstarget.go +++ /dev/null @@ -1,8 +0,0 @@ -package storagetargets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClfsTarget struct { - Target *string `json:"target,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_namespacejunction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_namespacejunction.go deleted file mode 100644 index 4a8c7fb416f8..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_namespacejunction.go +++ /dev/null @@ -1,11 +0,0 @@ -package storagetargets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NamespaceJunction struct { - NamespacePath *string `json:"namespacePath,omitempty"` - NfsAccessPolicy *string `json:"nfsAccessPolicy,omitempty"` - NfsExport *string `json:"nfsExport,omitempty"` - TargetPath *string `json:"targetPath,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_nfs3target.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_nfs3target.go deleted file mode 100644 index 356a47c8feff..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_nfs3target.go +++ /dev/null @@ -1,11 +0,0 @@ -package storagetargets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Nfs3Target struct { - Target *string `json:"target,omitempty"` - UsageModel *string `json:"usageModel,omitempty"` - VerificationTimer *int64 `json:"verificationTimer,omitempty"` - WriteBackTimer *int64 `json:"writeBackTimer,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_storagetarget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_storagetarget.go deleted file mode 100644 index f2ade44f92eb..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_storagetarget.go +++ /dev/null @@ -1,17 +0,0 @@ -package storagetargets - -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 StorageTarget struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *StorageTargetProperties `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/storagecache/2023-01-01/storagetargets/model_storagetargetproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_storagetargetproperties.go deleted file mode 100644 index e53a0d72ddbf..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_storagetargetproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package storagetargets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StorageTargetProperties struct { - AllocationPercentage *int64 `json:"allocationPercentage,omitempty"` - BlobNfs *BlobNfsTarget `json:"blobNfs,omitempty"` - Clfs *ClfsTarget `json:"clfs,omitempty"` - Junctions *[]NamespaceJunction `json:"junctions,omitempty"` - Nfs3 *Nfs3Target `json:"nfs3,omitempty"` - ProvisioningState *ProvisioningStateType `json:"provisioningState,omitempty"` - State *OperationalStateType `json:"state,omitempty"` - TargetType StorageTargetType `json:"targetType"` - Unknown *UnknownTarget `json:"unknown,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_unknowntarget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_unknowntarget.go deleted file mode 100644 index 546e0cbdf771..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/model_unknowntarget.go +++ /dev/null @@ -1,8 +0,0 @@ -package storagetargets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UnknownTarget struct { - Attributes *map[string]string `json:"attributes,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/predicates.go deleted file mode 100644 index 30c9e142fd1e..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package storagetargets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StorageTargetOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p StorageTargetOperationPredicate) Matches(input StorageTarget) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.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/storagecache/2023-01-01/storagetargets/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/version.go deleted file mode 100644 index c2806858334f..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package storagetargets - -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-01-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storagetargets/%s", defaultApiVersion) -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 704ccdde4a26..60afcecf0b50 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -934,8 +934,6 @@ github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/skus github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/storageaccounts github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/tableservice github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/tableserviceproperties -github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/caches -github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-01-01/storagetargets github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01 github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/amlfilesystems github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/ascusages From 3d525c34d34f4f0f1a174bb63512edb89639f669 Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Thu, 23 Nov 2023 10:20:00 +0100 Subject: [PATCH 3/5] refactor: consolidating `azuremanagedlustrefilesystem` into `hpccache` for now This'll get renamed to `storagecache` shortly --- internal/clients/client.go | 6 ++-- internal/provider/services.go | 3 +- .../registration.go | 35 ------------------- .../client/client.go | 0 .../managed_lustre_file_system_resource.go | 4 +-- ...anaged_lustre_file_system_resource_test.go | 2 +- internal/services/hpccache/registration.go | 22 ++++++++---- .../validate/import_prefix.go | 0 .../validate/import_prefix_test.go | 0 .../managed_lustre_file_system_name.go | 0 .../managed_lustre_file_system_name_test.go | 0 .../validate/time_of_day_in_utc.go | 0 .../validate/time_of_day_in_utc_test.go | 0 13 files changed, 23 insertions(+), 49 deletions(-) delete mode 100644 internal/services/azuremanagedlustrefilesystem/registration.go rename internal/services/{azuremanagedlustrefilesystem => hpccache}/client/client.go (100%) rename internal/services/{azuremanagedlustrefilesystem => hpccache}/managed_lustre_file_system_resource.go (99%) rename internal/services/{azuremanagedlustrefilesystem => hpccache}/managed_lustre_file_system_resource_test.go (99%) rename internal/services/{azuremanagedlustrefilesystem => hpccache}/validate/import_prefix.go (100%) rename internal/services/{azuremanagedlustrefilesystem => hpccache}/validate/import_prefix_test.go (100%) rename internal/services/{azuremanagedlustrefilesystem => hpccache}/validate/managed_lustre_file_system_name.go (100%) rename internal/services/{azuremanagedlustrefilesystem => hpccache}/validate/managed_lustre_file_system_name_test.go (100%) rename internal/services/{azuremanagedlustrefilesystem => hpccache}/validate/time_of_day_in_utc.go (100%) rename internal/services/{azuremanagedlustrefilesystem => hpccache}/validate/time_of_day_in_utc_test.go (100%) diff --git a/internal/clients/client.go b/internal/clients/client.go index 0c2b8fea02f9..bd27153bddc1 100644 --- a/internal/clients/client.go +++ b/internal/clients/client.go @@ -36,7 +36,6 @@ import ( authorization "github.com/hashicorp/terraform-provider-azurerm/internal/services/authorization/client" automanage "github.com/hashicorp/terraform-provider-azurerm/internal/services/automanage/client" automation "github.com/hashicorp/terraform-provider-azurerm/internal/services/automation/client" - azureManagedLustreFileSystem "github.com/hashicorp/terraform-provider-azurerm/internal/services/azuremanagedlustrefilesystem/client" azureStackHCI "github.com/hashicorp/terraform-provider-azurerm/internal/services/azurestackhci/client" batch "github.com/hashicorp/terraform-provider-azurerm/internal/services/batch/client" blueprints "github.com/hashicorp/terraform-provider-azurerm/internal/services/blueprints/client" @@ -76,6 +75,7 @@ import ( graph "github.com/hashicorp/terraform-provider-azurerm/internal/services/graphservices/client" hdinsight "github.com/hashicorp/terraform-provider-azurerm/internal/services/hdinsight/client" healthcare "github.com/hashicorp/terraform-provider-azurerm/internal/services/healthcare/client" + storageCache "github.com/hashicorp/terraform-provider-azurerm/internal/services/hpccache/client" hsm "github.com/hashicorp/terraform-provider-azurerm/internal/services/hsm/client" hybridcompute "github.com/hashicorp/terraform-provider-azurerm/internal/services/hybridcompute/client" iotcentral "github.com/hashicorp/terraform-provider-azurerm/internal/services/iotcentral/client" @@ -587,8 +587,8 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error if client.Storage, err = storage.NewClient(o); err != nil { return fmt.Errorf("building clients for StorageMover: %+v", err) } - if client.StorageCache, err = azureManagedLustreFileSystem.NewClient(o); err != nil { - return fmt.Errorf("building clients for Azure Managed Lustre File System: %+v", err) + if client.StorageCache, err = storageCache.NewClient(o); err != nil { + return fmt.Errorf("building clients for Storage Cache: %+v", err) } if client.StorageMover, err = storageMover.NewClient(o); err != nil { return fmt.Errorf("building Storage for StorageMover: %+v", err) diff --git a/internal/provider/services.go b/internal/provider/services.go index 197e454e7fda..511b6f0157a9 100644 --- a/internal/provider/services.go +++ b/internal/provider/services.go @@ -18,7 +18,6 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/services/authorization" "github.com/hashicorp/terraform-provider-azurerm/internal/services/automanage" "github.com/hashicorp/terraform-provider-azurerm/internal/services/automation" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/azuremanagedlustrefilesystem" "github.com/hashicorp/terraform-provider-azurerm/internal/services/azurestackhci" "github.com/hashicorp/terraform-provider-azurerm/internal/services/batch" "github.com/hashicorp/terraform-provider-azurerm/internal/services/billing" @@ -145,7 +144,6 @@ func SupportedTypedServices() []sdk.TypedServiceRegistration { authorization.Registration{}, automanage.Registration{}, automation.Registration{}, - azuremanagedlustrefilesystem.Registration{}, batch.Registration{}, bot.Registration{}, cognitive.Registration{}, @@ -165,6 +163,7 @@ func SupportedTypedServices() []sdk.TypedServiceRegistration { eventhub.Registration{}, fluidrelay.Registration{}, graphservices.Registration{}, + hpccache.Registration{}, hybridcompute.Registration{}, iothub.Registration{}, iotcentral.Registration{}, diff --git a/internal/services/azuremanagedlustrefilesystem/registration.go b/internal/services/azuremanagedlustrefilesystem/registration.go deleted file mode 100644 index 4c058a876cbc..000000000000 --- a/internal/services/azuremanagedlustrefilesystem/registration.go +++ /dev/null @@ -1,35 +0,0 @@ -package azuremanagedlustrefilesystem - -import ( - "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" -) - -type Registration struct{} - -var _ sdk.TypedServiceRegistrationWithAGitHubLabel = Registration{} - -func (r Registration) AssociatedGitHubLabel() string { - return "service/azuremanagedlustrefilesystem" -} - -// Name is the name of this Service -func (r Registration) Name() string { - return "Azure Managed Lustre File System" -} - -// WebsiteCategories returns a list of categories which can be used for the sidebar -func (r Registration) WebsiteCategories() []string { - return []string{ - "Azure Managed Lustre File System", - } -} - -func (r Registration) DataSources() []sdk.DataSource { - return []sdk.DataSource{} -} - -func (r Registration) Resources() []sdk.Resource { - return []sdk.Resource{ - ManagedLustreFileSystemResource{}, - } -} diff --git a/internal/services/azuremanagedlustrefilesystem/client/client.go b/internal/services/hpccache/client/client.go similarity index 100% rename from internal/services/azuremanagedlustrefilesystem/client/client.go rename to internal/services/hpccache/client/client.go diff --git a/internal/services/azuremanagedlustrefilesystem/managed_lustre_file_system_resource.go b/internal/services/hpccache/managed_lustre_file_system_resource.go similarity index 99% rename from internal/services/azuremanagedlustrefilesystem/managed_lustre_file_system_resource.go rename to internal/services/hpccache/managed_lustre_file_system_resource.go index 34d38ea3a2ab..85f1192b315b 100644 --- a/internal/services/azuremanagedlustrefilesystem/managed_lustre_file_system_resource.go +++ b/internal/services/hpccache/managed_lustre_file_system_resource.go @@ -1,4 +1,4 @@ -package azuremanagedlustrefilesystem +package hpccache import ( "context" @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/amlfilesystems" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/azuremanagedlustrefilesystem/validate" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/hpccache/validate" keyVaultValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/keyvault/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" diff --git a/internal/services/azuremanagedlustrefilesystem/managed_lustre_file_system_resource_test.go b/internal/services/hpccache/managed_lustre_file_system_resource_test.go similarity index 99% rename from internal/services/azuremanagedlustrefilesystem/managed_lustre_file_system_resource_test.go rename to internal/services/hpccache/managed_lustre_file_system_resource_test.go index b13fca2d9038..de02ce715a98 100644 --- a/internal/services/azuremanagedlustrefilesystem/managed_lustre_file_system_resource_test.go +++ b/internal/services/hpccache/managed_lustre_file_system_resource_test.go @@ -1,4 +1,4 @@ -package azuremanagedlustrefilesystem_test +package hpccache_test import ( "context" diff --git a/internal/services/hpccache/registration.go b/internal/services/hpccache/registration.go index eaa948d50105..0fda2f075ae7 100644 --- a/internal/services/hpccache/registration.go +++ b/internal/services/hpccache/registration.go @@ -10,20 +10,18 @@ import ( type Registration struct{} -var _ sdk.UntypedServiceRegistrationWithAGitHubLabel = Registration{} - -func (r Registration) AssociatedGitHubLabel() string { - return "service/hpc-cache" -} +var _ sdk.TypedServiceRegistration = Registration{} +var _ sdk.UntypedServiceRegistration = Registration{} // Name is the name of this Service func (r Registration) Name() string { - return "HPC Cache" + return "Storage Cache" } // WebsiteCategories returns a list of categories which can be used for the sidebar func (r Registration) WebsiteCategories() []string { return []string{ + "Azure Managed Lustre File System", "Storage", } } @@ -43,3 +41,15 @@ func (r Registration) SupportedResources() map[string]*pluginsdk.Resource { "azurerm_hpc_cache_nfs_target": resourceHPCCacheNFSTarget(), } } + +// DataSources returns a list of Data Sources supported by this Service +func (r Registration) DataSources() []sdk.DataSource { + return []sdk.DataSource{} +} + +// Resources returns a list of Resources supported by this Service +func (r Registration) Resources() []sdk.Resource { + return []sdk.Resource{ + ManagedLustreFileSystemResource{}, + } +} diff --git a/internal/services/azuremanagedlustrefilesystem/validate/import_prefix.go b/internal/services/hpccache/validate/import_prefix.go similarity index 100% rename from internal/services/azuremanagedlustrefilesystem/validate/import_prefix.go rename to internal/services/hpccache/validate/import_prefix.go diff --git a/internal/services/azuremanagedlustrefilesystem/validate/import_prefix_test.go b/internal/services/hpccache/validate/import_prefix_test.go similarity index 100% rename from internal/services/azuremanagedlustrefilesystem/validate/import_prefix_test.go rename to internal/services/hpccache/validate/import_prefix_test.go diff --git a/internal/services/azuremanagedlustrefilesystem/validate/managed_lustre_file_system_name.go b/internal/services/hpccache/validate/managed_lustre_file_system_name.go similarity index 100% rename from internal/services/azuremanagedlustrefilesystem/validate/managed_lustre_file_system_name.go rename to internal/services/hpccache/validate/managed_lustre_file_system_name.go diff --git a/internal/services/azuremanagedlustrefilesystem/validate/managed_lustre_file_system_name_test.go b/internal/services/hpccache/validate/managed_lustre_file_system_name_test.go similarity index 100% rename from internal/services/azuremanagedlustrefilesystem/validate/managed_lustre_file_system_name_test.go rename to internal/services/hpccache/validate/managed_lustre_file_system_name_test.go diff --git a/internal/services/azuremanagedlustrefilesystem/validate/time_of_day_in_utc.go b/internal/services/hpccache/validate/time_of_day_in_utc.go similarity index 100% rename from internal/services/azuremanagedlustrefilesystem/validate/time_of_day_in_utc.go rename to internal/services/hpccache/validate/time_of_day_in_utc.go diff --git a/internal/services/azuremanagedlustrefilesystem/validate/time_of_day_in_utc_test.go b/internal/services/hpccache/validate/time_of_day_in_utc_test.go similarity index 100% rename from internal/services/azuremanagedlustrefilesystem/validate/time_of_day_in_utc_test.go rename to internal/services/hpccache/validate/time_of_day_in_utc_test.go From 261d30b9af3f0a84c48f0dd066330fdb297aae15 Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Thu, 23 Nov 2023 10:21:15 +0100 Subject: [PATCH 4/5] refactor: renaming `hpccache` -> `storagecache` --- internal/clients/client.go | 2 +- internal/provider/services.go | 6 +++--- .../services/{hpccache => storagecache}/client/client.go | 0 internal/services/{hpccache => storagecache}/hpc_cache.go | 2 +- .../hpc_cache_access_policy_resource.go | 4 ++-- .../hpc_cache_access_policy_resource_test.go | 8 ++++---- .../hpc_cache_blob_nfs_target_resource.go | 4 ++-- .../hpc_cache_blob_nfs_target_resource_test.go | 2 +- .../hpc_cache_blob_target_resource.go | 4 ++-- .../hpc_cache_blob_target_resource_test.go | 2 +- .../hpc_cache_nfs_target_resource.go | 4 ++-- .../hpc_cache_nfs_target_resource_test.go | 2 +- .../{hpccache => storagecache}/hpc_cache_resource.go | 2 +- .../{hpccache => storagecache}/hpc_cache_resource_test.go | 2 +- .../managed_lustre_file_system_resource.go | 4 ++-- .../managed_lustre_file_system_resource_test.go | 2 +- .../parse/cache_access_policy.go | 0 .../parse/cache_access_policy_test.go | 0 .../services/{hpccache => storagecache}/registration.go | 2 +- .../services/{hpccache => storagecache}/resourceids.go | 2 +- .../validate/cache_access_policy_id.go | 2 +- .../validate/cache_access_policy_id_test.go | 0 .../validate/cache_namespace_path.go | 0 .../validate/cache_nfs_export.go | 0 .../validate/cache_nfs_target_path.go | 0 .../{hpccache => storagecache}/validate/import_prefix.go | 0 .../validate/import_prefix_test.go | 0 .../{hpccache => storagecache}/validate/internal.go | 0 .../validate/managed_lustre_file_system_name.go | 0 .../validate/managed_lustre_file_system_name_test.go | 0 .../validate/storage_target_name.go | 0 .../validate/time_of_day_in_utc.go | 0 .../validate/time_of_day_in_utc_test.go | 0 33 files changed, 28 insertions(+), 28 deletions(-) rename internal/services/{hpccache => storagecache}/client/client.go (100%) rename internal/services/{hpccache => storagecache}/hpc_cache.go (99%) rename internal/services/{hpccache => storagecache}/hpc_cache_access_policy_resource.go (99%) rename internal/services/{hpccache => storagecache}/hpc_cache_access_policy_resource_test.go (97%) rename internal/services/{hpccache => storagecache}/hpc_cache_blob_nfs_target_resource.go (99%) rename internal/services/{hpccache => storagecache}/hpc_cache_blob_nfs_target_resource_test.go (99%) rename internal/services/{hpccache => storagecache}/hpc_cache_blob_target_resource.go (99%) rename internal/services/{hpccache => storagecache}/hpc_cache_blob_target_resource_test.go (99%) rename internal/services/{hpccache => storagecache}/hpc_cache_nfs_target_resource.go (99%) rename internal/services/{hpccache => storagecache}/hpc_cache_nfs_target_resource_test.go (99%) rename internal/services/{hpccache => storagecache}/hpc_cache_resource.go (99%) rename internal/services/{hpccache => storagecache}/hpc_cache_resource_test.go (99%) rename internal/services/{hpccache => storagecache}/managed_lustre_file_system_resource.go (99%) rename internal/services/{hpccache => storagecache}/managed_lustre_file_system_resource_test.go (99%) rename internal/services/{hpccache => storagecache}/parse/cache_access_policy.go (100%) rename internal/services/{hpccache => storagecache}/parse/cache_access_policy_test.go (100%) rename internal/services/{hpccache => storagecache}/registration.go (98%) rename internal/services/{hpccache => storagecache}/resourceids.go (93%) rename internal/services/{hpccache => storagecache}/validate/cache_access_policy_id.go (96%) rename internal/services/{hpccache => storagecache}/validate/cache_access_policy_id_test.go (100%) rename internal/services/{hpccache => storagecache}/validate/cache_namespace_path.go (100%) rename internal/services/{hpccache => storagecache}/validate/cache_nfs_export.go (100%) rename internal/services/{hpccache => storagecache}/validate/cache_nfs_target_path.go (100%) rename internal/services/{hpccache => storagecache}/validate/import_prefix.go (100%) rename internal/services/{hpccache => storagecache}/validate/import_prefix_test.go (100%) rename internal/services/{hpccache => storagecache}/validate/internal.go (100%) rename internal/services/{hpccache => storagecache}/validate/managed_lustre_file_system_name.go (100%) rename internal/services/{hpccache => storagecache}/validate/managed_lustre_file_system_name_test.go (100%) rename internal/services/{hpccache => storagecache}/validate/storage_target_name.go (100%) rename internal/services/{hpccache => storagecache}/validate/time_of_day_in_utc.go (100%) rename internal/services/{hpccache => storagecache}/validate/time_of_day_in_utc_test.go (100%) diff --git a/internal/clients/client.go b/internal/clients/client.go index bd27153bddc1..5af5f64180c3 100644 --- a/internal/clients/client.go +++ b/internal/clients/client.go @@ -75,7 +75,6 @@ import ( graph "github.com/hashicorp/terraform-provider-azurerm/internal/services/graphservices/client" hdinsight "github.com/hashicorp/terraform-provider-azurerm/internal/services/hdinsight/client" healthcare "github.com/hashicorp/terraform-provider-azurerm/internal/services/healthcare/client" - storageCache "github.com/hashicorp/terraform-provider-azurerm/internal/services/hpccache/client" hsm "github.com/hashicorp/terraform-provider-azurerm/internal/services/hsm/client" hybridcompute "github.com/hashicorp/terraform-provider-azurerm/internal/services/hybridcompute/client" iotcentral "github.com/hashicorp/terraform-provider-azurerm/internal/services/iotcentral/client" @@ -135,6 +134,7 @@ import ( appPlatform "github.com/hashicorp/terraform-provider-azurerm/internal/services/springcloud/client" sql "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/client" storage "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/client" + storageCache "github.com/hashicorp/terraform-provider-azurerm/internal/services/storagecache/client" storageMover "github.com/hashicorp/terraform-provider-azurerm/internal/services/storagemover/client" streamAnalytics "github.com/hashicorp/terraform-provider-azurerm/internal/services/streamanalytics/client" subscription "github.com/hashicorp/terraform-provider-azurerm/internal/services/subscription/client" diff --git a/internal/provider/services.go b/internal/provider/services.go index 511b6f0157a9..3624de11fe90 100644 --- a/internal/provider/services.go +++ b/internal/provider/services.go @@ -58,7 +58,6 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/services/graphservices" "github.com/hashicorp/terraform-provider-azurerm/internal/services/hdinsight" "github.com/hashicorp/terraform-provider-azurerm/internal/services/healthcare" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/hpccache" "github.com/hashicorp/terraform-provider-azurerm/internal/services/hsm" "github.com/hashicorp/terraform-provider-azurerm/internal/services/hybridcompute" "github.com/hashicorp/terraform-provider-azurerm/internal/services/iotcentral" @@ -119,6 +118,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/services/springcloud" "github.com/hashicorp/terraform-provider-azurerm/internal/services/sql" "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/storagecache" "github.com/hashicorp/terraform-provider-azurerm/internal/services/storagemover" "github.com/hashicorp/terraform-provider-azurerm/internal/services/streamanalytics" "github.com/hashicorp/terraform-provider-azurerm/internal/services/subscription" @@ -163,7 +163,7 @@ func SupportedTypedServices() []sdk.TypedServiceRegistration { eventhub.Registration{}, fluidrelay.Registration{}, graphservices.Registration{}, - hpccache.Registration{}, + storagecache.Registration{}, hybridcompute.Registration{}, iothub.Registration{}, iotcentral.Registration{}, @@ -254,7 +254,7 @@ func SupportedUntypedServices() []sdk.UntypedServiceRegistration { eventhub.Registration{}, firewall.Registration{}, frontdoor.Registration{}, - hpccache.Registration{}, + storagecache.Registration{}, hsm.Registration{}, hdinsight.Registration{}, healthcare.Registration{}, diff --git a/internal/services/hpccache/client/client.go b/internal/services/storagecache/client/client.go similarity index 100% rename from internal/services/hpccache/client/client.go rename to internal/services/storagecache/client/client.go diff --git a/internal/services/hpccache/hpc_cache.go b/internal/services/storagecache/hpc_cache.go similarity index 99% rename from internal/services/hpccache/hpc_cache.go rename to internal/services/storagecache/hpc_cache.go index 7fad4adac3e8..7b9b4053b728 100644 --- a/internal/services/hpccache/hpc_cache.go +++ b/internal/services/storagecache/hpc_cache.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -package hpccache +package storagecache import ( "context" diff --git a/internal/services/hpccache/hpc_cache_access_policy_resource.go b/internal/services/storagecache/hpc_cache_access_policy_resource.go similarity index 99% rename from internal/services/hpccache/hpc_cache_access_policy_resource.go rename to internal/services/storagecache/hpc_cache_access_policy_resource.go index 44f2b5d177b8..ad79e6b21799 100644 --- a/internal/services/hpccache/hpc_cache_access_policy_resource.go +++ b/internal/services/storagecache/hpc_cache_access_policy_resource.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -package hpccache +package storagecache import ( "fmt" @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/hpccache/parse" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/storagecache/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" diff --git a/internal/services/hpccache/hpc_cache_access_policy_resource_test.go b/internal/services/storagecache/hpc_cache_access_policy_resource_test.go similarity index 97% rename from internal/services/hpccache/hpc_cache_access_policy_resource_test.go rename to internal/services/storagecache/hpc_cache_access_policy_resource_test.go index 6412ba424e30..29f336398df9 100644 --- a/internal/services/hpccache/hpc_cache_access_policy_resource_test.go +++ b/internal/services/storagecache/hpc_cache_access_policy_resource_test.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -package hpccache_test +package storagecache_test import ( "context" @@ -14,8 +14,8 @@ import ( "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" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/hpccache" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/hpccache/parse" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/storagecache" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/storagecache/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" ) @@ -131,7 +131,7 @@ func (r HPCCacheAccessPolicyResource) Exists(ctx context.Context, clients *clien return pointer.To(false), nil } - return pointer.To(hpccache.CacheGetAccessPolicyByName(*policies, id.Name) != nil), nil + return pointer.To(storagecache.CacheGetAccessPolicyByName(*policies, id.Name) != nil), nil } func (r HPCCacheAccessPolicyResource) basic(data acceptance.TestData) string { diff --git a/internal/services/hpccache/hpc_cache_blob_nfs_target_resource.go b/internal/services/storagecache/hpc_cache_blob_nfs_target_resource.go similarity index 99% rename from internal/services/hpccache/hpc_cache_blob_nfs_target_resource.go rename to internal/services/storagecache/hpc_cache_blob_nfs_target_resource.go index 3d39159a3d90..d07295d5b48f 100644 --- a/internal/services/hpccache/hpc_cache_blob_nfs_target_resource.go +++ b/internal/services/storagecache/hpc_cache_blob_nfs_target_resource.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -package hpccache +package storagecache import ( "fmt" @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/hpccache/validate" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/storagecache/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" diff --git a/internal/services/hpccache/hpc_cache_blob_nfs_target_resource_test.go b/internal/services/storagecache/hpc_cache_blob_nfs_target_resource_test.go similarity index 99% rename from internal/services/hpccache/hpc_cache_blob_nfs_target_resource_test.go rename to internal/services/storagecache/hpc_cache_blob_nfs_target_resource_test.go index b3d9b2b3224b..9adb2e8edb44 100644 --- a/internal/services/hpccache/hpc_cache_blob_nfs_target_resource_test.go +++ b/internal/services/storagecache/hpc_cache_blob_nfs_target_resource_test.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -package hpccache_test +package storagecache_test import ( "context" diff --git a/internal/services/hpccache/hpc_cache_blob_target_resource.go b/internal/services/storagecache/hpc_cache_blob_target_resource.go similarity index 99% rename from internal/services/hpccache/hpc_cache_blob_target_resource.go rename to internal/services/storagecache/hpc_cache_blob_target_resource.go index 8e5b59ac2b98..173b7e328024 100644 --- a/internal/services/hpccache/hpc_cache_blob_target_resource.go +++ b/internal/services/storagecache/hpc_cache_blob_target_resource.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -package hpccache +package storagecache import ( "fmt" @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/hpccache/validate" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/storagecache/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" diff --git a/internal/services/hpccache/hpc_cache_blob_target_resource_test.go b/internal/services/storagecache/hpc_cache_blob_target_resource_test.go similarity index 99% rename from internal/services/hpccache/hpc_cache_blob_target_resource_test.go rename to internal/services/storagecache/hpc_cache_blob_target_resource_test.go index 723e03e11a1e..7a244dc2a123 100644 --- a/internal/services/hpccache/hpc_cache_blob_target_resource_test.go +++ b/internal/services/storagecache/hpc_cache_blob_target_resource_test.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -package hpccache_test +package storagecache_test import ( "context" diff --git a/internal/services/hpccache/hpc_cache_nfs_target_resource.go b/internal/services/storagecache/hpc_cache_nfs_target_resource.go similarity index 99% rename from internal/services/hpccache/hpc_cache_nfs_target_resource.go rename to internal/services/storagecache/hpc_cache_nfs_target_resource.go index 55b3227d5cfc..e0f625237d53 100644 --- a/internal/services/hpccache/hpc_cache_nfs_target_resource.go +++ b/internal/services/storagecache/hpc_cache_nfs_target_resource.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -package hpccache +package storagecache import ( "fmt" @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/hpccache/validate" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/storagecache/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" diff --git a/internal/services/hpccache/hpc_cache_nfs_target_resource_test.go b/internal/services/storagecache/hpc_cache_nfs_target_resource_test.go similarity index 99% rename from internal/services/hpccache/hpc_cache_nfs_target_resource_test.go rename to internal/services/storagecache/hpc_cache_nfs_target_resource_test.go index f79d29a28be7..29ddad46237b 100644 --- a/internal/services/hpccache/hpc_cache_nfs_target_resource_test.go +++ b/internal/services/storagecache/hpc_cache_nfs_target_resource_test.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -package hpccache_test +package storagecache_test import ( "context" diff --git a/internal/services/hpccache/hpc_cache_resource.go b/internal/services/storagecache/hpc_cache_resource.go similarity index 99% rename from internal/services/hpccache/hpc_cache_resource.go rename to internal/services/storagecache/hpc_cache_resource.go index 256b3dc5561f..130cb96819a8 100644 --- a/internal/services/hpccache/hpc_cache_resource.go +++ b/internal/services/storagecache/hpc_cache_resource.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -package hpccache +package storagecache import ( "context" diff --git a/internal/services/hpccache/hpc_cache_resource_test.go b/internal/services/storagecache/hpc_cache_resource_test.go similarity index 99% rename from internal/services/hpccache/hpc_cache_resource_test.go rename to internal/services/storagecache/hpc_cache_resource_test.go index 340f37410a7c..ddeec5b81200 100644 --- a/internal/services/hpccache/hpc_cache_resource_test.go +++ b/internal/services/storagecache/hpc_cache_resource_test.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -package hpccache_test +package storagecache_test import ( "context" diff --git a/internal/services/hpccache/managed_lustre_file_system_resource.go b/internal/services/storagecache/managed_lustre_file_system_resource.go similarity index 99% rename from internal/services/hpccache/managed_lustre_file_system_resource.go rename to internal/services/storagecache/managed_lustre_file_system_resource.go index 85f1192b315b..b58c2bb6de83 100644 --- a/internal/services/hpccache/managed_lustre_file_system_resource.go +++ b/internal/services/storagecache/managed_lustre_file_system_resource.go @@ -1,4 +1,4 @@ -package hpccache +package storagecache import ( "context" @@ -13,8 +13,8 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/amlfilesystems" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/hpccache/validate" keyVaultValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/keyvault/validate" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/storagecache/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" ) diff --git a/internal/services/hpccache/managed_lustre_file_system_resource_test.go b/internal/services/storagecache/managed_lustre_file_system_resource_test.go similarity index 99% rename from internal/services/hpccache/managed_lustre_file_system_resource_test.go rename to internal/services/storagecache/managed_lustre_file_system_resource_test.go index de02ce715a98..cf52dccf6a3e 100644 --- a/internal/services/hpccache/managed_lustre_file_system_resource_test.go +++ b/internal/services/storagecache/managed_lustre_file_system_resource_test.go @@ -1,4 +1,4 @@ -package hpccache_test +package storagecache_test import ( "context" diff --git a/internal/services/hpccache/parse/cache_access_policy.go b/internal/services/storagecache/parse/cache_access_policy.go similarity index 100% rename from internal/services/hpccache/parse/cache_access_policy.go rename to internal/services/storagecache/parse/cache_access_policy.go diff --git a/internal/services/hpccache/parse/cache_access_policy_test.go b/internal/services/storagecache/parse/cache_access_policy_test.go similarity index 100% rename from internal/services/hpccache/parse/cache_access_policy_test.go rename to internal/services/storagecache/parse/cache_access_policy_test.go diff --git a/internal/services/hpccache/registration.go b/internal/services/storagecache/registration.go similarity index 98% rename from internal/services/hpccache/registration.go rename to internal/services/storagecache/registration.go index 0fda2f075ae7..7442852e34cc 100644 --- a/internal/services/hpccache/registration.go +++ b/internal/services/storagecache/registration.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -package hpccache +package storagecache import ( "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" diff --git a/internal/services/hpccache/resourceids.go b/internal/services/storagecache/resourceids.go similarity index 93% rename from internal/services/hpccache/resourceids.go rename to internal/services/storagecache/resourceids.go index 14e104c24bcb..439f7275d02c 100644 --- a/internal/services/hpccache/resourceids.go +++ b/internal/services/storagecache/resourceids.go @@ -1,6 +1,6 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -package hpccache +package storagecache //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=CacheAccessPolicy -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.StorageCache/caches/cache1/cacheAccessPolicies/policy1 diff --git a/internal/services/hpccache/validate/cache_access_policy_id.go b/internal/services/storagecache/validate/cache_access_policy_id.go similarity index 96% rename from internal/services/hpccache/validate/cache_access_policy_id.go rename to internal/services/storagecache/validate/cache_access_policy_id.go index dd35ab11f1a0..9a8730dc60e6 100644 --- a/internal/services/hpccache/validate/cache_access_policy_id.go +++ b/internal/services/storagecache/validate/cache_access_policy_id.go @@ -8,7 +8,7 @@ package validate import ( "fmt" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/hpccache/parse" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/storagecache/parse" ) func CacheAccessPolicyID(input interface{}, key string) (warnings []string, errors []error) { diff --git a/internal/services/hpccache/validate/cache_access_policy_id_test.go b/internal/services/storagecache/validate/cache_access_policy_id_test.go similarity index 100% rename from internal/services/hpccache/validate/cache_access_policy_id_test.go rename to internal/services/storagecache/validate/cache_access_policy_id_test.go diff --git a/internal/services/hpccache/validate/cache_namespace_path.go b/internal/services/storagecache/validate/cache_namespace_path.go similarity index 100% rename from internal/services/hpccache/validate/cache_namespace_path.go rename to internal/services/storagecache/validate/cache_namespace_path.go diff --git a/internal/services/hpccache/validate/cache_nfs_export.go b/internal/services/storagecache/validate/cache_nfs_export.go similarity index 100% rename from internal/services/hpccache/validate/cache_nfs_export.go rename to internal/services/storagecache/validate/cache_nfs_export.go diff --git a/internal/services/hpccache/validate/cache_nfs_target_path.go b/internal/services/storagecache/validate/cache_nfs_target_path.go similarity index 100% rename from internal/services/hpccache/validate/cache_nfs_target_path.go rename to internal/services/storagecache/validate/cache_nfs_target_path.go diff --git a/internal/services/hpccache/validate/import_prefix.go b/internal/services/storagecache/validate/import_prefix.go similarity index 100% rename from internal/services/hpccache/validate/import_prefix.go rename to internal/services/storagecache/validate/import_prefix.go diff --git a/internal/services/hpccache/validate/import_prefix_test.go b/internal/services/storagecache/validate/import_prefix_test.go similarity index 100% rename from internal/services/hpccache/validate/import_prefix_test.go rename to internal/services/storagecache/validate/import_prefix_test.go diff --git a/internal/services/hpccache/validate/internal.go b/internal/services/storagecache/validate/internal.go similarity index 100% rename from internal/services/hpccache/validate/internal.go rename to internal/services/storagecache/validate/internal.go diff --git a/internal/services/hpccache/validate/managed_lustre_file_system_name.go b/internal/services/storagecache/validate/managed_lustre_file_system_name.go similarity index 100% rename from internal/services/hpccache/validate/managed_lustre_file_system_name.go rename to internal/services/storagecache/validate/managed_lustre_file_system_name.go diff --git a/internal/services/hpccache/validate/managed_lustre_file_system_name_test.go b/internal/services/storagecache/validate/managed_lustre_file_system_name_test.go similarity index 100% rename from internal/services/hpccache/validate/managed_lustre_file_system_name_test.go rename to internal/services/storagecache/validate/managed_lustre_file_system_name_test.go diff --git a/internal/services/hpccache/validate/storage_target_name.go b/internal/services/storagecache/validate/storage_target_name.go similarity index 100% rename from internal/services/hpccache/validate/storage_target_name.go rename to internal/services/storagecache/validate/storage_target_name.go diff --git a/internal/services/hpccache/validate/time_of_day_in_utc.go b/internal/services/storagecache/validate/time_of_day_in_utc.go similarity index 100% rename from internal/services/hpccache/validate/time_of_day_in_utc.go rename to internal/services/storagecache/validate/time_of_day_in_utc.go diff --git a/internal/services/hpccache/validate/time_of_day_in_utc_test.go b/internal/services/storagecache/validate/time_of_day_in_utc_test.go similarity index 100% rename from internal/services/hpccache/validate/time_of_day_in_utc_test.go rename to internal/services/storagecache/validate/time_of_day_in_utc_test.go From 4f67664dcb7351907a6d4cbeeeb3ee5499934ebc Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Thu, 23 Nov 2023 11:00:03 +0100 Subject: [PATCH 5/5] `make generate` --- .github/labeler-issue-triage.yml | 6 ------ .github/labeler-pull-request-triage.yml | 6 ------ .teamcity/components/generated/services.kt | 3 +-- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/labeler-issue-triage.yml b/.github/labeler-issue-triage.yml index ab3c8e3cd5c9..f04cd5c8c531 100644 --- a/.github/labeler-issue-triage.yml +++ b/.github/labeler-issue-triage.yml @@ -48,9 +48,6 @@ service/automation: service/azure-stack-hci: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_stack_hci_cluster((.|\n)*)###' -service/azuremanagedlustrefilesystem: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_managed_lustre_file_system((.|\n)*)###' - service/batch: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_batch_((.|\n)*)###' @@ -159,9 +156,6 @@ service/hdinsight: service/healthcare: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_healthcare_((.|\n)*)###' -service/hpc-cache: - - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_hpc_cache((.|\n)*)###' - service/hsm: - '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_dedicated_hardware_security_module((.|\n)*)###' diff --git a/.github/labeler-pull-request-triage.yml b/.github/labeler-pull-request-triage.yml index bb6a4aa0650c..46c06b2981d2 100644 --- a/.github/labeler-pull-request-triage.yml +++ b/.github/labeler-pull-request-triage.yml @@ -49,9 +49,6 @@ service/automation: service/azure-stack-hci: - internal/services/azurestackhci/**/* -service/azuremanagedlustrefilesystem: - - internal/services/azuremanagedlustrefilesystem/**/* - service/batch: - internal/services/batch/**/* @@ -161,9 +158,6 @@ service/hdinsight: service/healthcare: - internal/services/healthcare/**/* -service/hpc-cache: - - internal/services/hpccache/**/* - service/hsm: - internal/services/hsm/**/* diff --git a/.teamcity/components/generated/services.kt b/.teamcity/components/generated/services.kt index 345efa5d02bd..086857766ba2 100644 --- a/.teamcity/components/generated/services.kt +++ b/.teamcity/components/generated/services.kt @@ -16,7 +16,6 @@ var services = mapOf( "authorization" to "Authorization", "automanage" to "Automanage", "automation" to "Automation", - "azuremanagedlustrefilesystem" to "Azure Managed Lustre File System", "azurestackhci" to "Azure Stack HCI", "batch" to "Batch", "billing" to "Billing", @@ -57,7 +56,6 @@ var services = mapOf( "frontdoor" to "FrontDoor", "graphservices" to "Graph Services", "hdinsight" to "HDInsight", - "hpccache" to "HPC Cache", "hsm" to "Hardware Security Module", "healthcare" to "Health Care", "hybridcompute" to "Hybrid Compute", @@ -119,6 +117,7 @@ var services = mapOf( "signalr" to "SignalR", "springcloud" to "Spring Cloud", "storage" to "Storage", + "storagecache" to "Storage Cache", "storagemover" to "Storage Mover", "streamanalytics" to "Stream Analytics", "subscription" to "Subscription",