|
| 1 | +package v2024_11_15 |
| 2 | + |
| 3 | +// Copyright (c) Microsoft Corporation. All rights reserved. |
| 4 | +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. |
| 5 | + |
| 6 | +import ( |
| 7 | + "fmt" |
| 8 | + |
| 9 | + "github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-11-15/cosmosdb" |
| 10 | + "github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-11-15/datatransfer" |
| 11 | + "github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-11-15/graphapicompute" |
| 12 | + "github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-11-15/managedcassandras" |
| 13 | + "github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-11-15/materializedviewsbuilder" |
| 14 | + "github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-11-15/mongorbacs" |
| 15 | + "github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-11-15/notebookworkspacesresource" |
| 16 | + "github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-11-15/privateendpointconnections" |
| 17 | + "github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-11-15/privatelinkresources" |
| 18 | + "github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-11-15/rbacs" |
| 19 | + "github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-11-15/restorables" |
| 20 | + "github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-11-15/services" |
| 21 | + "github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-11-15/sqldedicatedgateway" |
| 22 | + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" |
| 23 | + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" |
| 24 | +) |
| 25 | + |
| 26 | +type Client struct { |
| 27 | + CosmosDB *cosmosdb.CosmosDBClient |
| 28 | + DataTransfer *datatransfer.DataTransferClient |
| 29 | + GraphAPICompute *graphapicompute.GraphAPIComputeClient |
| 30 | + ManagedCassandras *managedcassandras.ManagedCassandrasClient |
| 31 | + MaterializedViewsBuilder *materializedviewsbuilder.MaterializedViewsBuilderClient |
| 32 | + Mongorbacs *mongorbacs.MongorbacsClient |
| 33 | + NotebookWorkspacesResource *notebookworkspacesresource.NotebookWorkspacesResourceClient |
| 34 | + PrivateEndpointConnections *privateendpointconnections.PrivateEndpointConnectionsClient |
| 35 | + PrivateLinkResources *privatelinkresources.PrivateLinkResourcesClient |
| 36 | + Rbacs *rbacs.RbacsClient |
| 37 | + Restorables *restorables.RestorablesClient |
| 38 | + Services *services.ServicesClient |
| 39 | + SqlDedicatedGateway *sqldedicatedgateway.SqlDedicatedGatewayClient |
| 40 | +} |
| 41 | + |
| 42 | +func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { |
| 43 | + cosmosDBClient, err := cosmosdb.NewCosmosDBClientWithBaseURI(sdkApi) |
| 44 | + if err != nil { |
| 45 | + return nil, fmt.Errorf("building CosmosDB client: %+v", err) |
| 46 | + } |
| 47 | + configureFunc(cosmosDBClient.Client) |
| 48 | + |
| 49 | + dataTransferClient, err := datatransfer.NewDataTransferClientWithBaseURI(sdkApi) |
| 50 | + if err != nil { |
| 51 | + return nil, fmt.Errorf("building DataTransfer client: %+v", err) |
| 52 | + } |
| 53 | + configureFunc(dataTransferClient.Client) |
| 54 | + |
| 55 | + graphAPIComputeClient, err := graphapicompute.NewGraphAPIComputeClientWithBaseURI(sdkApi) |
| 56 | + if err != nil { |
| 57 | + return nil, fmt.Errorf("building GraphAPICompute client: %+v", err) |
| 58 | + } |
| 59 | + configureFunc(graphAPIComputeClient.Client) |
| 60 | + |
| 61 | + managedCassandrasClient, err := managedcassandras.NewManagedCassandrasClientWithBaseURI(sdkApi) |
| 62 | + if err != nil { |
| 63 | + return nil, fmt.Errorf("building ManagedCassandras client: %+v", err) |
| 64 | + } |
| 65 | + configureFunc(managedCassandrasClient.Client) |
| 66 | + |
| 67 | + materializedViewsBuilderClient, err := materializedviewsbuilder.NewMaterializedViewsBuilderClientWithBaseURI(sdkApi) |
| 68 | + if err != nil { |
| 69 | + return nil, fmt.Errorf("building MaterializedViewsBuilder client: %+v", err) |
| 70 | + } |
| 71 | + configureFunc(materializedViewsBuilderClient.Client) |
| 72 | + |
| 73 | + mongorbacsClient, err := mongorbacs.NewMongorbacsClientWithBaseURI(sdkApi) |
| 74 | + if err != nil { |
| 75 | + return nil, fmt.Errorf("building Mongorbacs client: %+v", err) |
| 76 | + } |
| 77 | + configureFunc(mongorbacsClient.Client) |
| 78 | + |
| 79 | + notebookWorkspacesResourceClient, err := notebookworkspacesresource.NewNotebookWorkspacesResourceClientWithBaseURI(sdkApi) |
| 80 | + if err != nil { |
| 81 | + return nil, fmt.Errorf("building NotebookWorkspacesResource client: %+v", err) |
| 82 | + } |
| 83 | + configureFunc(notebookWorkspacesResourceClient.Client) |
| 84 | + |
| 85 | + privateEndpointConnectionsClient, err := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi) |
| 86 | + if err != nil { |
| 87 | + return nil, fmt.Errorf("building PrivateEndpointConnections client: %+v", err) |
| 88 | + } |
| 89 | + configureFunc(privateEndpointConnectionsClient.Client) |
| 90 | + |
| 91 | + privateLinkResourcesClient, err := privatelinkresources.NewPrivateLinkResourcesClientWithBaseURI(sdkApi) |
| 92 | + if err != nil { |
| 93 | + return nil, fmt.Errorf("building PrivateLinkResources client: %+v", err) |
| 94 | + } |
| 95 | + configureFunc(privateLinkResourcesClient.Client) |
| 96 | + |
| 97 | + rbacsClient, err := rbacs.NewRbacsClientWithBaseURI(sdkApi) |
| 98 | + if err != nil { |
| 99 | + return nil, fmt.Errorf("building Rbacs client: %+v", err) |
| 100 | + } |
| 101 | + configureFunc(rbacsClient.Client) |
| 102 | + |
| 103 | + restorablesClient, err := restorables.NewRestorablesClientWithBaseURI(sdkApi) |
| 104 | + if err != nil { |
| 105 | + return nil, fmt.Errorf("building Restorables client: %+v", err) |
| 106 | + } |
| 107 | + configureFunc(restorablesClient.Client) |
| 108 | + |
| 109 | + servicesClient, err := services.NewServicesClientWithBaseURI(sdkApi) |
| 110 | + if err != nil { |
| 111 | + return nil, fmt.Errorf("building Services client: %+v", err) |
| 112 | + } |
| 113 | + configureFunc(servicesClient.Client) |
| 114 | + |
| 115 | + sqlDedicatedGatewayClient, err := sqldedicatedgateway.NewSqlDedicatedGatewayClientWithBaseURI(sdkApi) |
| 116 | + if err != nil { |
| 117 | + return nil, fmt.Errorf("building SqlDedicatedGateway client: %+v", err) |
| 118 | + } |
| 119 | + configureFunc(sqlDedicatedGatewayClient.Client) |
| 120 | + |
| 121 | + return &Client{ |
| 122 | + CosmosDB: cosmosDBClient, |
| 123 | + DataTransfer: dataTransferClient, |
| 124 | + GraphAPICompute: graphAPIComputeClient, |
| 125 | + ManagedCassandras: managedCassandrasClient, |
| 126 | + MaterializedViewsBuilder: materializedViewsBuilderClient, |
| 127 | + Mongorbacs: mongorbacsClient, |
| 128 | + NotebookWorkspacesResource: notebookWorkspacesResourceClient, |
| 129 | + PrivateEndpointConnections: privateEndpointConnectionsClient, |
| 130 | + PrivateLinkResources: privateLinkResourcesClient, |
| 131 | + Rbacs: rbacsClient, |
| 132 | + Restorables: restorablesClient, |
| 133 | + Services: servicesClient, |
| 134 | + SqlDedicatedGateway: sqlDedicatedGatewayClient, |
| 135 | + }, nil |
| 136 | +} |
0 commit comments