-
Notifications
You must be signed in to change notification settings - Fork 43
/
client.go
71 lines (57 loc) · 3.94 KB
/
client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package v2022_03_01
import (
"github.com/Azure/go-autorest/autorest"
"github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2022-03-01/certificates"
"github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2022-03-01/containerapps"
"github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2022-03-01/containerappsauthconfigs"
"github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2022-03-01/containerappsrevisionreplicas"
"github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2022-03-01/containerappsrevisions"
"github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2022-03-01/containerappssourcecontrols"
"github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2022-03-01/daprcomponents"
"github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2022-03-01/managedenvironments"
"github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2022-03-01/managedenvironmentsstorages"
)
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
type Client struct {
Certificates *certificates.CertificatesClient
ContainerApps *containerapps.ContainerAppsClient
ContainerAppsAuthConfigs *containerappsauthconfigs.ContainerAppsAuthConfigsClient
ContainerAppsRevisionReplicas *containerappsrevisionreplicas.ContainerAppsRevisionReplicasClient
ContainerAppsRevisions *containerappsrevisions.ContainerAppsRevisionsClient
ContainerAppsSourceControls *containerappssourcecontrols.ContainerAppsSourceControlsClient
DaprComponents *daprcomponents.DaprComponentsClient
ManagedEnvironments *managedenvironments.ManagedEnvironmentsClient
ManagedEnvironmentsStorages *managedenvironmentsstorages.ManagedEnvironmentsStoragesClient
}
func NewClientWithBaseURI(endpoint string, configureAuthFunc func(c *autorest.Client)) Client {
certificatesClient := certificates.NewCertificatesClientWithBaseURI(endpoint)
configureAuthFunc(&certificatesClient.Client)
containerAppsAuthConfigsClient := containerappsauthconfigs.NewContainerAppsAuthConfigsClientWithBaseURI(endpoint)
configureAuthFunc(&containerAppsAuthConfigsClient.Client)
containerAppsClient := containerapps.NewContainerAppsClientWithBaseURI(endpoint)
configureAuthFunc(&containerAppsClient.Client)
containerAppsRevisionReplicasClient := containerappsrevisionreplicas.NewContainerAppsRevisionReplicasClientWithBaseURI(endpoint)
configureAuthFunc(&containerAppsRevisionReplicasClient.Client)
containerAppsRevisionsClient := containerappsrevisions.NewContainerAppsRevisionsClientWithBaseURI(endpoint)
configureAuthFunc(&containerAppsRevisionsClient.Client)
containerAppsSourceControlsClient := containerappssourcecontrols.NewContainerAppsSourceControlsClientWithBaseURI(endpoint)
configureAuthFunc(&containerAppsSourceControlsClient.Client)
daprComponentsClient := daprcomponents.NewDaprComponentsClientWithBaseURI(endpoint)
configureAuthFunc(&daprComponentsClient.Client)
managedEnvironmentsClient := managedenvironments.NewManagedEnvironmentsClientWithBaseURI(endpoint)
configureAuthFunc(&managedEnvironmentsClient.Client)
managedEnvironmentsStoragesClient := managedenvironmentsstorages.NewManagedEnvironmentsStoragesClientWithBaseURI(endpoint)
configureAuthFunc(&managedEnvironmentsStoragesClient.Client)
return Client{
Certificates: &certificatesClient,
ContainerApps: &containerAppsClient,
ContainerAppsAuthConfigs: &containerAppsAuthConfigsClient,
ContainerAppsRevisionReplicas: &containerAppsRevisionReplicasClient,
ContainerAppsRevisions: &containerAppsRevisionsClient,
ContainerAppsSourceControls: &containerAppsSourceControlsClient,
DaprComponents: &daprComponentsClient,
ManagedEnvironments: &managedEnvironmentsClient,
ManagedEnvironmentsStorages: &managedEnvironmentsStoragesClient,
}
}