// 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) Go Code Generator. DO NOT EDIT.

package fake

import (
	"errors"
	"fmt"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
	"net/http"
	"strings"
	"sync"
)

// ServerFactory is a fake server for instances of the armsecurityinsights.ClientFactory type.
type ServerFactory struct {
	// ActionsServer contains the fakes for client ActionsClient
	ActionsServer ActionsServer

	// AlertRuleServer contains the fakes for client AlertRuleClient
	AlertRuleServer AlertRuleServer

	// AlertRuleTemplatesServer contains the fakes for client AlertRuleTemplatesClient
	AlertRuleTemplatesServer AlertRuleTemplatesServer

	// AlertRulesServer contains the fakes for client AlertRulesClient
	AlertRulesServer AlertRulesServer

	// AutomationRulesServer contains the fakes for client AutomationRulesClient
	AutomationRulesServer AutomationRulesServer

	// BillingStatisticsServer contains the fakes for client BillingStatisticsClient
	BillingStatisticsServer BillingStatisticsServer

	// BookmarkServer contains the fakes for client BookmarkClient
	BookmarkServer BookmarkServer

	// BookmarkRelationsServer contains the fakes for client BookmarkRelationsClient
	BookmarkRelationsServer BookmarkRelationsServer

	// BookmarksServer contains the fakes for client BookmarksClient
	BookmarksServer BookmarksServer

	// Server contains the fakes for client Client
	Server Server

	// ContentPackageServer contains the fakes for client ContentPackageClient
	ContentPackageServer ContentPackageServer

	// ContentPackagesServer contains the fakes for client ContentPackagesClient
	ContentPackagesServer ContentPackagesServer

	// ContentTemplateServer contains the fakes for client ContentTemplateClient
	ContentTemplateServer ContentTemplateServer

	// ContentTemplatesServer contains the fakes for client ContentTemplatesClient
	ContentTemplatesServer ContentTemplatesServer

	// DataConnectorDefinitionsServer contains the fakes for client DataConnectorDefinitionsClient
	DataConnectorDefinitionsServer DataConnectorDefinitionsServer

	// DataConnectorsCheckRequirementsServer contains the fakes for client DataConnectorsCheckRequirementsClient
	DataConnectorsCheckRequirementsServer DataConnectorsCheckRequirementsServer

	// DataConnectorsServer contains the fakes for client DataConnectorsClient
	DataConnectorsServer DataConnectorsServer

	// EntitiesServer contains the fakes for client EntitiesClient
	EntitiesServer EntitiesServer

	// EntitiesGetTimelineServer contains the fakes for client EntitiesGetTimelineClient
	EntitiesGetTimelineServer EntitiesGetTimelineServer

	// EntitiesRelationsServer contains the fakes for client EntitiesRelationsClient
	EntitiesRelationsServer EntitiesRelationsServer

	// EntityQueriesServer contains the fakes for client EntityQueriesClient
	EntityQueriesServer EntityQueriesServer

	// EntityQueryTemplatesServer contains the fakes for client EntityQueryTemplatesClient
	EntityQueryTemplatesServer EntityQueryTemplatesServer

	// EntityRelationsServer contains the fakes for client EntityRelationsClient
	EntityRelationsServer EntityRelationsServer

	// FileImportsServer contains the fakes for client FileImportsClient
	FileImportsServer FileImportsServer

	// GetServer contains the fakes for client GetClient
	GetServer GetServer

	// GetRecommendationsServer contains the fakes for client GetRecommendationsClient
	GetRecommendationsServer GetRecommendationsServer

	// GetTriggeredAnalyticsRuleRunsServer contains the fakes for client GetTriggeredAnalyticsRuleRunsClient
	GetTriggeredAnalyticsRuleRunsServer GetTriggeredAnalyticsRuleRunsServer

	// HuntCommentsServer contains the fakes for client HuntCommentsClient
	HuntCommentsServer HuntCommentsServer

	// HuntRelationsServer contains the fakes for client HuntRelationsClient
	HuntRelationsServer HuntRelationsServer

	// HuntsServer contains the fakes for client HuntsClient
	HuntsServer HuntsServer

	// IncidentCommentsServer contains the fakes for client IncidentCommentsClient
	IncidentCommentsServer IncidentCommentsServer

	// IncidentRelationsServer contains the fakes for client IncidentRelationsClient
	IncidentRelationsServer IncidentRelationsServer

	// IncidentTasksServer contains the fakes for client IncidentTasksClient
	IncidentTasksServer IncidentTasksServer

	// IncidentsServer contains the fakes for client IncidentsClient
	IncidentsServer IncidentsServer

	// MetadataServer contains the fakes for client MetadataClient
	MetadataServer MetadataServer

	// OfficeConsentsServer contains the fakes for client OfficeConsentsClient
	OfficeConsentsServer OfficeConsentsServer

	// OperationsServer contains the fakes for client OperationsClient
	OperationsServer OperationsServer

	// ProductPackageServer contains the fakes for client ProductPackageClient
	ProductPackageServer ProductPackageServer

	// ProductPackagesServer contains the fakes for client ProductPackagesClient
	ProductPackagesServer ProductPackagesServer

	// ProductSettingsServer contains the fakes for client ProductSettingsClient
	ProductSettingsServer ProductSettingsServer

	// ProductTemplateServer contains the fakes for client ProductTemplateClient
	ProductTemplateServer ProductTemplateServer

	// ProductTemplatesServer contains the fakes for client ProductTemplatesClient
	ProductTemplatesServer ProductTemplatesServer

	// ReevaluateServer contains the fakes for client ReevaluateClient
	ReevaluateServer ReevaluateServer

	// SecurityMLAnalyticsSettingsServer contains the fakes for client SecurityMLAnalyticsSettingsClient
	SecurityMLAnalyticsSettingsServer SecurityMLAnalyticsSettingsServer

	// SentinelOnboardingStatesServer contains the fakes for client SentinelOnboardingStatesClient
	SentinelOnboardingStatesServer SentinelOnboardingStatesServer

	// SourceControlServer contains the fakes for client SourceControlClient
	SourceControlServer SourceControlServer

	// SourceControlsServer contains the fakes for client SourceControlsClient
	SourceControlsServer SourceControlsServer

	// ThreatIntelligenceServer contains the fakes for client ThreatIntelligenceClient
	ThreatIntelligenceServer ThreatIntelligenceServer

	// ThreatIntelligenceIndicatorServer contains the fakes for client ThreatIntelligenceIndicatorClient
	ThreatIntelligenceIndicatorServer ThreatIntelligenceIndicatorServer

	// ThreatIntelligenceIndicatorMetricsServer contains the fakes for client ThreatIntelligenceIndicatorMetricsClient
	ThreatIntelligenceIndicatorMetricsServer ThreatIntelligenceIndicatorMetricsServer

	// ThreatIntelligenceIndicatorsServer contains the fakes for client ThreatIntelligenceIndicatorsClient
	ThreatIntelligenceIndicatorsServer ThreatIntelligenceIndicatorsServer

	// TriggeredAnalyticsRuleRunServer contains the fakes for client TriggeredAnalyticsRuleRunClient
	TriggeredAnalyticsRuleRunServer TriggeredAnalyticsRuleRunServer

	// UpdateServer contains the fakes for client UpdateClient
	UpdateServer UpdateServer

	// WatchlistItemsServer contains the fakes for client WatchlistItemsClient
	WatchlistItemsServer WatchlistItemsServer

	// WatchlistsServer contains the fakes for client WatchlistsClient
	WatchlistsServer WatchlistsServer

	// WorkspaceManagerAssignmentJobsServer contains the fakes for client WorkspaceManagerAssignmentJobsClient
	WorkspaceManagerAssignmentJobsServer WorkspaceManagerAssignmentJobsServer

	// WorkspaceManagerAssignmentsServer contains the fakes for client WorkspaceManagerAssignmentsClient
	WorkspaceManagerAssignmentsServer WorkspaceManagerAssignmentsServer

	// WorkspaceManagerConfigurationsServer contains the fakes for client WorkspaceManagerConfigurationsClient
	WorkspaceManagerConfigurationsServer WorkspaceManagerConfigurationsServer

	// WorkspaceManagerGroupsServer contains the fakes for client WorkspaceManagerGroupsClient
	WorkspaceManagerGroupsServer WorkspaceManagerGroupsServer

	// WorkspaceManagerMembersServer contains the fakes for client WorkspaceManagerMembersClient
	WorkspaceManagerMembersServer WorkspaceManagerMembersServer
}

// NewServerFactoryTransport creates a new instance of ServerFactoryTransport with the provided implementation.
// The returned ServerFactoryTransport instance is connected to an instance of armsecurityinsights.ClientFactory via the
// azcore.ClientOptions.Transporter field in the client's constructor parameters.
func NewServerFactoryTransport(srv *ServerFactory) *ServerFactoryTransport {
	return &ServerFactoryTransport{
		srv: srv,
	}
}

// ServerFactoryTransport connects instances of armsecurityinsights.ClientFactory to instances of ServerFactory.
// Don't use this type directly, use NewServerFactoryTransport instead.
type ServerFactoryTransport struct {
	srv                                        *ServerFactory
	trMu                                       sync.Mutex
	trActionsServer                            *ActionsServerTransport
	trAlertRuleServer                          *AlertRuleServerTransport
	trAlertRuleTemplatesServer                 *AlertRuleTemplatesServerTransport
	trAlertRulesServer                         *AlertRulesServerTransport
	trAutomationRulesServer                    *AutomationRulesServerTransport
	trBillingStatisticsServer                  *BillingStatisticsServerTransport
	trBookmarkServer                           *BookmarkServerTransport
	trBookmarkRelationsServer                  *BookmarkRelationsServerTransport
	trBookmarksServer                          *BookmarksServerTransport
	trServer                                   *ServerTransport
	trContentPackageServer                     *ContentPackageServerTransport
	trContentPackagesServer                    *ContentPackagesServerTransport
	trContentTemplateServer                    *ContentTemplateServerTransport
	trContentTemplatesServer                   *ContentTemplatesServerTransport
	trDataConnectorDefinitionsServer           *DataConnectorDefinitionsServerTransport
	trDataConnectorsCheckRequirementsServer    *DataConnectorsCheckRequirementsServerTransport
	trDataConnectorsServer                     *DataConnectorsServerTransport
	trEntitiesServer                           *EntitiesServerTransport
	trEntitiesGetTimelineServer                *EntitiesGetTimelineServerTransport
	trEntitiesRelationsServer                  *EntitiesRelationsServerTransport
	trEntityQueriesServer                      *EntityQueriesServerTransport
	trEntityQueryTemplatesServer               *EntityQueryTemplatesServerTransport
	trEntityRelationsServer                    *EntityRelationsServerTransport
	trFileImportsServer                        *FileImportsServerTransport
	trGetServer                                *GetServerTransport
	trGetRecommendationsServer                 *GetRecommendationsServerTransport
	trGetTriggeredAnalyticsRuleRunsServer      *GetTriggeredAnalyticsRuleRunsServerTransport
	trHuntCommentsServer                       *HuntCommentsServerTransport
	trHuntRelationsServer                      *HuntRelationsServerTransport
	trHuntsServer                              *HuntsServerTransport
	trIncidentCommentsServer                   *IncidentCommentsServerTransport
	trIncidentRelationsServer                  *IncidentRelationsServerTransport
	trIncidentTasksServer                      *IncidentTasksServerTransport
	trIncidentsServer                          *IncidentsServerTransport
	trMetadataServer                           *MetadataServerTransport
	trOfficeConsentsServer                     *OfficeConsentsServerTransport
	trOperationsServer                         *OperationsServerTransport
	trProductPackageServer                     *ProductPackageServerTransport
	trProductPackagesServer                    *ProductPackagesServerTransport
	trProductSettingsServer                    *ProductSettingsServerTransport
	trProductTemplateServer                    *ProductTemplateServerTransport
	trProductTemplatesServer                   *ProductTemplatesServerTransport
	trReevaluateServer                         *ReevaluateServerTransport
	trSecurityMLAnalyticsSettingsServer        *SecurityMLAnalyticsSettingsServerTransport
	trSentinelOnboardingStatesServer           *SentinelOnboardingStatesServerTransport
	trSourceControlServer                      *SourceControlServerTransport
	trSourceControlsServer                     *SourceControlsServerTransport
	trThreatIntelligenceServer                 *ThreatIntelligenceServerTransport
	trThreatIntelligenceIndicatorServer        *ThreatIntelligenceIndicatorServerTransport
	trThreatIntelligenceIndicatorMetricsServer *ThreatIntelligenceIndicatorMetricsServerTransport
	trThreatIntelligenceIndicatorsServer       *ThreatIntelligenceIndicatorsServerTransport
	trTriggeredAnalyticsRuleRunServer          *TriggeredAnalyticsRuleRunServerTransport
	trUpdateServer                             *UpdateServerTransport
	trWatchlistItemsServer                     *WatchlistItemsServerTransport
	trWatchlistsServer                         *WatchlistsServerTransport
	trWorkspaceManagerAssignmentJobsServer     *WorkspaceManagerAssignmentJobsServerTransport
	trWorkspaceManagerAssignmentsServer        *WorkspaceManagerAssignmentsServerTransport
	trWorkspaceManagerConfigurationsServer     *WorkspaceManagerConfigurationsServerTransport
	trWorkspaceManagerGroupsServer             *WorkspaceManagerGroupsServerTransport
	trWorkspaceManagerMembersServer            *WorkspaceManagerMembersServerTransport
}

// Do implements the policy.Transporter interface for ServerFactoryTransport.
func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) {
	rawMethod := req.Context().Value(runtime.CtxAPINameKey{})
	method, ok := rawMethod.(string)
	if !ok {
		return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")}
	}

	client := method[:strings.Index(method, ".")]
	var resp *http.Response
	var err error

	switch client {
	case "ActionsClient":
		initServer(&s.trMu, &s.trActionsServer, func() *ActionsServerTransport { return NewActionsServerTransport(&s.srv.ActionsServer) })
		resp, err = s.trActionsServer.Do(req)
	case "AlertRuleClient":
		initServer(&s.trMu, &s.trAlertRuleServer, func() *AlertRuleServerTransport { return NewAlertRuleServerTransport(&s.srv.AlertRuleServer) })
		resp, err = s.trAlertRuleServer.Do(req)
	case "AlertRuleTemplatesClient":
		initServer(&s.trMu, &s.trAlertRuleTemplatesServer, func() *AlertRuleTemplatesServerTransport {
			return NewAlertRuleTemplatesServerTransport(&s.srv.AlertRuleTemplatesServer)
		})
		resp, err = s.trAlertRuleTemplatesServer.Do(req)
	case "AlertRulesClient":
		initServer(&s.trMu, &s.trAlertRulesServer, func() *AlertRulesServerTransport { return NewAlertRulesServerTransport(&s.srv.AlertRulesServer) })
		resp, err = s.trAlertRulesServer.Do(req)
	case "AutomationRulesClient":
		initServer(&s.trMu, &s.trAutomationRulesServer, func() *AutomationRulesServerTransport {
			return NewAutomationRulesServerTransport(&s.srv.AutomationRulesServer)
		})
		resp, err = s.trAutomationRulesServer.Do(req)
	case "BillingStatisticsClient":
		initServer(&s.trMu, &s.trBillingStatisticsServer, func() *BillingStatisticsServerTransport {
			return NewBillingStatisticsServerTransport(&s.srv.BillingStatisticsServer)
		})
		resp, err = s.trBillingStatisticsServer.Do(req)
	case "BookmarkClient":
		initServer(&s.trMu, &s.trBookmarkServer, func() *BookmarkServerTransport { return NewBookmarkServerTransport(&s.srv.BookmarkServer) })
		resp, err = s.trBookmarkServer.Do(req)
	case "BookmarkRelationsClient":
		initServer(&s.trMu, &s.trBookmarkRelationsServer, func() *BookmarkRelationsServerTransport {
			return NewBookmarkRelationsServerTransport(&s.srv.BookmarkRelationsServer)
		})
		resp, err = s.trBookmarkRelationsServer.Do(req)
	case "BookmarksClient":
		initServer(&s.trMu, &s.trBookmarksServer, func() *BookmarksServerTransport { return NewBookmarksServerTransport(&s.srv.BookmarksServer) })
		resp, err = s.trBookmarksServer.Do(req)
	case "Client":
		initServer(&s.trMu, &s.trServer, func() *ServerTransport { return NewServerTransport(&s.srv.Server) })
		resp, err = s.trServer.Do(req)
	case "ContentPackageClient":
		initServer(&s.trMu, &s.trContentPackageServer, func() *ContentPackageServerTransport {
			return NewContentPackageServerTransport(&s.srv.ContentPackageServer)
		})
		resp, err = s.trContentPackageServer.Do(req)
	case "ContentPackagesClient":
		initServer(&s.trMu, &s.trContentPackagesServer, func() *ContentPackagesServerTransport {
			return NewContentPackagesServerTransport(&s.srv.ContentPackagesServer)
		})
		resp, err = s.trContentPackagesServer.Do(req)
	case "ContentTemplateClient":
		initServer(&s.trMu, &s.trContentTemplateServer, func() *ContentTemplateServerTransport {
			return NewContentTemplateServerTransport(&s.srv.ContentTemplateServer)
		})
		resp, err = s.trContentTemplateServer.Do(req)
	case "ContentTemplatesClient":
		initServer(&s.trMu, &s.trContentTemplatesServer, func() *ContentTemplatesServerTransport {
			return NewContentTemplatesServerTransport(&s.srv.ContentTemplatesServer)
		})
		resp, err = s.trContentTemplatesServer.Do(req)
	case "DataConnectorDefinitionsClient":
		initServer(&s.trMu, &s.trDataConnectorDefinitionsServer, func() *DataConnectorDefinitionsServerTransport {
			return NewDataConnectorDefinitionsServerTransport(&s.srv.DataConnectorDefinitionsServer)
		})
		resp, err = s.trDataConnectorDefinitionsServer.Do(req)
	case "DataConnectorsCheckRequirementsClient":
		initServer(&s.trMu, &s.trDataConnectorsCheckRequirementsServer, func() *DataConnectorsCheckRequirementsServerTransport {
			return NewDataConnectorsCheckRequirementsServerTransport(&s.srv.DataConnectorsCheckRequirementsServer)
		})
		resp, err = s.trDataConnectorsCheckRequirementsServer.Do(req)
	case "DataConnectorsClient":
		initServer(&s.trMu, &s.trDataConnectorsServer, func() *DataConnectorsServerTransport {
			return NewDataConnectorsServerTransport(&s.srv.DataConnectorsServer)
		})
		resp, err = s.trDataConnectorsServer.Do(req)
	case "EntitiesClient":
		initServer(&s.trMu, &s.trEntitiesServer, func() *EntitiesServerTransport { return NewEntitiesServerTransport(&s.srv.EntitiesServer) })
		resp, err = s.trEntitiesServer.Do(req)
	case "EntitiesGetTimelineClient":
		initServer(&s.trMu, &s.trEntitiesGetTimelineServer, func() *EntitiesGetTimelineServerTransport {
			return NewEntitiesGetTimelineServerTransport(&s.srv.EntitiesGetTimelineServer)
		})
		resp, err = s.trEntitiesGetTimelineServer.Do(req)
	case "EntitiesRelationsClient":
		initServer(&s.trMu, &s.trEntitiesRelationsServer, func() *EntitiesRelationsServerTransport {
			return NewEntitiesRelationsServerTransport(&s.srv.EntitiesRelationsServer)
		})
		resp, err = s.trEntitiesRelationsServer.Do(req)
	case "EntityQueriesClient":
		initServer(&s.trMu, &s.trEntityQueriesServer, func() *EntityQueriesServerTransport {
			return NewEntityQueriesServerTransport(&s.srv.EntityQueriesServer)
		})
		resp, err = s.trEntityQueriesServer.Do(req)
	case "EntityQueryTemplatesClient":
		initServer(&s.trMu, &s.trEntityQueryTemplatesServer, func() *EntityQueryTemplatesServerTransport {
			return NewEntityQueryTemplatesServerTransport(&s.srv.EntityQueryTemplatesServer)
		})
		resp, err = s.trEntityQueryTemplatesServer.Do(req)
	case "EntityRelationsClient":
		initServer(&s.trMu, &s.trEntityRelationsServer, func() *EntityRelationsServerTransport {
			return NewEntityRelationsServerTransport(&s.srv.EntityRelationsServer)
		})
		resp, err = s.trEntityRelationsServer.Do(req)
	case "FileImportsClient":
		initServer(&s.trMu, &s.trFileImportsServer, func() *FileImportsServerTransport { return NewFileImportsServerTransport(&s.srv.FileImportsServer) })
		resp, err = s.trFileImportsServer.Do(req)
	case "GetClient":
		initServer(&s.trMu, &s.trGetServer, func() *GetServerTransport { return NewGetServerTransport(&s.srv.GetServer) })
		resp, err = s.trGetServer.Do(req)
	case "GetRecommendationsClient":
		initServer(&s.trMu, &s.trGetRecommendationsServer, func() *GetRecommendationsServerTransport {
			return NewGetRecommendationsServerTransport(&s.srv.GetRecommendationsServer)
		})
		resp, err = s.trGetRecommendationsServer.Do(req)
	case "GetTriggeredAnalyticsRuleRunsClient":
		initServer(&s.trMu, &s.trGetTriggeredAnalyticsRuleRunsServer, func() *GetTriggeredAnalyticsRuleRunsServerTransport {
			return NewGetTriggeredAnalyticsRuleRunsServerTransport(&s.srv.GetTriggeredAnalyticsRuleRunsServer)
		})
		resp, err = s.trGetTriggeredAnalyticsRuleRunsServer.Do(req)
	case "HuntCommentsClient":
		initServer(&s.trMu, &s.trHuntCommentsServer, func() *HuntCommentsServerTransport { return NewHuntCommentsServerTransport(&s.srv.HuntCommentsServer) })
		resp, err = s.trHuntCommentsServer.Do(req)
	case "HuntRelationsClient":
		initServer(&s.trMu, &s.trHuntRelationsServer, func() *HuntRelationsServerTransport {
			return NewHuntRelationsServerTransport(&s.srv.HuntRelationsServer)
		})
		resp, err = s.trHuntRelationsServer.Do(req)
	case "HuntsClient":
		initServer(&s.trMu, &s.trHuntsServer, func() *HuntsServerTransport { return NewHuntsServerTransport(&s.srv.HuntsServer) })
		resp, err = s.trHuntsServer.Do(req)
	case "IncidentCommentsClient":
		initServer(&s.trMu, &s.trIncidentCommentsServer, func() *IncidentCommentsServerTransport {
			return NewIncidentCommentsServerTransport(&s.srv.IncidentCommentsServer)
		})
		resp, err = s.trIncidentCommentsServer.Do(req)
	case "IncidentRelationsClient":
		initServer(&s.trMu, &s.trIncidentRelationsServer, func() *IncidentRelationsServerTransport {
			return NewIncidentRelationsServerTransport(&s.srv.IncidentRelationsServer)
		})
		resp, err = s.trIncidentRelationsServer.Do(req)
	case "IncidentTasksClient":
		initServer(&s.trMu, &s.trIncidentTasksServer, func() *IncidentTasksServerTransport {
			return NewIncidentTasksServerTransport(&s.srv.IncidentTasksServer)
		})
		resp, err = s.trIncidentTasksServer.Do(req)
	case "IncidentsClient":
		initServer(&s.trMu, &s.trIncidentsServer, func() *IncidentsServerTransport { return NewIncidentsServerTransport(&s.srv.IncidentsServer) })
		resp, err = s.trIncidentsServer.Do(req)
	case "MetadataClient":
		initServer(&s.trMu, &s.trMetadataServer, func() *MetadataServerTransport { return NewMetadataServerTransport(&s.srv.MetadataServer) })
		resp, err = s.trMetadataServer.Do(req)
	case "OfficeConsentsClient":
		initServer(&s.trMu, &s.trOfficeConsentsServer, func() *OfficeConsentsServerTransport {
			return NewOfficeConsentsServerTransport(&s.srv.OfficeConsentsServer)
		})
		resp, err = s.trOfficeConsentsServer.Do(req)
	case "OperationsClient":
		initServer(&s.trMu, &s.trOperationsServer, func() *OperationsServerTransport { return NewOperationsServerTransport(&s.srv.OperationsServer) })
		resp, err = s.trOperationsServer.Do(req)
	case "ProductPackageClient":
		initServer(&s.trMu, &s.trProductPackageServer, func() *ProductPackageServerTransport {
			return NewProductPackageServerTransport(&s.srv.ProductPackageServer)
		})
		resp, err = s.trProductPackageServer.Do(req)
	case "ProductPackagesClient":
		initServer(&s.trMu, &s.trProductPackagesServer, func() *ProductPackagesServerTransport {
			return NewProductPackagesServerTransport(&s.srv.ProductPackagesServer)
		})
		resp, err = s.trProductPackagesServer.Do(req)
	case "ProductSettingsClient":
		initServer(&s.trMu, &s.trProductSettingsServer, func() *ProductSettingsServerTransport {
			return NewProductSettingsServerTransport(&s.srv.ProductSettingsServer)
		})
		resp, err = s.trProductSettingsServer.Do(req)
	case "ProductTemplateClient":
		initServer(&s.trMu, &s.trProductTemplateServer, func() *ProductTemplateServerTransport {
			return NewProductTemplateServerTransport(&s.srv.ProductTemplateServer)
		})
		resp, err = s.trProductTemplateServer.Do(req)
	case "ProductTemplatesClient":
		initServer(&s.trMu, &s.trProductTemplatesServer, func() *ProductTemplatesServerTransport {
			return NewProductTemplatesServerTransport(&s.srv.ProductTemplatesServer)
		})
		resp, err = s.trProductTemplatesServer.Do(req)
	case "ReevaluateClient":
		initServer(&s.trMu, &s.trReevaluateServer, func() *ReevaluateServerTransport { return NewReevaluateServerTransport(&s.srv.ReevaluateServer) })
		resp, err = s.trReevaluateServer.Do(req)
	case "SecurityMLAnalyticsSettingsClient":
		initServer(&s.trMu, &s.trSecurityMLAnalyticsSettingsServer, func() *SecurityMLAnalyticsSettingsServerTransport {
			return NewSecurityMLAnalyticsSettingsServerTransport(&s.srv.SecurityMLAnalyticsSettingsServer)
		})
		resp, err = s.trSecurityMLAnalyticsSettingsServer.Do(req)
	case "SentinelOnboardingStatesClient":
		initServer(&s.trMu, &s.trSentinelOnboardingStatesServer, func() *SentinelOnboardingStatesServerTransport {
			return NewSentinelOnboardingStatesServerTransport(&s.srv.SentinelOnboardingStatesServer)
		})
		resp, err = s.trSentinelOnboardingStatesServer.Do(req)
	case "SourceControlClient":
		initServer(&s.trMu, &s.trSourceControlServer, func() *SourceControlServerTransport {
			return NewSourceControlServerTransport(&s.srv.SourceControlServer)
		})
		resp, err = s.trSourceControlServer.Do(req)
	case "SourceControlsClient":
		initServer(&s.trMu, &s.trSourceControlsServer, func() *SourceControlsServerTransport {
			return NewSourceControlsServerTransport(&s.srv.SourceControlsServer)
		})
		resp, err = s.trSourceControlsServer.Do(req)
	case "ThreatIntelligenceClient":
		initServer(&s.trMu, &s.trThreatIntelligenceServer, func() *ThreatIntelligenceServerTransport {
			return NewThreatIntelligenceServerTransport(&s.srv.ThreatIntelligenceServer)
		})
		resp, err = s.trThreatIntelligenceServer.Do(req)
	case "ThreatIntelligenceIndicatorClient":
		initServer(&s.trMu, &s.trThreatIntelligenceIndicatorServer, func() *ThreatIntelligenceIndicatorServerTransport {
			return NewThreatIntelligenceIndicatorServerTransport(&s.srv.ThreatIntelligenceIndicatorServer)
		})
		resp, err = s.trThreatIntelligenceIndicatorServer.Do(req)
	case "ThreatIntelligenceIndicatorMetricsClient":
		initServer(&s.trMu, &s.trThreatIntelligenceIndicatorMetricsServer, func() *ThreatIntelligenceIndicatorMetricsServerTransport {
			return NewThreatIntelligenceIndicatorMetricsServerTransport(&s.srv.ThreatIntelligenceIndicatorMetricsServer)
		})
		resp, err = s.trThreatIntelligenceIndicatorMetricsServer.Do(req)
	case "ThreatIntelligenceIndicatorsClient":
		initServer(&s.trMu, &s.trThreatIntelligenceIndicatorsServer, func() *ThreatIntelligenceIndicatorsServerTransport {
			return NewThreatIntelligenceIndicatorsServerTransport(&s.srv.ThreatIntelligenceIndicatorsServer)
		})
		resp, err = s.trThreatIntelligenceIndicatorsServer.Do(req)
	case "TriggeredAnalyticsRuleRunClient":
		initServer(&s.trMu, &s.trTriggeredAnalyticsRuleRunServer, func() *TriggeredAnalyticsRuleRunServerTransport {
			return NewTriggeredAnalyticsRuleRunServerTransport(&s.srv.TriggeredAnalyticsRuleRunServer)
		})
		resp, err = s.trTriggeredAnalyticsRuleRunServer.Do(req)
	case "UpdateClient":
		initServer(&s.trMu, &s.trUpdateServer, func() *UpdateServerTransport { return NewUpdateServerTransport(&s.srv.UpdateServer) })
		resp, err = s.trUpdateServer.Do(req)
	case "WatchlistItemsClient":
		initServer(&s.trMu, &s.trWatchlistItemsServer, func() *WatchlistItemsServerTransport {
			return NewWatchlistItemsServerTransport(&s.srv.WatchlistItemsServer)
		})
		resp, err = s.trWatchlistItemsServer.Do(req)
	case "WatchlistsClient":
		initServer(&s.trMu, &s.trWatchlistsServer, func() *WatchlistsServerTransport { return NewWatchlistsServerTransport(&s.srv.WatchlistsServer) })
		resp, err = s.trWatchlistsServer.Do(req)
	case "WorkspaceManagerAssignmentJobsClient":
		initServer(&s.trMu, &s.trWorkspaceManagerAssignmentJobsServer, func() *WorkspaceManagerAssignmentJobsServerTransport {
			return NewWorkspaceManagerAssignmentJobsServerTransport(&s.srv.WorkspaceManagerAssignmentJobsServer)
		})
		resp, err = s.trWorkspaceManagerAssignmentJobsServer.Do(req)
	case "WorkspaceManagerAssignmentsClient":
		initServer(&s.trMu, &s.trWorkspaceManagerAssignmentsServer, func() *WorkspaceManagerAssignmentsServerTransport {
			return NewWorkspaceManagerAssignmentsServerTransport(&s.srv.WorkspaceManagerAssignmentsServer)
		})
		resp, err = s.trWorkspaceManagerAssignmentsServer.Do(req)
	case "WorkspaceManagerConfigurationsClient":
		initServer(&s.trMu, &s.trWorkspaceManagerConfigurationsServer, func() *WorkspaceManagerConfigurationsServerTransport {
			return NewWorkspaceManagerConfigurationsServerTransport(&s.srv.WorkspaceManagerConfigurationsServer)
		})
		resp, err = s.trWorkspaceManagerConfigurationsServer.Do(req)
	case "WorkspaceManagerGroupsClient":
		initServer(&s.trMu, &s.trWorkspaceManagerGroupsServer, func() *WorkspaceManagerGroupsServerTransport {
			return NewWorkspaceManagerGroupsServerTransport(&s.srv.WorkspaceManagerGroupsServer)
		})
		resp, err = s.trWorkspaceManagerGroupsServer.Do(req)
	case "WorkspaceManagerMembersClient":
		initServer(&s.trMu, &s.trWorkspaceManagerMembersServer, func() *WorkspaceManagerMembersServerTransport {
			return NewWorkspaceManagerMembersServerTransport(&s.srv.WorkspaceManagerMembersServer)
		})
		resp, err = s.trWorkspaceManagerMembersServer.Do(req)
	default:
		err = fmt.Errorf("unhandled client %s", client)
	}

	if err != nil {
		return nil, err
	}

	return resp, nil
}
