-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hc-github-team-tf-azure
committed
Mar 12, 2024
1 parent
e950205
commit 931a647
Showing
220 changed files
with
14,970 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
package v2024_03_31 | ||
|
||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See NOTICE.txt in the project root for license information. | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/collection" | ||
"github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/dicomservices" | ||
"github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/fhirservices" | ||
"github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/iotconnectors" | ||
"github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/privateendpointconnections" | ||
"github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/privatelinkresources" | ||
"github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/proxy" | ||
"github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/resource" | ||
"github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections" | ||
"github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources" | ||
"github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/workspaces" | ||
"github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" | ||
sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" | ||
) | ||
|
||
type Client struct { | ||
Collection *collection.CollectionClient | ||
DicomServices *dicomservices.DicomServicesClient | ||
FhirServices *fhirservices.FhirServicesClient | ||
IotConnectors *iotconnectors.IotConnectorsClient | ||
PrivateEndpointConnections *privateendpointconnections.PrivateEndpointConnectionsClient | ||
PrivateLinkResources *privatelinkresources.PrivateLinkResourcesClient | ||
Proxy *proxy.ProxyClient | ||
Resource *resource.ResourceClient | ||
WorkspacePrivateEndpointConnections *workspaceprivateendpointconnections.WorkspacePrivateEndpointConnectionsClient | ||
WorkspacePrivateLinkResources *workspaceprivatelinkresources.WorkspacePrivateLinkResourcesClient | ||
Workspaces *workspaces.WorkspacesClient | ||
} | ||
|
||
func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { | ||
collectionClient, err := collection.NewCollectionClientWithBaseURI(sdkApi) | ||
if err != nil { | ||
return nil, fmt.Errorf("building Collection client: %+v", err) | ||
} | ||
configureFunc(collectionClient.Client) | ||
|
||
dicomServicesClient, err := dicomservices.NewDicomServicesClientWithBaseURI(sdkApi) | ||
if err != nil { | ||
return nil, fmt.Errorf("building DicomServices client: %+v", err) | ||
} | ||
configureFunc(dicomServicesClient.Client) | ||
|
||
fhirServicesClient, err := fhirservices.NewFhirServicesClientWithBaseURI(sdkApi) | ||
if err != nil { | ||
return nil, fmt.Errorf("building FhirServices client: %+v", err) | ||
} | ||
configureFunc(fhirServicesClient.Client) | ||
|
||
iotConnectorsClient, err := iotconnectors.NewIotConnectorsClientWithBaseURI(sdkApi) | ||
if err != nil { | ||
return nil, fmt.Errorf("building IotConnectors client: %+v", err) | ||
} | ||
configureFunc(iotConnectorsClient.Client) | ||
|
||
privateEndpointConnectionsClient, err := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi) | ||
if err != nil { | ||
return nil, fmt.Errorf("building PrivateEndpointConnections client: %+v", err) | ||
} | ||
configureFunc(privateEndpointConnectionsClient.Client) | ||
|
||
privateLinkResourcesClient, err := privatelinkresources.NewPrivateLinkResourcesClientWithBaseURI(sdkApi) | ||
if err != nil { | ||
return nil, fmt.Errorf("building PrivateLinkResources client: %+v", err) | ||
} | ||
configureFunc(privateLinkResourcesClient.Client) | ||
|
||
proxyClient, err := proxy.NewProxyClientWithBaseURI(sdkApi) | ||
if err != nil { | ||
return nil, fmt.Errorf("building Proxy client: %+v", err) | ||
} | ||
configureFunc(proxyClient.Client) | ||
|
||
resourceClient, err := resource.NewResourceClientWithBaseURI(sdkApi) | ||
if err != nil { | ||
return nil, fmt.Errorf("building Resource client: %+v", err) | ||
} | ||
configureFunc(resourceClient.Client) | ||
|
||
workspacePrivateEndpointConnectionsClient, err := workspaceprivateendpointconnections.NewWorkspacePrivateEndpointConnectionsClientWithBaseURI(sdkApi) | ||
if err != nil { | ||
return nil, fmt.Errorf("building WorkspacePrivateEndpointConnections client: %+v", err) | ||
} | ||
configureFunc(workspacePrivateEndpointConnectionsClient.Client) | ||
|
||
workspacePrivateLinkResourcesClient, err := workspaceprivatelinkresources.NewWorkspacePrivateLinkResourcesClientWithBaseURI(sdkApi) | ||
if err != nil { | ||
return nil, fmt.Errorf("building WorkspacePrivateLinkResources client: %+v", err) | ||
} | ||
configureFunc(workspacePrivateLinkResourcesClient.Client) | ||
|
||
workspacesClient, err := workspaces.NewWorkspacesClientWithBaseURI(sdkApi) | ||
if err != nil { | ||
return nil, fmt.Errorf("building Workspaces client: %+v", err) | ||
} | ||
configureFunc(workspacesClient.Client) | ||
|
||
return &Client{ | ||
Collection: collectionClient, | ||
DicomServices: dicomServicesClient, | ||
FhirServices: fhirServicesClient, | ||
IotConnectors: iotConnectorsClient, | ||
PrivateEndpointConnections: privateEndpointConnectionsClient, | ||
PrivateLinkResources: privateLinkResourcesClient, | ||
Proxy: proxyClient, | ||
Resource: resourceClient, | ||
WorkspacePrivateEndpointConnections: workspacePrivateEndpointConnectionsClient, | ||
WorkspacePrivateLinkResources: workspacePrivateLinkResourcesClient, | ||
Workspaces: workspacesClient, | ||
}, nil | ||
} |
55 changes: 55 additions & 0 deletions
55
resource-manager/healthcareapis/2024-03-31/collection/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
|
||
## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/collection` Documentation | ||
|
||
The `collection` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-31`). | ||
|
||
This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). | ||
|
||
### Import Path | ||
|
||
```go | ||
import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" | ||
import "github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/collection" | ||
``` | ||
|
||
|
||
### Client Initialization | ||
|
||
```go | ||
client := collection.NewCollectionClientWithBaseURI("https://management.azure.com") | ||
client.Client.Authorizer = authorizer | ||
``` | ||
|
||
|
||
### Example Usage: `CollectionClient.ServicesList` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") | ||
|
||
// alternatively `client.ServicesList(ctx, id)` can be used to do batched pagination | ||
items, err := client.ServicesListComplete(ctx, id) | ||
if err != nil { | ||
// handle the error | ||
} | ||
for _, item := range items { | ||
// do something | ||
} | ||
``` | ||
|
||
|
||
### Example Usage: `CollectionClient.ServicesListByResourceGroup` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") | ||
|
||
// alternatively `client.ServicesListByResourceGroup(ctx, id)` can be used to do batched pagination | ||
items, err := client.ServicesListByResourceGroupComplete(ctx, id) | ||
if err != nil { | ||
// handle the error | ||
} | ||
for _, item := range items { | ||
// do something | ||
} | ||
``` |
26 changes: 26 additions & 0 deletions
26
resource-manager/healthcareapis/2024-03-31/collection/client.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package collection | ||
|
||
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 CollectionClient struct { | ||
Client *resourcemanager.Client | ||
} | ||
|
||
func NewCollectionClientWithBaseURI(sdkApi sdkEnv.Api) (*CollectionClient, error) { | ||
client, err := resourcemanager.NewResourceManagerClient(sdkApi, "collection", defaultApiVersion) | ||
if err != nil { | ||
return nil, fmt.Errorf("instantiating CollectionClient: %+v", err) | ||
} | ||
|
||
return &CollectionClient{ | ||
Client: client, | ||
}, nil | ||
} |
Oops, something went wrong.