// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

package armkeyvault

import (
	"github.com/Azure/azure-sdk-for-go/sdk/azcore"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
)

// ClientFactory is a client factory used to create any client in this module.
// Don't use this type directly, use NewClientFactory instead.
type ClientFactory struct {
	subscriptionID string
	internal       *arm.Client
}

// NewClientFactory creates a new instance of ClientFactory with the specified values.
// The parameter values will be propagated to any client created from this factory.
//   - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
//     part of the URI for every service call.
//   - credential - used to authorize requests. Usually a credential from azidentity.
//   - options - pass nil to accept the default values.
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) {
	internal, err := arm.NewClient(moduleName, moduleVersion, credential, options)
	if err != nil {
		return nil, err
	}
	return &ClientFactory{
		subscriptionID: subscriptionID,
		internal:       internal,
	}, nil
}

// NewKeysClient creates a new instance of KeysClient.
func (c *ClientFactory) NewKeysClient() *KeysClient {
	return &KeysClient{
		subscriptionID: c.subscriptionID,
		internal:       c.internal,
	}
}

// NewMHSMPrivateEndpointConnectionsClient creates a new instance of MHSMPrivateEndpointConnectionsClient.
func (c *ClientFactory) NewMHSMPrivateEndpointConnectionsClient() *MHSMPrivateEndpointConnectionsClient {
	return &MHSMPrivateEndpointConnectionsClient{
		subscriptionID: c.subscriptionID,
		internal:       c.internal,
	}
}

// NewMHSMPrivateLinkResourcesClient creates a new instance of MHSMPrivateLinkResourcesClient.
func (c *ClientFactory) NewMHSMPrivateLinkResourcesClient() *MHSMPrivateLinkResourcesClient {
	return &MHSMPrivateLinkResourcesClient{
		subscriptionID: c.subscriptionID,
		internal:       c.internal,
	}
}

// NewMHSMRegionsClient creates a new instance of MHSMRegionsClient.
func (c *ClientFactory) NewMHSMRegionsClient() *MHSMRegionsClient {
	return &MHSMRegionsClient{
		subscriptionID: c.subscriptionID,
		internal:       c.internal,
	}
}

// NewManagedHsmKeysClient creates a new instance of ManagedHsmKeysClient.
func (c *ClientFactory) NewManagedHsmKeysClient() *ManagedHsmKeysClient {
	return &ManagedHsmKeysClient{
		subscriptionID: c.subscriptionID,
		internal:       c.internal,
	}
}

// NewManagedHsmsClient creates a new instance of ManagedHsmsClient.
func (c *ClientFactory) NewManagedHsmsClient() *ManagedHsmsClient {
	return &ManagedHsmsClient{
		subscriptionID: c.subscriptionID,
		internal:       c.internal,
	}
}

// NewOperationsClient creates a new instance of OperationsClient.
func (c *ClientFactory) NewOperationsClient() *OperationsClient {
	return &OperationsClient{
		internal: c.internal,
	}
}

// NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.
func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient {
	return &PrivateEndpointConnectionsClient{
		subscriptionID: c.subscriptionID,
		internal:       c.internal,
	}
}

// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.
func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient {
	return &PrivateLinkResourcesClient{
		subscriptionID: c.subscriptionID,
		internal:       c.internal,
	}
}

// NewSecretsClient creates a new instance of SecretsClient.
func (c *ClientFactory) NewSecretsClient() *SecretsClient {
	return &SecretsClient{
		subscriptionID: c.subscriptionID,
		internal:       c.internal,
	}
}

// NewVaultsClient creates a new instance of VaultsClient.
func (c *ClientFactory) NewVaultsClient() *VaultsClient {
	return &VaultsClient{
		subscriptionID: c.subscriptionID,
		internal:       c.internal,
	}
}
