//go:build go1.18
// +build go1.18

// 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 armkusto

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 - The ID of the target subscription.
//   - 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
}

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

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

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

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

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

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

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

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

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

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

// NewOperationsResultsLocationClient creates a new instance of OperationsResultsLocationClient.
func (c *ClientFactory) NewOperationsResultsLocationClient() *OperationsResultsLocationClient {
	return &OperationsResultsLocationClient{
		subscriptionID: c.subscriptionID,
		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,
	}
}

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

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

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