From d6440304eb81b59533413046aecdb73447b81740 Mon Sep 17 00:00:00 2001 From: fossand Date: Wed, 6 Mar 2024 14:22:37 -0800 Subject: [PATCH] feat: add CredentialIdentityResolverPlugin related client changes --- Sources/Services/AWSACM/ACMClient.swift | 18 +----- Sources/Services/AWSACM/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSACMPCA/ACMPCAClient.swift | 18 +----- Sources/Services/AWSACMPCA/Plugins.swift | 55 +++++++++++++++++++ .../AWSAPIGateway/APIGatewayClient.swift | 18 +----- Sources/Services/AWSAPIGateway/Plugins.swift | 55 +++++++++++++++++++ .../ARCZonalShiftClient.swift | 18 +----- .../Services/AWSARCZonalShift/Plugins.swift | 55 +++++++++++++++++++ .../AccessAnalyzerClient.swift | 18 +----- .../Services/AWSAccessAnalyzer/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSAccount/AccountClient.swift | 18 +----- Sources/Services/AWSAccount/Plugins.swift | 55 +++++++++++++++++++ .../AlexaForBusinessClient.swift | 18 +----- .../AWSAlexaForBusiness/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSAmp/AmpClient.swift | 18 +----- Sources/Services/AWSAmp/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSAmplify/AmplifyClient.swift | 18 +----- Sources/Services/AWSAmplify/Plugins.swift | 55 +++++++++++++++++++ .../AmplifyBackendClient.swift | 18 +----- .../Services/AWSAmplifyBackend/Plugins.swift | 55 +++++++++++++++++++ .../AmplifyUIBuilderClient.swift | 18 +----- .../AWSAmplifyUIBuilder/Plugins.swift | 55 +++++++++++++++++++ .../ApiGatewayManagementApiClient.swift | 18 +----- .../AWSApiGatewayManagementApi/Plugins.swift | 55 +++++++++++++++++++ .../AWSApiGatewayV2/ApiGatewayV2Client.swift | 18 +----- .../Services/AWSApiGatewayV2/Plugins.swift | 55 +++++++++++++++++++ .../AWSAppConfig/AppConfigClient.swift | 18 +----- Sources/Services/AWSAppConfig/Plugins.swift | 55 +++++++++++++++++++ .../AppConfigDataClient.swift | 18 +----- .../Services/AWSAppConfigData/Plugins.swift | 55 +++++++++++++++++++ .../AWSAppFabric/AppFabricClient.swift | 18 +----- Sources/Services/AWSAppFabric/Plugins.swift | 55 +++++++++++++++++++ .../AppIntegrationsClient.swift | 18 +----- .../Services/AWSAppIntegrations/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSAppMesh/AppMeshClient.swift | 18 +----- Sources/Services/AWSAppMesh/Plugins.swift | 55 +++++++++++++++++++ .../AWSAppRunner/AppRunnerClient.swift | 18 +----- Sources/Services/AWSAppRunner/Plugins.swift | 55 +++++++++++++++++++ .../AWSAppStream/AppStreamClient.swift | 18 +----- Sources/Services/AWSAppStream/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSAppSync/AppSyncClient.swift | 18 +----- Sources/Services/AWSAppSync/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSAppflow/AppflowClient.swift | 18 +----- Sources/Services/AWSAppflow/Plugins.swift | 55 +++++++++++++++++++ .../ApplicationAutoScalingClient.swift | 18 +----- .../AWSApplicationAutoScaling/Plugins.swift | 55 +++++++++++++++++++ .../ApplicationCostProfilerClient.swift | 18 +----- .../AWSApplicationCostProfiler/Plugins.swift | 55 +++++++++++++++++++ .../ApplicationDiscoveryClient.swift | 18 +----- .../Plugins.swift | 55 +++++++++++++++++++ .../ApplicationInsightsClient.swift | 18 +----- .../AWSApplicationInsights/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSArtifact/ArtifactClient.swift | 18 +----- Sources/Services/AWSArtifact/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSAthena/AthenaClient.swift | 18 +----- Sources/Services/AWSAthena/Plugins.swift | 55 +++++++++++++++++++ .../AWSAuditManager/AuditManagerClient.swift | 18 +----- .../Services/AWSAuditManager/Plugins.swift | 55 +++++++++++++++++++ .../AWSAutoScaling/AutoScalingClient.swift | 18 +----- Sources/Services/AWSAutoScaling/Plugins.swift | 55 +++++++++++++++++++ .../AutoScalingPlansClient.swift | 18 +----- .../AWSAutoScalingPlans/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSB2bi/B2biClient.swift | 18 +----- Sources/Services/AWSB2bi/Plugins.swift | 55 +++++++++++++++++++ .../BCMDataExportsClient.swift | 18 +----- .../Services/AWSBCMDataExports/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSBackup/BackupClient.swift | 18 +----- Sources/Services/AWSBackup/Plugins.swift | 55 +++++++++++++++++++ .../BackupGatewayClient.swift | 18 +----- .../Services/AWSBackupGateway/Plugins.swift | 55 +++++++++++++++++++ .../BackupStorageClient.swift | 18 +----- .../Services/AWSBackupStorage/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSBatch/BatchClient.swift | 18 +----- Sources/Services/AWSBatch/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSBedrock/BedrockClient.swift | 18 +----- Sources/Services/AWSBedrock/Plugins.swift | 55 +++++++++++++++++++ .../AWSBedrockAgent/BedrockAgentClient.swift | 18 +----- .../Services/AWSBedrockAgent/Plugins.swift | 55 +++++++++++++++++++ .../BedrockAgentRuntimeClient.swift | 18 +----- .../AWSBedrockAgentRuntime/Plugins.swift | 55 +++++++++++++++++++ .../BedrockRuntimeClient.swift | 18 +----- .../Services/AWSBedrockRuntime/Plugins.swift | 55 +++++++++++++++++++ .../BillingconductorClient.swift | 18 +----- .../AWSBillingconductor/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSBraket/BraketClient.swift | 18 +----- Sources/Services/AWSBraket/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSBudgets/BudgetsClient.swift | 18 +----- Sources/Services/AWSBudgets/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSChatbot/ChatbotClient.swift | 18 +----- Sources/Services/AWSChatbot/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSChime/ChimeClient.swift | 18 +----- Sources/Services/AWSChime/Plugins.swift | 55 +++++++++++++++++++ .../ChimeSDKIdentityClient.swift | 18 +----- .../AWSChimeSDKIdentity/Plugins.swift | 55 +++++++++++++++++++ .../ChimeSDKMediaPipelinesClient.swift | 18 +----- .../AWSChimeSDKMediaPipelines/Plugins.swift | 55 +++++++++++++++++++ .../ChimeSDKMeetingsClient.swift | 18 +----- .../AWSChimeSDKMeetings/Plugins.swift | 55 +++++++++++++++++++ .../ChimeSDKMessagingClient.swift | 18 +----- .../AWSChimeSDKMessaging/Plugins.swift | 55 +++++++++++++++++++ .../ChimeSDKVoiceClient.swift | 18 +----- .../Services/AWSChimeSDKVoice/Plugins.swift | 55 +++++++++++++++++++ .../AWSCleanRooms/CleanRoomsClient.swift | 18 +----- Sources/Services/AWSCleanRooms/Plugins.swift | 55 +++++++++++++++++++ .../AWSCleanRoomsML/CleanRoomsMLClient.swift | 18 +----- .../Services/AWSCleanRoomsML/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSCloud9/Cloud9Client.swift | 18 +----- Sources/Services/AWSCloud9/Plugins.swift | 55 +++++++++++++++++++ .../AWSCloudControl/CloudControlClient.swift | 18 +----- .../Services/AWSCloudControl/Plugins.swift | 55 +++++++++++++++++++ .../CloudDirectoryClient.swift | 18 +----- .../Services/AWSCloudDirectory/Plugins.swift | 55 +++++++++++++++++++ .../CloudFormationClient.swift | 18 +----- .../Services/AWSCloudFormation/Plugins.swift | 55 +++++++++++++++++++ .../AWSCloudFront/CloudFrontClient.swift | 18 +----- Sources/Services/AWSCloudFront/Plugins.swift | 55 +++++++++++++++++++ .../CloudFrontKeyValueStoreClient.swift | 18 +----- .../AWSCloudFrontKeyValueStore/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSCloudHSM/CloudHSMClient.swift | 18 +----- Sources/Services/AWSCloudHSM/Plugins.swift | 55 +++++++++++++++++++ .../AWSCloudHSMV2/CloudHSMV2Client.swift | 18 +----- Sources/Services/AWSCloudHSMV2/Plugins.swift | 55 +++++++++++++++++++ .../AWSCloudSearch/CloudSearchClient.swift | 18 +----- Sources/Services/AWSCloudSearch/Plugins.swift | 55 +++++++++++++++++++ .../CloudSearchDomainClient.swift | 18 +----- .../AWSCloudSearchDomain/Plugins.swift | 55 +++++++++++++++++++ .../AWSCloudTrail/CloudTrailClient.swift | 18 +----- Sources/Services/AWSCloudTrail/Plugins.swift | 55 +++++++++++++++++++ .../CloudTrailDataClient.swift | 18 +----- .../Services/AWSCloudTrailData/Plugins.swift | 55 +++++++++++++++++++ .../AWSCloudWatch/CloudWatchClient.swift | 18 +----- Sources/Services/AWSCloudWatch/Plugins.swift | 55 +++++++++++++++++++ .../CloudWatchEventsClient.swift | 18 +----- .../AWSCloudWatchEvents/Plugins.swift | 55 +++++++++++++++++++ .../CloudWatchLogsClient.swift | 18 +----- .../Services/AWSCloudWatchLogs/Plugins.swift | 55 +++++++++++++++++++ .../AWSCodeBuild/CodeBuildClient.swift | 18 +----- Sources/Services/AWSCodeBuild/Plugins.swift | 55 +++++++++++++++++++ .../AWSCodeCatalyst/CodeCatalystClient.swift | 18 +----- .../Services/AWSCodeCatalyst/Plugins.swift | 55 +++++++++++++++++++ .../AWSCodeCommit/CodeCommitClient.swift | 18 +----- Sources/Services/AWSCodeCommit/Plugins.swift | 55 +++++++++++++++++++ .../AWSCodeDeploy/CodeDeployClient.swift | 18 +----- Sources/Services/AWSCodeDeploy/Plugins.swift | 55 +++++++++++++++++++ .../CodeGuruProfilerClient.swift | 18 +----- .../AWSCodeGuruProfiler/Plugins.swift | 55 +++++++++++++++++++ .../CodeGuruReviewerClient.swift | 18 +----- .../AWSCodeGuruReviewer/Plugins.swift | 55 +++++++++++++++++++ .../CodeGuruSecurityClient.swift | 18 +----- .../AWSCodeGuruSecurity/Plugins.swift | 55 +++++++++++++++++++ .../AWSCodePipeline/CodePipelineClient.swift | 18 +----- .../Services/AWSCodePipeline/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSCodeStar/CodeStarClient.swift | 18 +----- Sources/Services/AWSCodeStar/Plugins.swift | 55 +++++++++++++++++++ .../CodeStarconnectionsClient.swift | 18 +----- .../AWSCodeStarconnections/Plugins.swift | 55 +++++++++++++++++++ .../AWSCodeartifact/CodeartifactClient.swift | 18 +----- .../Services/AWSCodeartifact/Plugins.swift | 55 +++++++++++++++++++ .../CodestarnotificationsClient.swift | 18 +----- .../AWSCodestarnotifications/Plugins.swift | 55 +++++++++++++++++++ .../CognitoIdentityClient.swift | 18 +----- .../Services/AWSCognitoIdentity/Plugins.swift | 55 +++++++++++++++++++ .../CognitoIdentityProviderClient.swift | 18 +----- .../AWSCognitoIdentityProvider/Plugins.swift | 55 +++++++++++++++++++ .../AWSCognitoSync/CognitoSyncClient.swift | 18 +----- Sources/Services/AWSCognitoSync/Plugins.swift | 55 +++++++++++++++++++ .../AWSComprehend/ComprehendClient.swift | 18 +----- Sources/Services/AWSComprehend/Plugins.swift | 55 +++++++++++++++++++ .../ComprehendMedicalClient.swift | 18 +----- .../AWSComprehendMedical/Plugins.swift | 55 +++++++++++++++++++ .../ComputeOptimizerClient.swift | 18 +----- .../AWSComputeOptimizer/Plugins.swift | 55 +++++++++++++++++++ .../AWSConfigService/ConfigClient.swift | 18 +----- .../Services/AWSConfigService/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSConnect/ConnectClient.swift | 18 +----- Sources/Services/AWSConnect/Plugins.swift | 55 +++++++++++++++++++ .../ConnectCampaignsClient.swift | 18 +----- .../AWSConnectCampaigns/Plugins.swift | 55 +++++++++++++++++++ .../AWSConnectCases/ConnectCasesClient.swift | 18 +----- .../Services/AWSConnectCases/Plugins.swift | 55 +++++++++++++++++++ .../ConnectContactLensClient.swift | 18 +----- .../AWSConnectContactLens/Plugins.swift | 55 +++++++++++++++++++ .../ConnectParticipantClient.swift | 18 +----- .../AWSConnectParticipant/Plugins.swift | 55 +++++++++++++++++++ .../AWSControlTower/ControlTowerClient.swift | 18 +----- .../Services/AWSControlTower/Plugins.swift | 55 +++++++++++++++++++ .../AWSCostExplorer/CostExplorerClient.swift | 18 +----- .../Services/AWSCostExplorer/Plugins.swift | 55 +++++++++++++++++++ .../CostOptimizationHubClient.swift | 18 +----- .../AWSCostOptimizationHub/Plugins.swift | 55 +++++++++++++++++++ .../CostandUsageReportClient.swift | 18 +----- .../Plugins.swift | 55 +++++++++++++++++++ .../CustomerProfilesClient.swift | 18 +----- .../AWSCustomerProfiles/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSDAX/DAXClient.swift | 18 +----- Sources/Services/AWSDAX/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSDLM/DLMClient.swift | 18 +----- Sources/Services/AWSDLM/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSDataBrew/DataBrewClient.swift | 18 +----- Sources/Services/AWSDataBrew/Plugins.swift | 55 +++++++++++++++++++ .../AWSDataExchange/DataExchangeClient.swift | 18 +----- .../Services/AWSDataExchange/Plugins.swift | 55 +++++++++++++++++++ .../AWSDataPipeline/DataPipelineClient.swift | 18 +----- .../Services/AWSDataPipeline/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSDataSync/DataSyncClient.swift | 18 +----- Sources/Services/AWSDataSync/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSDataZone/DataZoneClient.swift | 18 +----- Sources/Services/AWSDataZone/Plugins.swift | 55 +++++++++++++++++++ .../DatabaseMigrationClient.swift | 18 +----- .../AWSDatabaseMigrationService/Plugins.swift | 55 +++++++++++++++++++ .../AWSDetective/DetectiveClient.swift | 18 +----- Sources/Services/AWSDetective/Plugins.swift | 55 +++++++++++++++++++ .../AWSDevOpsGuru/DevOpsGuruClient.swift | 18 +----- Sources/Services/AWSDevOpsGuru/Plugins.swift | 55 +++++++++++++++++++ .../AWSDeviceFarm/DeviceFarmClient.swift | 18 +----- Sources/Services/AWSDeviceFarm/Plugins.swift | 55 +++++++++++++++++++ .../DirectConnectClient.swift | 18 +----- .../Services/AWSDirectConnect/Plugins.swift | 55 +++++++++++++++++++ .../AWSDirectoryService/DirectoryClient.swift | 18 +----- .../AWSDirectoryService/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSDocDB/DocDBClient.swift | 18 +----- Sources/Services/AWSDocDB/Plugins.swift | 55 +++++++++++++++++++ .../AWSDocDBElastic/DocDBElasticClient.swift | 18 +----- .../Services/AWSDocDBElastic/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSDrs/DrsClient.swift | 18 +----- Sources/Services/AWSDrs/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSDynamoDB/DynamoDBClient.swift | 18 +----- Sources/Services/AWSDynamoDB/Plugins.swift | 55 +++++++++++++++++++ .../DynamoDBStreamsClient.swift | 18 +----- .../Services/AWSDynamoDBStreams/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSEBS/EBSClient.swift | 18 +----- Sources/Services/AWSEBS/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSEC2/EC2Client.swift | 18 +----- Sources/Services/AWSEC2/Plugins.swift | 55 +++++++++++++++++++ .../EC2InstanceConnectClient.swift | 18 +----- .../AWSEC2InstanceConnect/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSECR/ECRClient.swift | 18 +----- Sources/Services/AWSECR/Plugins.swift | 55 +++++++++++++++++++ .../AWSECRPUBLIC/ECRPUBLICClient.swift | 18 +----- Sources/Services/AWSECRPUBLIC/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSECS/ECSClient.swift | 18 +----- Sources/Services/AWSECS/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSEFS/EFSClient.swift | 18 +----- Sources/Services/AWSEFS/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSEKS/EKSClient.swift | 18 +----- Sources/Services/AWSEKS/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSEKSAuth/EKSAuthClient.swift | 18 +----- Sources/Services/AWSEKSAuth/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSEMR/EMRClient.swift | 18 +----- Sources/Services/AWSEMR/Plugins.swift | 55 +++++++++++++++++++ .../EMRServerlessClient.swift | 18 +----- .../Services/AWSEMRServerless/Plugins.swift | 55 +++++++++++++++++++ .../EMRcontainersClient.swift | 18 +----- .../Services/AWSEMRcontainers/Plugins.swift | 55 +++++++++++++++++++ .../AWSElastiCache/ElastiCacheClient.swift | 18 +----- Sources/Services/AWSElastiCache/Plugins.swift | 55 +++++++++++++++++++ .../ElasticBeanstalkClient.swift | 18 +----- .../AWSElasticBeanstalk/Plugins.swift | 55 +++++++++++++++++++ .../ElasticInferenceClient.swift | 18 +----- .../AWSElasticInference/Plugins.swift | 55 +++++++++++++++++++ .../ElasticLoadBalancingClient.swift | 18 +----- .../AWSElasticLoadBalancing/Plugins.swift | 55 +++++++++++++++++++ .../ElasticLoadBalancingv2Client.swift | 18 +----- .../AWSElasticLoadBalancingv2/Plugins.swift | 55 +++++++++++++++++++ .../ElasticTranscoderClient.swift | 18 +----- .../AWSElasticTranscoder/Plugins.swift | 55 +++++++++++++++++++ .../ElasticsearchClient.swift | 18 +----- .../AWSElasticsearchService/Plugins.swift | 55 +++++++++++++++++++ .../EntityResolutionClient.swift | 18 +----- .../AWSEntityResolution/Plugins.swift | 55 +++++++++++++++++++ .../AWSEventBridge/EventBridgeClient.swift | 18 +----- Sources/Services/AWSEventBridge/Plugins.swift | 55 +++++++++++++++++++ .../AWSEvidently/EvidentlyClient.swift | 18 +----- Sources/Services/AWSEvidently/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSFMS/FMSClient.swift | 18 +----- Sources/Services/AWSFMS/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSFSx/FSxClient.swift | 18 +----- Sources/Services/AWSFSx/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSFinspace/FinspaceClient.swift | 18 +----- Sources/Services/AWSFinspace/Plugins.swift | 55 +++++++++++++++++++ .../AWSFinspacedata/FinspacedataClient.swift | 18 +----- .../Services/AWSFinspacedata/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSFirehose/FirehoseClient.swift | 18 +----- Sources/Services/AWSFirehose/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSFis/FisClient.swift | 18 +----- Sources/Services/AWSFis/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSForecast/ForecastClient.swift | 18 +----- Sources/Services/AWSForecast/Plugins.swift | 55 +++++++++++++++++++ .../ForecastqueryClient.swift | 18 +----- .../Services/AWSForecastquery/Plugins.swift | 55 +++++++++++++++++++ .../FraudDetectorClient.swift | 18 +----- .../Services/AWSFraudDetector/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSFreeTier/FreeTierClient.swift | 18 +----- Sources/Services/AWSFreeTier/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSGameLift/GameLiftClient.swift | 18 +----- Sources/Services/AWSGameLift/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSGlacier/GlacierClient.swift | 18 +----- Sources/Services/AWSGlacier/Plugins.swift | 55 +++++++++++++++++++ .../GlobalAcceleratorClient.swift | 18 +----- .../AWSGlobalAccelerator/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSGlue/GlueClient.swift | 18 +----- Sources/Services/AWSGlue/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSGrafana/GrafanaClient.swift | 18 +----- Sources/Services/AWSGrafana/Plugins.swift | 55 +++++++++++++++++++ .../AWSGreengrass/GreengrassClient.swift | 18 +----- Sources/Services/AWSGreengrass/Plugins.swift | 55 +++++++++++++++++++ .../AWSGreengrassV2/GreengrassV2Client.swift | 18 +----- .../Services/AWSGreengrassV2/Plugins.swift | 55 +++++++++++++++++++ .../GroundStationClient.swift | 18 +----- .../Services/AWSGroundStation/Plugins.swift | 55 +++++++++++++++++++ .../AWSGuardDuty/GuardDutyClient.swift | 18 +----- Sources/Services/AWSGuardDuty/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSHealth/HealthClient.swift | 18 +----- Sources/Services/AWSHealth/Plugins.swift | 55 +++++++++++++++++++ .../AWSHealthLake/HealthLakeClient.swift | 18 +----- Sources/Services/AWSHealthLake/Plugins.swift | 55 +++++++++++++++++++ .../AWSHoneycode/HoneycodeClient.swift | 18 +----- Sources/Services/AWSHoneycode/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSIAM/IAMClient.swift | 18 +----- Sources/Services/AWSIAM/Plugins.swift | 55 +++++++++++++++++++ .../AWSIVSRealTime/IVSRealTimeClient.swift | 18 +----- Sources/Services/AWSIVSRealTime/Plugins.swift | 55 +++++++++++++++++++ .../IdentitystoreClient.swift | 18 +----- .../Services/AWSIdentitystore/Plugins.swift | 55 +++++++++++++++++++ .../AWSImagebuilder/ImagebuilderClient.swift | 18 +----- .../Services/AWSImagebuilder/Plugins.swift | 55 +++++++++++++++++++ .../AWSInspector/InspectorClient.swift | 18 +----- Sources/Services/AWSInspector/Plugins.swift | 55 +++++++++++++++++++ .../AWSInspector2/Inspector2Client.swift | 18 +----- Sources/Services/AWSInspector2/Plugins.swift | 55 +++++++++++++++++++ .../InspectorScanClient.swift | 18 +----- .../Services/AWSInspectorScan/Plugins.swift | 55 +++++++++++++++++++ .../InternetMonitorClient.swift | 18 +----- .../Services/AWSInternetMonitor/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSIoT/IoTClient.swift | 18 +----- Sources/Services/AWSIoT/Plugins.swift | 55 +++++++++++++++++++ .../IoT1ClickDevicesClient.swift | 18 +----- .../AWSIoT1ClickDevicesService/Plugins.swift | 55 +++++++++++++++++++ .../IoT1ClickProjectsClient.swift | 18 +----- .../AWSIoT1ClickProjects/Plugins.swift | 55 +++++++++++++++++++ .../AWSIoTAnalytics/IoTAnalyticsClient.swift | 18 +----- .../Services/AWSIoTAnalytics/Plugins.swift | 55 +++++++++++++++++++ .../AWSIoTDataPlane/IoTDataPlaneClient.swift | 18 +----- .../Services/AWSIoTDataPlane/Plugins.swift | 55 +++++++++++++++++++ .../AWSIoTEvents/IoTEventsClient.swift | 18 +----- Sources/Services/AWSIoTEvents/Plugins.swift | 55 +++++++++++++++++++ .../IoTEventsDataClient.swift | 18 +----- .../Services/AWSIoTEventsData/Plugins.swift | 55 +++++++++++++++++++ .../AWSIoTFleetHub/IoTFleetHubClient.swift | 18 +----- Sources/Services/AWSIoTFleetHub/Plugins.swift | 55 +++++++++++++++++++ .../AWSIoTFleetWise/IoTFleetWiseClient.swift | 18 +----- .../Services/AWSIoTFleetWise/Plugins.swift | 55 +++++++++++++++++++ .../IoTJobsDataPlaneClient.swift | 18 +----- .../AWSIoTJobsDataPlane/Plugins.swift | 55 +++++++++++++++++++ .../IoTRoboRunnerClient.swift | 18 +----- .../Services/AWSIoTRoboRunner/Plugins.swift | 55 +++++++++++++++++++ .../IoTSecureTunnelingClient.swift | 18 +----- .../AWSIoTSecureTunneling/Plugins.swift | 55 +++++++++++++++++++ .../AWSIoTSiteWise/IoTSiteWiseClient.swift | 18 +----- Sources/Services/AWSIoTSiteWise/Plugins.swift | 55 +++++++++++++++++++ .../IoTThingsGraphClient.swift | 18 +----- .../Services/AWSIoTThingsGraph/Plugins.swift | 55 +++++++++++++++++++ .../AWSIoTTwinMaker/IoTTwinMakerClient.swift | 18 +----- .../Services/AWSIoTTwinMaker/Plugins.swift | 55 +++++++++++++++++++ .../AWSIoTWireless/IoTWirelessClient.swift | 18 +----- Sources/Services/AWSIoTWireless/Plugins.swift | 55 +++++++++++++++++++ .../IotDeviceAdvisorClient.swift | 18 +----- .../AWSIotDeviceAdvisor/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSIvs/IvsClient.swift | 18 +----- Sources/Services/AWSIvs/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSIvschat/IvschatClient.swift | 18 +----- Sources/Services/AWSIvschat/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSKMS/KMSClient.swift | 18 +----- Sources/Services/AWSKMS/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSKafka/KafkaClient.swift | 18 +----- Sources/Services/AWSKafka/Plugins.swift | 55 +++++++++++++++++++ .../AWSKafkaConnect/KafkaConnectClient.swift | 18 +----- .../Services/AWSKafkaConnect/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSKendra/KendraClient.swift | 18 +----- Sources/Services/AWSKendra/Plugins.swift | 55 +++++++++++++++++++ .../KendraRankingClient.swift | 18 +----- .../Services/AWSKendraRanking/Plugins.swift | 55 +++++++++++++++++++ .../AWSKeyspaces/KeyspacesClient.swift | 18 +----- Sources/Services/AWSKeyspaces/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSKinesis/KinesisClient.swift | 18 +----- Sources/Services/AWSKinesis/Plugins.swift | 55 +++++++++++++++++++ .../KinesisAnalyticsClient.swift | 18 +----- .../AWSKinesisAnalytics/Plugins.swift | 55 +++++++++++++++++++ .../KinesisAnalyticsV2Client.swift | 18 +----- .../AWSKinesisAnalyticsV2/Plugins.swift | 55 +++++++++++++++++++ .../AWSKinesisVideo/KinesisVideoClient.swift | 18 +----- .../Services/AWSKinesisVideo/Plugins.swift | 55 +++++++++++++++++++ .../KinesisVideoArchivedMediaClient.swift | 18 +----- .../Plugins.swift | 55 +++++++++++++++++++ .../KinesisVideoMediaClient.swift | 18 +----- .../AWSKinesisVideoMedia/Plugins.swift | 55 +++++++++++++++++++ .../KinesisVideoSignalingClient.swift | 18 +----- .../AWSKinesisVideoSignaling/Plugins.swift | 55 +++++++++++++++++++ .../KinesisVideoWebRTCStorageClient.swift | 18 +----- .../Plugins.swift | 55 +++++++++++++++++++ .../LakeFormationClient.swift | 18 +----- .../Services/AWSLakeFormation/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSLambda/LambdaClient.swift | 18 +----- Sources/Services/AWSLambda/Plugins.swift | 55 +++++++++++++++++++ .../AWSLaunchWizard/LaunchWizardClient.swift | 18 +----- .../Services/AWSLaunchWizard/Plugins.swift | 55 +++++++++++++++++++ .../LexModelBuildingClient.swift | 18 +----- .../AWSLexModelBuildingService/Plugins.swift | 55 +++++++++++++++++++ .../AWSLexModelsV2/LexModelsV2Client.swift | 18 +----- Sources/Services/AWSLexModelsV2/Plugins.swift | 55 +++++++++++++++++++ .../LexRuntimeClient.swift | 18 +----- .../AWSLexRuntimeService/Plugins.swift | 55 +++++++++++++++++++ .../AWSLexRuntimeV2/LexRuntimeV2Client.swift | 18 +----- .../Services/AWSLexRuntimeV2/Plugins.swift | 55 +++++++++++++++++++ .../LicenseManagerClient.swift | 18 +----- .../Services/AWSLicenseManager/Plugins.swift | 55 +++++++++++++++++++ ...censeManagerLinuxSubscriptionsClient.swift | 18 +----- .../Plugins.swift | 55 +++++++++++++++++++ ...icenseManagerUserSubscriptionsClient.swift | 18 +----- .../Plugins.swift | 55 +++++++++++++++++++ .../AWSLightsail/LightsailClient.swift | 18 +----- Sources/Services/AWSLightsail/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSLocation/LocationClient.swift | 18 +----- Sources/Services/AWSLocation/Plugins.swift | 55 +++++++++++++++++++ .../LookoutEquipmentClient.swift | 18 +----- .../AWSLookoutEquipment/Plugins.swift | 55 +++++++++++++++++++ .../LookoutMetricsClient.swift | 18 +----- .../Services/AWSLookoutMetrics/Plugins.swift | 55 +++++++++++++++++++ .../LookoutVisionClient.swift | 18 +----- .../Services/AWSLookoutVision/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSM2/M2Client.swift | 18 +----- Sources/Services/AWSM2/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSMTurk/MTurkClient.swift | 18 +----- Sources/Services/AWSMTurk/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSMWAA/MWAAClient.swift | 18 +----- Sources/Services/AWSMWAA/Plugins.swift | 55 +++++++++++++++++++ .../MachineLearningClient.swift | 18 +----- .../Services/AWSMachineLearning/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSMacie2/Macie2Client.swift | 18 +----- Sources/Services/AWSMacie2/Plugins.swift | 55 +++++++++++++++++++ .../ManagedBlockchainClient.swift | 18 +----- .../AWSManagedBlockchain/Plugins.swift | 55 +++++++++++++++++++ .../ManagedBlockchainQueryClient.swift | 18 +----- .../AWSManagedBlockchainQuery/Plugins.swift | 55 +++++++++++++++++++ .../MarketplaceAgreementClient.swift | 18 +----- .../AWSMarketplaceAgreement/Plugins.swift | 55 +++++++++++++++++++ .../MarketplaceCatalogClient.swift | 18 +----- .../AWSMarketplaceCatalog/Plugins.swift | 55 +++++++++++++++++++ .../MarketplaceCommerceAnalyticsClient.swift | 18 +----- .../Plugins.swift | 55 +++++++++++++++++++ .../MarketplaceDeploymentClient.swift | 18 +----- .../AWSMarketplaceDeployment/Plugins.swift | 55 +++++++++++++++++++ .../MarketplaceEntitlementClient.swift | 18 +----- .../Plugins.swift | 55 +++++++++++++++++++ .../MarketplaceMeteringClient.swift | 18 +----- .../AWSMarketplaceMetering/Plugins.swift | 55 +++++++++++++++++++ .../AWSMediaConnect/MediaConnectClient.swift | 18 +----- .../Services/AWSMediaConnect/Plugins.swift | 55 +++++++++++++++++++ .../AWSMediaConvert/MediaConvertClient.swift | 18 +----- .../Services/AWSMediaConvert/Plugins.swift | 55 +++++++++++++++++++ .../AWSMediaLive/MediaLiveClient.swift | 18 +----- Sources/Services/AWSMediaLive/Plugins.swift | 55 +++++++++++++++++++ .../AWSMediaPackage/MediaPackageClient.swift | 18 +----- .../Services/AWSMediaPackage/Plugins.swift | 55 +++++++++++++++++++ .../MediaPackageV2Client.swift | 18 +----- .../Services/AWSMediaPackageV2/Plugins.swift | 55 +++++++++++++++++++ .../MediaPackageVodClient.swift | 18 +----- .../Services/AWSMediaPackageVod/Plugins.swift | 55 +++++++++++++++++++ .../AWSMediaStore/MediaStoreClient.swift | 18 +----- Sources/Services/AWSMediaStore/Plugins.swift | 55 +++++++++++++++++++ .../MediaStoreDataClient.swift | 18 +----- .../Services/AWSMediaStoreData/Plugins.swift | 55 +++++++++++++++++++ .../AWSMediaTailor/MediaTailorClient.swift | 18 +----- Sources/Services/AWSMediaTailor/Plugins.swift | 55 +++++++++++++++++++ .../MedicalImagingClient.swift | 18 +----- .../Services/AWSMedicalImaging/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSMemoryDB/MemoryDBClient.swift | 18 +----- Sources/Services/AWSMemoryDB/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSMgn/MgnClient.swift | 18 +----- Sources/Services/AWSMgn/Plugins.swift | 55 +++++++++++++++++++ .../AWSMigrationHub/MigrationHubClient.swift | 18 +----- .../Services/AWSMigrationHub/Plugins.swift | 55 +++++++++++++++++++ .../MigrationHubConfigClient.swift | 18 +----- .../AWSMigrationHubConfig/Plugins.swift | 55 +++++++++++++++++++ .../MigrationHubOrchestratorClient.swift | 18 +----- .../AWSMigrationHubOrchestrator/Plugins.swift | 55 +++++++++++++++++++ .../MigrationHubRefactorSpacesClient.swift | 18 +----- .../Plugins.swift | 55 +++++++++++++++++++ .../MigrationHubStrategyClient.swift | 18 +----- .../AWSMigrationHubStrategy/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSMobile/MobileClient.swift | 18 +----- Sources/Services/AWSMobile/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSMq/MqClient.swift | 18 +----- Sources/Services/AWSMq/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSNeptune/NeptuneClient.swift | 18 +----- Sources/Services/AWSNeptune/Plugins.swift | 55 +++++++++++++++++++ .../AWSNeptuneGraph/NeptuneGraphClient.swift | 18 +----- .../Services/AWSNeptuneGraph/Plugins.swift | 55 +++++++++++++++++++ .../AWSNeptunedata/NeptunedataClient.swift | 18 +----- Sources/Services/AWSNeptunedata/Plugins.swift | 55 +++++++++++++++++++ .../NetworkFirewallClient.swift | 18 +----- .../Services/AWSNetworkFirewall/Plugins.swift | 55 +++++++++++++++++++ .../NetworkManagerClient.swift | 18 +----- .../Services/AWSNetworkManager/Plugins.swift | 55 +++++++++++++++++++ .../NetworkMonitorClient.swift | 18 +----- .../Services/AWSNetworkMonitor/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSNimble/NimbleClient.swift | 18 +----- Sources/Services/AWSNimble/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSOAM/OAMClient.swift | 18 +----- Sources/Services/AWSOAM/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSOSIS/OSISClient.swift | 18 +----- Sources/Services/AWSOSIS/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSOmics/OmicsClient.swift | 18 +----- Sources/Services/AWSOmics/Plugins.swift | 55 +++++++++++++++++++ .../AWSOpenSearch/OpenSearchClient.swift | 18 +----- Sources/Services/AWSOpenSearch/Plugins.swift | 55 +++++++++++++++++++ .../OpenSearchServerlessClient.swift | 18 +----- .../AWSOpenSearchServerless/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSOpsWorks/OpsWorksClient.swift | 18 +----- Sources/Services/AWSOpsWorks/Plugins.swift | 55 +++++++++++++++++++ .../AWSOpsWorksCM/OpsWorksCMClient.swift | 18 +----- Sources/Services/AWSOpsWorksCM/Plugins.swift | 55 +++++++++++++++++++ .../OrganizationsClient.swift | 18 +----- .../Services/AWSOrganizations/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSOutposts/OutpostsClient.swift | 18 +----- Sources/Services/AWSOutposts/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSPI/PIClient.swift | 18 +----- Sources/Services/AWSPI/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSPanorama/PanoramaClient.swift | 18 +----- Sources/Services/AWSPanorama/Plugins.swift | 55 +++++++++++++++++++ .../PaymentCryptographyClient.swift | 18 +----- .../AWSPaymentCryptography/Plugins.swift | 55 +++++++++++++++++++ .../PaymentCryptographyDataClient.swift | 18 +----- .../AWSPaymentCryptographyData/Plugins.swift | 55 +++++++++++++++++++ .../PcaConnectorAdClient.swift | 18 +----- .../Services/AWSPcaConnectorAd/Plugins.swift | 55 +++++++++++++++++++ .../AWSPersonalize/PersonalizeClient.swift | 18 +----- Sources/Services/AWSPersonalize/Plugins.swift | 55 +++++++++++++++++++ .../PersonalizeEventsClient.swift | 18 +----- .../AWSPersonalizeEvents/Plugins.swift | 55 +++++++++++++++++++ .../PersonalizeRuntimeClient.swift | 18 +----- .../AWSPersonalizeRuntime/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSPinpoint/PinpointClient.swift | 18 +----- Sources/Services/AWSPinpoint/Plugins.swift | 55 +++++++++++++++++++ .../PinpointEmailClient.swift | 18 +----- .../Services/AWSPinpointEmail/Plugins.swift | 55 +++++++++++++++++++ .../PinpointSMSVoiceClient.swift | 18 +----- .../AWSPinpointSMSVoice/Plugins.swift | 55 +++++++++++++++++++ .../PinpointSMSVoiceV2Client.swift | 18 +----- .../AWSPinpointSMSVoiceV2/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSPipes/PipesClient.swift | 18 +----- Sources/Services/AWSPipes/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSPolly/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSPolly/PollyClient.swift | 18 +----- Sources/Services/AWSPricing/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSPricing/PricingClient.swift | 18 +----- .../Services/AWSPrivateNetworks/Plugins.swift | 55 +++++++++++++++++++ .../PrivateNetworksClient.swift | 18 +----- Sources/Services/AWSProton/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSProton/ProtonClient.swift | 18 +----- Sources/Services/AWSQBusiness/Plugins.swift | 55 +++++++++++++++++++ .../AWSQBusiness/QBusinessClient.swift | 18 +----- Sources/Services/AWSQConnect/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSQConnect/QConnectClient.swift | 18 +----- Sources/Services/AWSQLDB/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSQLDB/QLDBClient.swift | 18 +----- Sources/Services/AWSQLDBSession/Plugins.swift | 55 +++++++++++++++++++ .../AWSQLDBSession/QLDBSessionClient.swift | 18 +----- Sources/Services/AWSQuickSight/Plugins.swift | 55 +++++++++++++++++++ .../AWSQuickSight/QuickSightClient.swift | 18 +----- Sources/Services/AWSRAM/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSRAM/RAMClient.swift | 18 +----- Sources/Services/AWSRDS/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSRDS/RDSClient.swift | 18 +----- Sources/Services/AWSRDSData/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSRDSData/RDSDataClient.swift | 18 +----- Sources/Services/AWSRUM/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSRUM/RUMClient.swift | 18 +----- Sources/Services/AWSRbin/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSRbin/RbinClient.swift | 18 +----- Sources/Services/AWSRedshift/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSRedshift/RedshiftClient.swift | 18 +----- .../Services/AWSRedshiftData/Plugins.swift | 55 +++++++++++++++++++ .../AWSRedshiftData/RedshiftDataClient.swift | 18 +----- .../AWSRedshiftServerless/Plugins.swift | 55 +++++++++++++++++++ .../RedshiftServerlessClient.swift | 18 +----- Sources/Services/AWSRekognition/Plugins.swift | 55 +++++++++++++++++++ .../AWSRekognition/RekognitionClient.swift | 18 +----- Sources/Services/AWSRepostspace/Plugins.swift | 55 +++++++++++++++++++ .../AWSRepostspace/RepostspaceClient.swift | 18 +----- .../Services/AWSResiliencehub/Plugins.swift | 55 +++++++++++++++++++ .../ResiliencehubClient.swift | 18 +----- .../AWSResourceExplorer2/Plugins.swift | 55 +++++++++++++++++++ .../ResourceExplorer2Client.swift | 18 +----- .../Services/AWSResourceGroups/Plugins.swift | 55 +++++++++++++++++++ .../ResourceGroupsClient.swift | 18 +----- .../AWSResourceGroupsTaggingAPI/Plugins.swift | 55 +++++++++++++++++++ .../ResourceGroupsTaggingAPIClient.swift | 18 +----- Sources/Services/AWSRoboMaker/Plugins.swift | 55 +++++++++++++++++++ .../AWSRoboMaker/RoboMakerClient.swift | 18 +----- .../Services/AWSRolesAnywhere/Plugins.swift | 55 +++++++++++++++++++ .../RolesAnywhereClient.swift | 18 +----- Sources/Services/AWSRoute53/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSRoute53/Route53Client.swift | 18 +----- .../Services/AWSRoute53Domains/Plugins.swift | 55 +++++++++++++++++++ .../Route53DomainsClient.swift | 18 +----- .../AWSRoute53RecoveryCluster/Plugins.swift | 55 +++++++++++++++++++ .../Route53RecoveryClusterClient.swift | 18 +----- .../Plugins.swift | 55 +++++++++++++++++++ .../Route53RecoveryControlConfigClient.swift | 18 +----- .../AWSRoute53RecoveryReadiness/Plugins.swift | 55 +++++++++++++++++++ .../Route53RecoveryReadinessClient.swift | 18 +----- .../Services/AWSRoute53Resolver/Plugins.swift | 55 +++++++++++++++++++ .../Route53ResolverClient.swift | 18 +----- Sources/Services/AWSS3/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSS3/S3Client.swift | 18 +----- Sources/Services/AWSS3Control/Plugins.swift | 55 +++++++++++++++++++ .../AWSS3Control/S3ControlClient.swift | 18 +----- Sources/Services/AWSS3Outposts/Plugins.swift | 55 +++++++++++++++++++ .../AWSS3Outposts/S3OutpostsClient.swift | 18 +----- Sources/Services/AWSSES/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSSES/SESClient.swift | 18 +----- Sources/Services/AWSSESv2/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSSESv2/SESv2Client.swift | 18 +----- Sources/Services/AWSSFN/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSSFN/SFNClient.swift | 18 +----- Sources/Services/AWSSMS/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSSMS/SMSClient.swift | 18 +----- Sources/Services/AWSSNS/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSSNS/SNSClient.swift | 18 +----- Sources/Services/AWSSQS/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSSQS/SQSClient.swift | 18 +----- Sources/Services/AWSSSM/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSSSM/SSMClient.swift | 18 +----- Sources/Services/AWSSSMContacts/Plugins.swift | 55 +++++++++++++++++++ .../AWSSSMContacts/SSMContactsClient.swift | 18 +----- .../Services/AWSSSMIncidents/Plugins.swift | 55 +++++++++++++++++++ .../AWSSSMIncidents/SSMIncidentsClient.swift | 18 +----- Sources/Services/AWSSSO/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSSSO/SSOClient.swift | 18 +----- Sources/Services/AWSSSOAdmin/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSSSOAdmin/SSOAdminClient.swift | 18 +----- Sources/Services/AWSSSOOIDC/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSSSOOIDC/SSOOIDCClient.swift | 18 +----- Sources/Services/AWSSTS/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSSTS/STSClient.swift | 18 +----- Sources/Services/AWSSWF/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSSWF/SWFClient.swift | 18 +----- Sources/Services/AWSSageMaker/Plugins.swift | 55 +++++++++++++++++++ .../AWSSageMaker/SageMakerClient.swift | 18 +----- .../AWSSageMakerA2IRuntime/Plugins.swift | 55 +++++++++++++++++++ .../SageMakerA2IRuntimeClient.swift | 18 +----- .../Plugins.swift | 55 +++++++++++++++++++ .../SageMakerFeatureStoreRuntimeClient.swift | 18 +----- .../AWSSageMakerGeospatial/Plugins.swift | 55 +++++++++++++++++++ .../SageMakerGeospatialClient.swift | 18 +----- .../AWSSageMakerMetrics/Plugins.swift | 55 +++++++++++++++++++ .../SageMakerMetricsClient.swift | 18 +----- .../AWSSageMakerRuntime/Plugins.swift | 55 +++++++++++++++++++ .../SageMakerRuntimeClient.swift | 18 +----- .../Services/AWSSagemakerEdge/Plugins.swift | 55 +++++++++++++++++++ .../SagemakerEdgeClient.swift | 18 +----- .../Services/AWSSavingsplans/Plugins.swift | 55 +++++++++++++++++++ .../AWSSavingsplans/SavingsplansClient.swift | 18 +----- Sources/Services/AWSScheduler/Plugins.swift | 55 +++++++++++++++++++ .../AWSScheduler/SchedulerClient.swift | 18 +----- Sources/Services/AWSSchemas/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSSchemas/SchemasClient.swift | 18 +----- .../Services/AWSSecretsManager/Plugins.swift | 55 +++++++++++++++++++ .../SecretsManagerClient.swift | 18 +----- Sources/Services/AWSSecurityHub/Plugins.swift | 55 +++++++++++++++++++ .../AWSSecurityHub/SecurityHubClient.swift | 18 +----- .../Services/AWSSecurityLake/Plugins.swift | 55 +++++++++++++++++++ .../AWSSecurityLake/SecurityLakeClient.swift | 18 +----- .../Plugins.swift | 55 +++++++++++++++++++ ...erverlessApplicationRepositoryClient.swift | 18 +----- .../Services/AWSServiceCatalog/Plugins.swift | 55 +++++++++++++++++++ .../ServiceCatalogClient.swift | 18 +----- .../Plugins.swift | 55 +++++++++++++++++++ .../ServiceCatalogAppRegistryClient.swift | 18 +----- .../AWSServiceDiscovery/Plugins.swift | 55 +++++++++++++++++++ .../ServiceDiscoveryClient.swift | 18 +----- .../Services/AWSServiceQuotas/Plugins.swift | 55 +++++++++++++++++++ .../ServiceQuotasClient.swift | 18 +----- Sources/Services/AWSShield/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSShield/ShieldClient.swift | 18 +----- Sources/Services/AWSSigner/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSSigner/SignerClient.swift | 18 +----- .../Services/AWSSimSpaceWeaver/Plugins.swift | 55 +++++++++++++++++++ .../SimSpaceWeaverClient.swift | 18 +----- .../AWSSnowDeviceManagement/Plugins.swift | 55 +++++++++++++++++++ .../SnowDeviceManagementClient.swift | 18 +----- Sources/Services/AWSSnowball/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSSnowball/SnowballClient.swift | 18 +----- Sources/Services/AWSSsmSap/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSSsmSap/SsmSapClient.swift | 18 +----- .../Services/AWSStorageGateway/Plugins.swift | 55 +++++++++++++++++++ .../StorageGatewayClient.swift | 18 +----- Sources/Services/AWSSupplyChain/Plugins.swift | 55 +++++++++++++++++++ .../AWSSupplyChain/SupplyChainClient.swift | 18 +----- Sources/Services/AWSSupport/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSSupport/SupportClient.swift | 18 +----- Sources/Services/AWSSupportApp/Plugins.swift | 55 +++++++++++++++++++ .../AWSSupportApp/SupportAppClient.swift | 18 +----- Sources/Services/AWSSynthetics/Plugins.swift | 55 +++++++++++++++++++ .../AWSSynthetics/SyntheticsClient.swift | 18 +----- Sources/Services/AWSTextract/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSTextract/TextractClient.swift | 18 +----- .../Services/AWSTimestreamQuery/Plugins.swift | 55 +++++++++++++++++++ .../TimestreamQueryClient.swift | 18 +----- .../Services/AWSTimestreamWrite/Plugins.swift | 55 +++++++++++++++++++ .../TimestreamWriteClient.swift | 18 +----- Sources/Services/AWSTnb/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSTnb/TnbClient.swift | 18 +----- Sources/Services/AWSTranscribe/Plugins.swift | 55 +++++++++++++++++++ .../AWSTranscribe/TranscribeClient.swift | 18 +----- .../AWSTranscribeStreaming/Plugins.swift | 55 +++++++++++++++++++ .../TranscribeStreamingClient.swift | 18 +----- Sources/Services/AWSTransfer/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSTransfer/TransferClient.swift | 18 +----- Sources/Services/AWSTranslate/Plugins.swift | 55 +++++++++++++++++++ .../AWSTranslate/TranslateClient.swift | 18 +----- .../Services/AWSTrustedAdvisor/Plugins.swift | 55 +++++++++++++++++++ .../TrustedAdvisorClient.swift | 18 +----- Sources/Services/AWSVPCLattice/Plugins.swift | 55 +++++++++++++++++++ .../AWSVPCLattice/VPCLatticeClient.swift | 18 +----- .../AWSVerifiedPermissions/Plugins.swift | 55 +++++++++++++++++++ .../VerifiedPermissionsClient.swift | 18 +----- Sources/Services/AWSVoiceID/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSVoiceID/VoiceIDClient.swift | 18 +----- Sources/Services/AWSWAF/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSWAF/WAFClient.swift | 18 +----- Sources/Services/AWSWAFRegional/Plugins.swift | 55 +++++++++++++++++++ .../AWSWAFRegional/WAFRegionalClient.swift | 18 +----- Sources/Services/AWSWAFV2/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSWAFV2/WAFV2Client.swift | 18 +----- .../Services/AWSWellArchitected/Plugins.swift | 55 +++++++++++++++++++ .../WellArchitectedClient.swift | 18 +----- Sources/Services/AWSWisdom/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSWisdom/WisdomClient.swift | 18 +----- Sources/Services/AWSWorkDocs/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSWorkDocs/WorkDocsClient.swift | 18 +----- Sources/Services/AWSWorkLink/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSWorkLink/WorkLinkClient.swift | 18 +----- Sources/Services/AWSWorkMail/Plugins.swift | 55 +++++++++++++++++++ .../Services/AWSWorkMail/WorkMailClient.swift | 18 +----- .../AWSWorkMailMessageFlow/Plugins.swift | 55 +++++++++++++++++++ .../WorkMailMessageFlowClient.swift | 18 +----- Sources/Services/AWSWorkSpaces/Plugins.swift | 55 +++++++++++++++++++ .../AWSWorkSpaces/WorkSpacesClient.swift | 18 +----- .../AWSWorkSpacesThinClient/Plugins.swift | 55 +++++++++++++++++++ .../WorkSpacesThinClientClient.swift | 18 +----- .../Services/AWSWorkSpacesWeb/Plugins.swift | 55 +++++++++++++++++++ .../WorkSpacesWebClient.swift | 18 +----- Sources/Services/AWSXRay/Plugins.swift | 55 +++++++++++++++++++ Sources/Services/AWSXRay/XRayClient.swift | 18 +----- 756 files changed, 21546 insertions(+), 6048 deletions(-) create mode 100644 Sources/Services/AWSACM/Plugins.swift create mode 100644 Sources/Services/AWSACMPCA/Plugins.swift create mode 100644 Sources/Services/AWSAPIGateway/Plugins.swift create mode 100644 Sources/Services/AWSARCZonalShift/Plugins.swift create mode 100644 Sources/Services/AWSAccessAnalyzer/Plugins.swift create mode 100644 Sources/Services/AWSAccount/Plugins.swift create mode 100644 Sources/Services/AWSAlexaForBusiness/Plugins.swift create mode 100644 Sources/Services/AWSAmp/Plugins.swift create mode 100644 Sources/Services/AWSAmplify/Plugins.swift create mode 100644 Sources/Services/AWSAmplifyBackend/Plugins.swift create mode 100644 Sources/Services/AWSAmplifyUIBuilder/Plugins.swift create mode 100644 Sources/Services/AWSApiGatewayManagementApi/Plugins.swift create mode 100644 Sources/Services/AWSApiGatewayV2/Plugins.swift create mode 100644 Sources/Services/AWSAppConfig/Plugins.swift create mode 100644 Sources/Services/AWSAppConfigData/Plugins.swift create mode 100644 Sources/Services/AWSAppFabric/Plugins.swift create mode 100644 Sources/Services/AWSAppIntegrations/Plugins.swift create mode 100644 Sources/Services/AWSAppMesh/Plugins.swift create mode 100644 Sources/Services/AWSAppRunner/Plugins.swift create mode 100644 Sources/Services/AWSAppStream/Plugins.swift create mode 100644 Sources/Services/AWSAppSync/Plugins.swift create mode 100644 Sources/Services/AWSAppflow/Plugins.swift create mode 100644 Sources/Services/AWSApplicationAutoScaling/Plugins.swift create mode 100644 Sources/Services/AWSApplicationCostProfiler/Plugins.swift create mode 100644 Sources/Services/AWSApplicationDiscoveryService/Plugins.swift create mode 100644 Sources/Services/AWSApplicationInsights/Plugins.swift create mode 100644 Sources/Services/AWSArtifact/Plugins.swift create mode 100644 Sources/Services/AWSAthena/Plugins.swift create mode 100644 Sources/Services/AWSAuditManager/Plugins.swift create mode 100644 Sources/Services/AWSAutoScaling/Plugins.swift create mode 100644 Sources/Services/AWSAutoScalingPlans/Plugins.swift create mode 100644 Sources/Services/AWSB2bi/Plugins.swift create mode 100644 Sources/Services/AWSBCMDataExports/Plugins.swift create mode 100644 Sources/Services/AWSBackup/Plugins.swift create mode 100644 Sources/Services/AWSBackupGateway/Plugins.swift create mode 100644 Sources/Services/AWSBackupStorage/Plugins.swift create mode 100644 Sources/Services/AWSBatch/Plugins.swift create mode 100644 Sources/Services/AWSBedrock/Plugins.swift create mode 100644 Sources/Services/AWSBedrockAgent/Plugins.swift create mode 100644 Sources/Services/AWSBedrockAgentRuntime/Plugins.swift create mode 100644 Sources/Services/AWSBedrockRuntime/Plugins.swift create mode 100644 Sources/Services/AWSBillingconductor/Plugins.swift create mode 100644 Sources/Services/AWSBraket/Plugins.swift create mode 100644 Sources/Services/AWSBudgets/Plugins.swift create mode 100644 Sources/Services/AWSChatbot/Plugins.swift create mode 100644 Sources/Services/AWSChime/Plugins.swift create mode 100644 Sources/Services/AWSChimeSDKIdentity/Plugins.swift create mode 100644 Sources/Services/AWSChimeSDKMediaPipelines/Plugins.swift create mode 100644 Sources/Services/AWSChimeSDKMeetings/Plugins.swift create mode 100644 Sources/Services/AWSChimeSDKMessaging/Plugins.swift create mode 100644 Sources/Services/AWSChimeSDKVoice/Plugins.swift create mode 100644 Sources/Services/AWSCleanRooms/Plugins.swift create mode 100644 Sources/Services/AWSCleanRoomsML/Plugins.swift create mode 100644 Sources/Services/AWSCloud9/Plugins.swift create mode 100644 Sources/Services/AWSCloudControl/Plugins.swift create mode 100644 Sources/Services/AWSCloudDirectory/Plugins.swift create mode 100644 Sources/Services/AWSCloudFormation/Plugins.swift create mode 100644 Sources/Services/AWSCloudFront/Plugins.swift create mode 100644 Sources/Services/AWSCloudFrontKeyValueStore/Plugins.swift create mode 100644 Sources/Services/AWSCloudHSM/Plugins.swift create mode 100644 Sources/Services/AWSCloudHSMV2/Plugins.swift create mode 100644 Sources/Services/AWSCloudSearch/Plugins.swift create mode 100644 Sources/Services/AWSCloudSearchDomain/Plugins.swift create mode 100644 Sources/Services/AWSCloudTrail/Plugins.swift create mode 100644 Sources/Services/AWSCloudTrailData/Plugins.swift create mode 100644 Sources/Services/AWSCloudWatch/Plugins.swift create mode 100644 Sources/Services/AWSCloudWatchEvents/Plugins.swift create mode 100644 Sources/Services/AWSCloudWatchLogs/Plugins.swift create mode 100644 Sources/Services/AWSCodeBuild/Plugins.swift create mode 100644 Sources/Services/AWSCodeCatalyst/Plugins.swift create mode 100644 Sources/Services/AWSCodeCommit/Plugins.swift create mode 100644 Sources/Services/AWSCodeDeploy/Plugins.swift create mode 100644 Sources/Services/AWSCodeGuruProfiler/Plugins.swift create mode 100644 Sources/Services/AWSCodeGuruReviewer/Plugins.swift create mode 100644 Sources/Services/AWSCodeGuruSecurity/Plugins.swift create mode 100644 Sources/Services/AWSCodePipeline/Plugins.swift create mode 100644 Sources/Services/AWSCodeStar/Plugins.swift create mode 100644 Sources/Services/AWSCodeStarconnections/Plugins.swift create mode 100644 Sources/Services/AWSCodeartifact/Plugins.swift create mode 100644 Sources/Services/AWSCodestarnotifications/Plugins.swift create mode 100644 Sources/Services/AWSCognitoIdentity/Plugins.swift create mode 100644 Sources/Services/AWSCognitoIdentityProvider/Plugins.swift create mode 100644 Sources/Services/AWSCognitoSync/Plugins.swift create mode 100644 Sources/Services/AWSComprehend/Plugins.swift create mode 100644 Sources/Services/AWSComprehendMedical/Plugins.swift create mode 100644 Sources/Services/AWSComputeOptimizer/Plugins.swift create mode 100644 Sources/Services/AWSConfigService/Plugins.swift create mode 100644 Sources/Services/AWSConnect/Plugins.swift create mode 100644 Sources/Services/AWSConnectCampaigns/Plugins.swift create mode 100644 Sources/Services/AWSConnectCases/Plugins.swift create mode 100644 Sources/Services/AWSConnectContactLens/Plugins.swift create mode 100644 Sources/Services/AWSConnectParticipant/Plugins.swift create mode 100644 Sources/Services/AWSControlTower/Plugins.swift create mode 100644 Sources/Services/AWSCostExplorer/Plugins.swift create mode 100644 Sources/Services/AWSCostOptimizationHub/Plugins.swift create mode 100644 Sources/Services/AWSCostandUsageReportService/Plugins.swift create mode 100644 Sources/Services/AWSCustomerProfiles/Plugins.swift create mode 100644 Sources/Services/AWSDAX/Plugins.swift create mode 100644 Sources/Services/AWSDLM/Plugins.swift create mode 100644 Sources/Services/AWSDataBrew/Plugins.swift create mode 100644 Sources/Services/AWSDataExchange/Plugins.swift create mode 100644 Sources/Services/AWSDataPipeline/Plugins.swift create mode 100644 Sources/Services/AWSDataSync/Plugins.swift create mode 100644 Sources/Services/AWSDataZone/Plugins.swift create mode 100644 Sources/Services/AWSDatabaseMigrationService/Plugins.swift create mode 100644 Sources/Services/AWSDetective/Plugins.swift create mode 100644 Sources/Services/AWSDevOpsGuru/Plugins.swift create mode 100644 Sources/Services/AWSDeviceFarm/Plugins.swift create mode 100644 Sources/Services/AWSDirectConnect/Plugins.swift create mode 100644 Sources/Services/AWSDirectoryService/Plugins.swift create mode 100644 Sources/Services/AWSDocDB/Plugins.swift create mode 100644 Sources/Services/AWSDocDBElastic/Plugins.swift create mode 100644 Sources/Services/AWSDrs/Plugins.swift create mode 100644 Sources/Services/AWSDynamoDB/Plugins.swift create mode 100644 Sources/Services/AWSDynamoDBStreams/Plugins.swift create mode 100644 Sources/Services/AWSEBS/Plugins.swift create mode 100644 Sources/Services/AWSEC2/Plugins.swift create mode 100644 Sources/Services/AWSEC2InstanceConnect/Plugins.swift create mode 100644 Sources/Services/AWSECR/Plugins.swift create mode 100644 Sources/Services/AWSECRPUBLIC/Plugins.swift create mode 100644 Sources/Services/AWSECS/Plugins.swift create mode 100644 Sources/Services/AWSEFS/Plugins.swift create mode 100644 Sources/Services/AWSEKS/Plugins.swift create mode 100644 Sources/Services/AWSEKSAuth/Plugins.swift create mode 100644 Sources/Services/AWSEMR/Plugins.swift create mode 100644 Sources/Services/AWSEMRServerless/Plugins.swift create mode 100644 Sources/Services/AWSEMRcontainers/Plugins.swift create mode 100644 Sources/Services/AWSElastiCache/Plugins.swift create mode 100644 Sources/Services/AWSElasticBeanstalk/Plugins.swift create mode 100644 Sources/Services/AWSElasticInference/Plugins.swift create mode 100644 Sources/Services/AWSElasticLoadBalancing/Plugins.swift create mode 100644 Sources/Services/AWSElasticLoadBalancingv2/Plugins.swift create mode 100644 Sources/Services/AWSElasticTranscoder/Plugins.swift create mode 100644 Sources/Services/AWSElasticsearchService/Plugins.swift create mode 100644 Sources/Services/AWSEntityResolution/Plugins.swift create mode 100644 Sources/Services/AWSEventBridge/Plugins.swift create mode 100644 Sources/Services/AWSEvidently/Plugins.swift create mode 100644 Sources/Services/AWSFMS/Plugins.swift create mode 100644 Sources/Services/AWSFSx/Plugins.swift create mode 100644 Sources/Services/AWSFinspace/Plugins.swift create mode 100644 Sources/Services/AWSFinspacedata/Plugins.swift create mode 100644 Sources/Services/AWSFirehose/Plugins.swift create mode 100644 Sources/Services/AWSFis/Plugins.swift create mode 100644 Sources/Services/AWSForecast/Plugins.swift create mode 100644 Sources/Services/AWSForecastquery/Plugins.swift create mode 100644 Sources/Services/AWSFraudDetector/Plugins.swift create mode 100644 Sources/Services/AWSFreeTier/Plugins.swift create mode 100644 Sources/Services/AWSGameLift/Plugins.swift create mode 100644 Sources/Services/AWSGlacier/Plugins.swift create mode 100644 Sources/Services/AWSGlobalAccelerator/Plugins.swift create mode 100644 Sources/Services/AWSGlue/Plugins.swift create mode 100644 Sources/Services/AWSGrafana/Plugins.swift create mode 100644 Sources/Services/AWSGreengrass/Plugins.swift create mode 100644 Sources/Services/AWSGreengrassV2/Plugins.swift create mode 100644 Sources/Services/AWSGroundStation/Plugins.swift create mode 100644 Sources/Services/AWSGuardDuty/Plugins.swift create mode 100644 Sources/Services/AWSHealth/Plugins.swift create mode 100644 Sources/Services/AWSHealthLake/Plugins.swift create mode 100644 Sources/Services/AWSHoneycode/Plugins.swift create mode 100644 Sources/Services/AWSIAM/Plugins.swift create mode 100644 Sources/Services/AWSIVSRealTime/Plugins.swift create mode 100644 Sources/Services/AWSIdentitystore/Plugins.swift create mode 100644 Sources/Services/AWSImagebuilder/Plugins.swift create mode 100644 Sources/Services/AWSInspector/Plugins.swift create mode 100644 Sources/Services/AWSInspector2/Plugins.swift create mode 100644 Sources/Services/AWSInspectorScan/Plugins.swift create mode 100644 Sources/Services/AWSInternetMonitor/Plugins.swift create mode 100644 Sources/Services/AWSIoT/Plugins.swift create mode 100644 Sources/Services/AWSIoT1ClickDevicesService/Plugins.swift create mode 100644 Sources/Services/AWSIoT1ClickProjects/Plugins.swift create mode 100644 Sources/Services/AWSIoTAnalytics/Plugins.swift create mode 100644 Sources/Services/AWSIoTDataPlane/Plugins.swift create mode 100644 Sources/Services/AWSIoTEvents/Plugins.swift create mode 100644 Sources/Services/AWSIoTEventsData/Plugins.swift create mode 100644 Sources/Services/AWSIoTFleetHub/Plugins.swift create mode 100644 Sources/Services/AWSIoTFleetWise/Plugins.swift create mode 100644 Sources/Services/AWSIoTJobsDataPlane/Plugins.swift create mode 100644 Sources/Services/AWSIoTRoboRunner/Plugins.swift create mode 100644 Sources/Services/AWSIoTSecureTunneling/Plugins.swift create mode 100644 Sources/Services/AWSIoTSiteWise/Plugins.swift create mode 100644 Sources/Services/AWSIoTThingsGraph/Plugins.swift create mode 100644 Sources/Services/AWSIoTTwinMaker/Plugins.swift create mode 100644 Sources/Services/AWSIoTWireless/Plugins.swift create mode 100644 Sources/Services/AWSIotDeviceAdvisor/Plugins.swift create mode 100644 Sources/Services/AWSIvs/Plugins.swift create mode 100644 Sources/Services/AWSIvschat/Plugins.swift create mode 100644 Sources/Services/AWSKMS/Plugins.swift create mode 100644 Sources/Services/AWSKafka/Plugins.swift create mode 100644 Sources/Services/AWSKafkaConnect/Plugins.swift create mode 100644 Sources/Services/AWSKendra/Plugins.swift create mode 100644 Sources/Services/AWSKendraRanking/Plugins.swift create mode 100644 Sources/Services/AWSKeyspaces/Plugins.swift create mode 100644 Sources/Services/AWSKinesis/Plugins.swift create mode 100644 Sources/Services/AWSKinesisAnalytics/Plugins.swift create mode 100644 Sources/Services/AWSKinesisAnalyticsV2/Plugins.swift create mode 100644 Sources/Services/AWSKinesisVideo/Plugins.swift create mode 100644 Sources/Services/AWSKinesisVideoArchivedMedia/Plugins.swift create mode 100644 Sources/Services/AWSKinesisVideoMedia/Plugins.swift create mode 100644 Sources/Services/AWSKinesisVideoSignaling/Plugins.swift create mode 100644 Sources/Services/AWSKinesisVideoWebRTCStorage/Plugins.swift create mode 100644 Sources/Services/AWSLakeFormation/Plugins.swift create mode 100644 Sources/Services/AWSLambda/Plugins.swift create mode 100644 Sources/Services/AWSLaunchWizard/Plugins.swift create mode 100644 Sources/Services/AWSLexModelBuildingService/Plugins.swift create mode 100644 Sources/Services/AWSLexModelsV2/Plugins.swift create mode 100644 Sources/Services/AWSLexRuntimeService/Plugins.swift create mode 100644 Sources/Services/AWSLexRuntimeV2/Plugins.swift create mode 100644 Sources/Services/AWSLicenseManager/Plugins.swift create mode 100644 Sources/Services/AWSLicenseManagerLinuxSubscriptions/Plugins.swift create mode 100644 Sources/Services/AWSLicenseManagerUserSubscriptions/Plugins.swift create mode 100644 Sources/Services/AWSLightsail/Plugins.swift create mode 100644 Sources/Services/AWSLocation/Plugins.swift create mode 100644 Sources/Services/AWSLookoutEquipment/Plugins.swift create mode 100644 Sources/Services/AWSLookoutMetrics/Plugins.swift create mode 100644 Sources/Services/AWSLookoutVision/Plugins.swift create mode 100644 Sources/Services/AWSM2/Plugins.swift create mode 100644 Sources/Services/AWSMTurk/Plugins.swift create mode 100644 Sources/Services/AWSMWAA/Plugins.swift create mode 100644 Sources/Services/AWSMachineLearning/Plugins.swift create mode 100644 Sources/Services/AWSMacie2/Plugins.swift create mode 100644 Sources/Services/AWSManagedBlockchain/Plugins.swift create mode 100644 Sources/Services/AWSManagedBlockchainQuery/Plugins.swift create mode 100644 Sources/Services/AWSMarketplaceAgreement/Plugins.swift create mode 100644 Sources/Services/AWSMarketplaceCatalog/Plugins.swift create mode 100644 Sources/Services/AWSMarketplaceCommerceAnalytics/Plugins.swift create mode 100644 Sources/Services/AWSMarketplaceDeployment/Plugins.swift create mode 100644 Sources/Services/AWSMarketplaceEntitlementService/Plugins.swift create mode 100644 Sources/Services/AWSMarketplaceMetering/Plugins.swift create mode 100644 Sources/Services/AWSMediaConnect/Plugins.swift create mode 100644 Sources/Services/AWSMediaConvert/Plugins.swift create mode 100644 Sources/Services/AWSMediaLive/Plugins.swift create mode 100644 Sources/Services/AWSMediaPackage/Plugins.swift create mode 100644 Sources/Services/AWSMediaPackageV2/Plugins.swift create mode 100644 Sources/Services/AWSMediaPackageVod/Plugins.swift create mode 100644 Sources/Services/AWSMediaStore/Plugins.swift create mode 100644 Sources/Services/AWSMediaStoreData/Plugins.swift create mode 100644 Sources/Services/AWSMediaTailor/Plugins.swift create mode 100644 Sources/Services/AWSMedicalImaging/Plugins.swift create mode 100644 Sources/Services/AWSMemoryDB/Plugins.swift create mode 100644 Sources/Services/AWSMgn/Plugins.swift create mode 100644 Sources/Services/AWSMigrationHub/Plugins.swift create mode 100644 Sources/Services/AWSMigrationHubConfig/Plugins.swift create mode 100644 Sources/Services/AWSMigrationHubOrchestrator/Plugins.swift create mode 100644 Sources/Services/AWSMigrationHubRefactorSpaces/Plugins.swift create mode 100644 Sources/Services/AWSMigrationHubStrategy/Plugins.swift create mode 100644 Sources/Services/AWSMobile/Plugins.swift create mode 100644 Sources/Services/AWSMq/Plugins.swift create mode 100644 Sources/Services/AWSNeptune/Plugins.swift create mode 100644 Sources/Services/AWSNeptuneGraph/Plugins.swift create mode 100644 Sources/Services/AWSNeptunedata/Plugins.swift create mode 100644 Sources/Services/AWSNetworkFirewall/Plugins.swift create mode 100644 Sources/Services/AWSNetworkManager/Plugins.swift create mode 100644 Sources/Services/AWSNetworkMonitor/Plugins.swift create mode 100644 Sources/Services/AWSNimble/Plugins.swift create mode 100644 Sources/Services/AWSOAM/Plugins.swift create mode 100644 Sources/Services/AWSOSIS/Plugins.swift create mode 100644 Sources/Services/AWSOmics/Plugins.swift create mode 100644 Sources/Services/AWSOpenSearch/Plugins.swift create mode 100644 Sources/Services/AWSOpenSearchServerless/Plugins.swift create mode 100644 Sources/Services/AWSOpsWorks/Plugins.swift create mode 100644 Sources/Services/AWSOpsWorksCM/Plugins.swift create mode 100644 Sources/Services/AWSOrganizations/Plugins.swift create mode 100644 Sources/Services/AWSOutposts/Plugins.swift create mode 100644 Sources/Services/AWSPI/Plugins.swift create mode 100644 Sources/Services/AWSPanorama/Plugins.swift create mode 100644 Sources/Services/AWSPaymentCryptography/Plugins.swift create mode 100644 Sources/Services/AWSPaymentCryptographyData/Plugins.swift create mode 100644 Sources/Services/AWSPcaConnectorAd/Plugins.swift create mode 100644 Sources/Services/AWSPersonalize/Plugins.swift create mode 100644 Sources/Services/AWSPersonalizeEvents/Plugins.swift create mode 100644 Sources/Services/AWSPersonalizeRuntime/Plugins.swift create mode 100644 Sources/Services/AWSPinpoint/Plugins.swift create mode 100644 Sources/Services/AWSPinpointEmail/Plugins.swift create mode 100644 Sources/Services/AWSPinpointSMSVoice/Plugins.swift create mode 100644 Sources/Services/AWSPinpointSMSVoiceV2/Plugins.swift create mode 100644 Sources/Services/AWSPipes/Plugins.swift create mode 100644 Sources/Services/AWSPolly/Plugins.swift create mode 100644 Sources/Services/AWSPricing/Plugins.swift create mode 100644 Sources/Services/AWSPrivateNetworks/Plugins.swift create mode 100644 Sources/Services/AWSProton/Plugins.swift create mode 100644 Sources/Services/AWSQBusiness/Plugins.swift create mode 100644 Sources/Services/AWSQConnect/Plugins.swift create mode 100644 Sources/Services/AWSQLDB/Plugins.swift create mode 100644 Sources/Services/AWSQLDBSession/Plugins.swift create mode 100644 Sources/Services/AWSQuickSight/Plugins.swift create mode 100644 Sources/Services/AWSRAM/Plugins.swift create mode 100644 Sources/Services/AWSRDS/Plugins.swift create mode 100644 Sources/Services/AWSRDSData/Plugins.swift create mode 100644 Sources/Services/AWSRUM/Plugins.swift create mode 100644 Sources/Services/AWSRbin/Plugins.swift create mode 100644 Sources/Services/AWSRedshift/Plugins.swift create mode 100644 Sources/Services/AWSRedshiftData/Plugins.swift create mode 100644 Sources/Services/AWSRedshiftServerless/Plugins.swift create mode 100644 Sources/Services/AWSRekognition/Plugins.swift create mode 100644 Sources/Services/AWSRepostspace/Plugins.swift create mode 100644 Sources/Services/AWSResiliencehub/Plugins.swift create mode 100644 Sources/Services/AWSResourceExplorer2/Plugins.swift create mode 100644 Sources/Services/AWSResourceGroups/Plugins.swift create mode 100644 Sources/Services/AWSResourceGroupsTaggingAPI/Plugins.swift create mode 100644 Sources/Services/AWSRoboMaker/Plugins.swift create mode 100644 Sources/Services/AWSRolesAnywhere/Plugins.swift create mode 100644 Sources/Services/AWSRoute53/Plugins.swift create mode 100644 Sources/Services/AWSRoute53Domains/Plugins.swift create mode 100644 Sources/Services/AWSRoute53RecoveryCluster/Plugins.swift create mode 100644 Sources/Services/AWSRoute53RecoveryControlConfig/Plugins.swift create mode 100644 Sources/Services/AWSRoute53RecoveryReadiness/Plugins.swift create mode 100644 Sources/Services/AWSRoute53Resolver/Plugins.swift create mode 100644 Sources/Services/AWSS3/Plugins.swift create mode 100644 Sources/Services/AWSS3Control/Plugins.swift create mode 100644 Sources/Services/AWSS3Outposts/Plugins.swift create mode 100644 Sources/Services/AWSSES/Plugins.swift create mode 100644 Sources/Services/AWSSESv2/Plugins.swift create mode 100644 Sources/Services/AWSSFN/Plugins.swift create mode 100644 Sources/Services/AWSSMS/Plugins.swift create mode 100644 Sources/Services/AWSSNS/Plugins.swift create mode 100644 Sources/Services/AWSSQS/Plugins.swift create mode 100644 Sources/Services/AWSSSM/Plugins.swift create mode 100644 Sources/Services/AWSSSMContacts/Plugins.swift create mode 100644 Sources/Services/AWSSSMIncidents/Plugins.swift create mode 100644 Sources/Services/AWSSSO/Plugins.swift create mode 100644 Sources/Services/AWSSSOAdmin/Plugins.swift create mode 100644 Sources/Services/AWSSSOOIDC/Plugins.swift create mode 100644 Sources/Services/AWSSTS/Plugins.swift create mode 100644 Sources/Services/AWSSWF/Plugins.swift create mode 100644 Sources/Services/AWSSageMaker/Plugins.swift create mode 100644 Sources/Services/AWSSageMakerA2IRuntime/Plugins.swift create mode 100644 Sources/Services/AWSSageMakerFeatureStoreRuntime/Plugins.swift create mode 100644 Sources/Services/AWSSageMakerGeospatial/Plugins.swift create mode 100644 Sources/Services/AWSSageMakerMetrics/Plugins.swift create mode 100644 Sources/Services/AWSSageMakerRuntime/Plugins.swift create mode 100644 Sources/Services/AWSSagemakerEdge/Plugins.swift create mode 100644 Sources/Services/AWSSavingsplans/Plugins.swift create mode 100644 Sources/Services/AWSScheduler/Plugins.swift create mode 100644 Sources/Services/AWSSchemas/Plugins.swift create mode 100644 Sources/Services/AWSSecretsManager/Plugins.swift create mode 100644 Sources/Services/AWSSecurityHub/Plugins.swift create mode 100644 Sources/Services/AWSSecurityLake/Plugins.swift create mode 100644 Sources/Services/AWSServerlessApplicationRepository/Plugins.swift create mode 100644 Sources/Services/AWSServiceCatalog/Plugins.swift create mode 100644 Sources/Services/AWSServiceCatalogAppRegistry/Plugins.swift create mode 100644 Sources/Services/AWSServiceDiscovery/Plugins.swift create mode 100644 Sources/Services/AWSServiceQuotas/Plugins.swift create mode 100644 Sources/Services/AWSShield/Plugins.swift create mode 100644 Sources/Services/AWSSigner/Plugins.swift create mode 100644 Sources/Services/AWSSimSpaceWeaver/Plugins.swift create mode 100644 Sources/Services/AWSSnowDeviceManagement/Plugins.swift create mode 100644 Sources/Services/AWSSnowball/Plugins.swift create mode 100644 Sources/Services/AWSSsmSap/Plugins.swift create mode 100644 Sources/Services/AWSStorageGateway/Plugins.swift create mode 100644 Sources/Services/AWSSupplyChain/Plugins.swift create mode 100644 Sources/Services/AWSSupport/Plugins.swift create mode 100644 Sources/Services/AWSSupportApp/Plugins.swift create mode 100644 Sources/Services/AWSSynthetics/Plugins.swift create mode 100644 Sources/Services/AWSTextract/Plugins.swift create mode 100644 Sources/Services/AWSTimestreamQuery/Plugins.swift create mode 100644 Sources/Services/AWSTimestreamWrite/Plugins.swift create mode 100644 Sources/Services/AWSTnb/Plugins.swift create mode 100644 Sources/Services/AWSTranscribe/Plugins.swift create mode 100644 Sources/Services/AWSTranscribeStreaming/Plugins.swift create mode 100644 Sources/Services/AWSTransfer/Plugins.swift create mode 100644 Sources/Services/AWSTranslate/Plugins.swift create mode 100644 Sources/Services/AWSTrustedAdvisor/Plugins.swift create mode 100644 Sources/Services/AWSVPCLattice/Plugins.swift create mode 100644 Sources/Services/AWSVerifiedPermissions/Plugins.swift create mode 100644 Sources/Services/AWSVoiceID/Plugins.swift create mode 100644 Sources/Services/AWSWAF/Plugins.swift create mode 100644 Sources/Services/AWSWAFRegional/Plugins.swift create mode 100644 Sources/Services/AWSWAFV2/Plugins.swift create mode 100644 Sources/Services/AWSWellArchitected/Plugins.swift create mode 100644 Sources/Services/AWSWisdom/Plugins.swift create mode 100644 Sources/Services/AWSWorkDocs/Plugins.swift create mode 100644 Sources/Services/AWSWorkLink/Plugins.swift create mode 100644 Sources/Services/AWSWorkMail/Plugins.swift create mode 100644 Sources/Services/AWSWorkMailMessageFlow/Plugins.swift create mode 100644 Sources/Services/AWSWorkSpaces/Plugins.swift create mode 100644 Sources/Services/AWSWorkSpacesThinClient/Plugins.swift create mode 100644 Sources/Services/AWSWorkSpacesWeb/Plugins.swift create mode 100644 Sources/Services/AWSXRay/Plugins.swift diff --git a/Sources/Services/AWSACM/ACMClient.swift b/Sources/Services/AWSACM/ACMClient.swift index 7eaf6501625..8f9b85bade5 100644 --- a/Sources/Services/AWSACM/ACMClient.swift +++ b/Sources/Services/AWSACM/ACMClient.swift @@ -117,7 +117,8 @@ extension ACMClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ACMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ACMClient.ACMClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ACMClient { /// Performs the `AddTagsToCertificate` operation on the `CertificateManager` service. /// diff --git a/Sources/Services/AWSACM/Plugins.swift b/Sources/Services/AWSACM/Plugins.swift new file mode 100644 index 00000000000..81edf262c0c --- /dev/null +++ b/Sources/Services/AWSACM/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ACMClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ACMClient.ACMClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ACMClient.ACMClientConfiguration { + config.authSchemeResolver = DefaultACMAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ACMClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ACMAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ACMClient.ACMClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSACMPCA/ACMPCAClient.swift b/Sources/Services/AWSACMPCA/ACMPCAClient.swift index d3141ac305f..83ac3dd0955 100644 --- a/Sources/Services/AWSACMPCA/ACMPCAClient.swift +++ b/Sources/Services/AWSACMPCA/ACMPCAClient.swift @@ -117,7 +117,8 @@ extension ACMPCAClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ACMPCAClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ACMPCAClient.ACMPCAClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ACMPCAClient { /// Performs the `CreateCertificateAuthority` operation on the `ACMPrivateCA` service. /// diff --git a/Sources/Services/AWSACMPCA/Plugins.swift b/Sources/Services/AWSACMPCA/Plugins.swift new file mode 100644 index 00000000000..8e9bd8bd8c4 --- /dev/null +++ b/Sources/Services/AWSACMPCA/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ACMPCAClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ACMPCAClient.ACMPCAClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ACMPCAClient.ACMPCAClientConfiguration { + config.authSchemeResolver = DefaultACMPCAAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ACMPCAClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ACMPCAAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ACMPCAClient.ACMPCAClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAPIGateway/APIGatewayClient.swift b/Sources/Services/AWSAPIGateway/APIGatewayClient.swift index c550564a4c1..a5508357718 100644 --- a/Sources/Services/AWSAPIGateway/APIGatewayClient.swift +++ b/Sources/Services/AWSAPIGateway/APIGatewayClient.swift @@ -117,7 +117,8 @@ extension APIGatewayClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct APIGatewayClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? APIGatewayClient.APIGatewayClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension APIGatewayClient { /// Performs the `CreateApiKey` operation on the `BackplaneControlService` service. /// diff --git a/Sources/Services/AWSAPIGateway/Plugins.swift b/Sources/Services/AWSAPIGateway/Plugins.swift new file mode 100644 index 00000000000..9156febc979 --- /dev/null +++ b/Sources/Services/AWSAPIGateway/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class APIGatewayClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? APIGatewayClient.APIGatewayClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? APIGatewayClient.APIGatewayClientConfiguration { + config.authSchemeResolver = DefaultAPIGatewayAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class APIGatewayClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: APIGatewayAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? APIGatewayClient.APIGatewayClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSARCZonalShift/ARCZonalShiftClient.swift b/Sources/Services/AWSARCZonalShift/ARCZonalShiftClient.swift index 6dacfd27c78..23685c2a80c 100644 --- a/Sources/Services/AWSARCZonalShift/ARCZonalShiftClient.swift +++ b/Sources/Services/AWSARCZonalShift/ARCZonalShiftClient.swift @@ -117,7 +117,8 @@ extension ARCZonalShiftClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ARCZonalShiftClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ARCZonalShiftClient.ARCZonalShiftClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ARCZonalShiftClient { /// Performs the `CancelZonalShift` operation on the `PercDataPlane` service. /// diff --git a/Sources/Services/AWSARCZonalShift/Plugins.swift b/Sources/Services/AWSARCZonalShift/Plugins.swift new file mode 100644 index 00000000000..361c691158e --- /dev/null +++ b/Sources/Services/AWSARCZonalShift/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ARCZonalShiftClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ARCZonalShiftClient.ARCZonalShiftClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ARCZonalShiftClient.ARCZonalShiftClientConfiguration { + config.authSchemeResolver = DefaultARCZonalShiftAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ARCZonalShiftClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ARCZonalShiftAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ARCZonalShiftClient.ARCZonalShiftClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAccessAnalyzer/AccessAnalyzerClient.swift b/Sources/Services/AWSAccessAnalyzer/AccessAnalyzerClient.swift index ab8be720dc8..0fbaa7dfb4f 100644 --- a/Sources/Services/AWSAccessAnalyzer/AccessAnalyzerClient.swift +++ b/Sources/Services/AWSAccessAnalyzer/AccessAnalyzerClient.swift @@ -117,7 +117,8 @@ extension AccessAnalyzerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AccessAnalyzerClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AccessAnalyzerClient.AccessAnalyzerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AccessAnalyzerClient { /// Performs the `ApplyArchiveRule` operation on the `AccessAnalyzer` service. /// diff --git a/Sources/Services/AWSAccessAnalyzer/Plugins.swift b/Sources/Services/AWSAccessAnalyzer/Plugins.swift new file mode 100644 index 00000000000..ba4923a7b85 --- /dev/null +++ b/Sources/Services/AWSAccessAnalyzer/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AccessAnalyzerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AccessAnalyzerClient.AccessAnalyzerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AccessAnalyzerClient.AccessAnalyzerClientConfiguration { + config.authSchemeResolver = DefaultAccessAnalyzerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AccessAnalyzerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AccessAnalyzerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AccessAnalyzerClient.AccessAnalyzerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAccount/AccountClient.swift b/Sources/Services/AWSAccount/AccountClient.swift index d4f4a61a09a..6927728b345 100644 --- a/Sources/Services/AWSAccount/AccountClient.swift +++ b/Sources/Services/AWSAccount/AccountClient.swift @@ -117,7 +117,8 @@ extension AccountClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AccountClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AccountClient.AccountClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AccountClient { /// Performs the `DeleteAlternateContact` operation on the `Account` service. /// diff --git a/Sources/Services/AWSAccount/Plugins.swift b/Sources/Services/AWSAccount/Plugins.swift new file mode 100644 index 00000000000..1e83e63c665 --- /dev/null +++ b/Sources/Services/AWSAccount/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AccountClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AccountClient.AccountClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AccountClient.AccountClientConfiguration { + config.authSchemeResolver = DefaultAccountAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AccountClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AccountAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AccountClient.AccountClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAlexaForBusiness/AlexaForBusinessClient.swift b/Sources/Services/AWSAlexaForBusiness/AlexaForBusinessClient.swift index f2b8645f356..144e82f76f3 100644 --- a/Sources/Services/AWSAlexaForBusiness/AlexaForBusinessClient.swift +++ b/Sources/Services/AWSAlexaForBusiness/AlexaForBusinessClient.swift @@ -117,7 +117,8 @@ extension AlexaForBusinessClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AlexaForBusinessClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AlexaForBusinessClient.AlexaForBusinessClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AlexaForBusinessClient { /// Performs the `ApproveSkill` operation on the `AlexaForBusiness` service. /// diff --git a/Sources/Services/AWSAlexaForBusiness/Plugins.swift b/Sources/Services/AWSAlexaForBusiness/Plugins.swift new file mode 100644 index 00000000000..6a25604766c --- /dev/null +++ b/Sources/Services/AWSAlexaForBusiness/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AlexaForBusinessClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AlexaForBusinessClient.AlexaForBusinessClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AlexaForBusinessClient.AlexaForBusinessClientConfiguration { + config.authSchemeResolver = DefaultAlexaForBusinessAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AlexaForBusinessClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AlexaForBusinessAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AlexaForBusinessClient.AlexaForBusinessClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAmp/AmpClient.swift b/Sources/Services/AWSAmp/AmpClient.swift index 5fcb69be7f7..347b9c17634 100644 --- a/Sources/Services/AWSAmp/AmpClient.swift +++ b/Sources/Services/AWSAmp/AmpClient.swift @@ -117,7 +117,8 @@ extension AmpClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AmpClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AmpClient.AmpClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AmpClient { /// Performs the `CreateAlertManagerDefinition` operation on the `AmazonPrometheusService` service. /// diff --git a/Sources/Services/AWSAmp/Plugins.swift b/Sources/Services/AWSAmp/Plugins.swift new file mode 100644 index 00000000000..4082c824927 --- /dev/null +++ b/Sources/Services/AWSAmp/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AmpClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AmpClient.AmpClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AmpClient.AmpClientConfiguration { + config.authSchemeResolver = DefaultAmpAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AmpClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AmpAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AmpClient.AmpClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAmplify/AmplifyClient.swift b/Sources/Services/AWSAmplify/AmplifyClient.swift index 81f7657c1a1..29e19560dd0 100644 --- a/Sources/Services/AWSAmplify/AmplifyClient.swift +++ b/Sources/Services/AWSAmplify/AmplifyClient.swift @@ -117,7 +117,8 @@ extension AmplifyClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AmplifyClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AmplifyClient.AmplifyClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AmplifyClient { /// Performs the `CreateApp` operation on the `Amplify` service. /// diff --git a/Sources/Services/AWSAmplify/Plugins.swift b/Sources/Services/AWSAmplify/Plugins.swift new file mode 100644 index 00000000000..e9076b36b34 --- /dev/null +++ b/Sources/Services/AWSAmplify/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AmplifyClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AmplifyClient.AmplifyClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AmplifyClient.AmplifyClientConfiguration { + config.authSchemeResolver = DefaultAmplifyAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AmplifyClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AmplifyAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AmplifyClient.AmplifyClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAmplifyBackend/AmplifyBackendClient.swift b/Sources/Services/AWSAmplifyBackend/AmplifyBackendClient.swift index e4bfe5fa4f5..f310ff5f0eb 100644 --- a/Sources/Services/AWSAmplifyBackend/AmplifyBackendClient.swift +++ b/Sources/Services/AWSAmplifyBackend/AmplifyBackendClient.swift @@ -117,7 +117,8 @@ extension AmplifyBackendClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AmplifyBackendClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AmplifyBackendClient.AmplifyBackendClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AmplifyBackendClient { /// Performs the `CloneBackend` operation on the `AmplifyBackend` service. /// diff --git a/Sources/Services/AWSAmplifyBackend/Plugins.swift b/Sources/Services/AWSAmplifyBackend/Plugins.swift new file mode 100644 index 00000000000..e1c3e9106eb --- /dev/null +++ b/Sources/Services/AWSAmplifyBackend/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AmplifyBackendClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AmplifyBackendClient.AmplifyBackendClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AmplifyBackendClient.AmplifyBackendClientConfiguration { + config.authSchemeResolver = DefaultAmplifyBackendAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AmplifyBackendClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AmplifyBackendAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AmplifyBackendClient.AmplifyBackendClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAmplifyUIBuilder/AmplifyUIBuilderClient.swift b/Sources/Services/AWSAmplifyUIBuilder/AmplifyUIBuilderClient.swift index 0d5886b20fc..63b9df8ba6d 100644 --- a/Sources/Services/AWSAmplifyUIBuilder/AmplifyUIBuilderClient.swift +++ b/Sources/Services/AWSAmplifyUIBuilder/AmplifyUIBuilderClient.swift @@ -117,7 +117,8 @@ extension AmplifyUIBuilderClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AmplifyUIBuilderClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AmplifyUIBuilderClient.AmplifyUIBuilderClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AmplifyUIBuilderClient { /// Performs the `CreateComponent` operation on the `AmplifyUIBuilder` service. /// diff --git a/Sources/Services/AWSAmplifyUIBuilder/Plugins.swift b/Sources/Services/AWSAmplifyUIBuilder/Plugins.swift new file mode 100644 index 00000000000..1a67bb03a69 --- /dev/null +++ b/Sources/Services/AWSAmplifyUIBuilder/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AmplifyUIBuilderClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AmplifyUIBuilderClient.AmplifyUIBuilderClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AmplifyUIBuilderClient.AmplifyUIBuilderClientConfiguration { + config.authSchemeResolver = DefaultAmplifyUIBuilderAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AmplifyUIBuilderClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AmplifyUIBuilderAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AmplifyUIBuilderClient.AmplifyUIBuilderClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSApiGatewayManagementApi/ApiGatewayManagementApiClient.swift b/Sources/Services/AWSApiGatewayManagementApi/ApiGatewayManagementApiClient.swift index 6a6527e414a..a971131a832 100644 --- a/Sources/Services/AWSApiGatewayManagementApi/ApiGatewayManagementApiClient.swift +++ b/Sources/Services/AWSApiGatewayManagementApi/ApiGatewayManagementApiClient.swift @@ -117,7 +117,8 @@ extension ApiGatewayManagementApiClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ApiGatewayManagementApiClientLogHandlerFactory: ClientRuntime.SDKL } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ApiGatewayManagementApiClient.ApiGatewayManagementApiClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ApiGatewayManagementApiClient { /// Performs the `DeleteConnection` operation on the `ApiGatewayManagementApi` service. /// diff --git a/Sources/Services/AWSApiGatewayManagementApi/Plugins.swift b/Sources/Services/AWSApiGatewayManagementApi/Plugins.swift new file mode 100644 index 00000000000..83a1d5679ea --- /dev/null +++ b/Sources/Services/AWSApiGatewayManagementApi/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ApiGatewayManagementApiClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApiGatewayManagementApiClient.ApiGatewayManagementApiClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApiGatewayManagementApiClient.ApiGatewayManagementApiClientConfiguration { + config.authSchemeResolver = DefaultApiGatewayManagementApiAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ApiGatewayManagementApiClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ApiGatewayManagementApiAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApiGatewayManagementApiClient.ApiGatewayManagementApiClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSApiGatewayV2/ApiGatewayV2Client.swift b/Sources/Services/AWSApiGatewayV2/ApiGatewayV2Client.swift index 568df86ff66..de6a40854f6 100644 --- a/Sources/Services/AWSApiGatewayV2/ApiGatewayV2Client.swift +++ b/Sources/Services/AWSApiGatewayV2/ApiGatewayV2Client.swift @@ -117,7 +117,8 @@ extension ApiGatewayV2Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ApiGatewayV2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ApiGatewayV2Client.ApiGatewayV2ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ApiGatewayV2Client { /// Performs the `CreateApi` operation on the `ApiGatewayV2` service. /// diff --git a/Sources/Services/AWSApiGatewayV2/Plugins.swift b/Sources/Services/AWSApiGatewayV2/Plugins.swift new file mode 100644 index 00000000000..cf45c8b2ebe --- /dev/null +++ b/Sources/Services/AWSApiGatewayV2/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ApiGatewayV2ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApiGatewayV2Client.ApiGatewayV2ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApiGatewayV2Client.ApiGatewayV2ClientConfiguration { + config.authSchemeResolver = DefaultApiGatewayV2AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ApiGatewayV2ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ApiGatewayV2AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApiGatewayV2Client.ApiGatewayV2ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAppConfig/AppConfigClient.swift b/Sources/Services/AWSAppConfig/AppConfigClient.swift index 117a8e10579..9b5084611b9 100644 --- a/Sources/Services/AWSAppConfig/AppConfigClient.swift +++ b/Sources/Services/AWSAppConfig/AppConfigClient.swift @@ -117,7 +117,8 @@ extension AppConfigClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AppConfigClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AppConfigClient.AppConfigClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AppConfigClient { /// Performs the `CreateApplication` operation on the `AmazonAppConfig` service. /// diff --git a/Sources/Services/AWSAppConfig/Plugins.swift b/Sources/Services/AWSAppConfig/Plugins.swift new file mode 100644 index 00000000000..c15bb55cb77 --- /dev/null +++ b/Sources/Services/AWSAppConfig/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AppConfigClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppConfigClient.AppConfigClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppConfigClient.AppConfigClientConfiguration { + config.authSchemeResolver = DefaultAppConfigAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AppConfigClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AppConfigAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppConfigClient.AppConfigClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAppConfigData/AppConfigDataClient.swift b/Sources/Services/AWSAppConfigData/AppConfigDataClient.swift index b437272d36f..72085bd0bb7 100644 --- a/Sources/Services/AWSAppConfigData/AppConfigDataClient.swift +++ b/Sources/Services/AWSAppConfigData/AppConfigDataClient.swift @@ -117,7 +117,8 @@ extension AppConfigDataClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AppConfigDataClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AppConfigDataClient.AppConfigDataClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AppConfigDataClient { /// Performs the `GetLatestConfiguration` operation on the `AppConfigData` service. /// diff --git a/Sources/Services/AWSAppConfigData/Plugins.swift b/Sources/Services/AWSAppConfigData/Plugins.swift new file mode 100644 index 00000000000..acdebd2572c --- /dev/null +++ b/Sources/Services/AWSAppConfigData/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AppConfigDataClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppConfigDataClient.AppConfigDataClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppConfigDataClient.AppConfigDataClientConfiguration { + config.authSchemeResolver = DefaultAppConfigDataAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AppConfigDataClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AppConfigDataAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppConfigDataClient.AppConfigDataClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAppFabric/AppFabricClient.swift b/Sources/Services/AWSAppFabric/AppFabricClient.swift index 0bb9841e18e..9496939b1c1 100644 --- a/Sources/Services/AWSAppFabric/AppFabricClient.swift +++ b/Sources/Services/AWSAppFabric/AppFabricClient.swift @@ -117,7 +117,8 @@ extension AppFabricClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AppFabricClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AppFabricClient.AppFabricClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AppFabricClient { /// Performs the `BatchGetUserAccessTasks` operation on the `FabricFrontEndService` service. /// diff --git a/Sources/Services/AWSAppFabric/Plugins.swift b/Sources/Services/AWSAppFabric/Plugins.swift new file mode 100644 index 00000000000..41517562d5f --- /dev/null +++ b/Sources/Services/AWSAppFabric/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AppFabricClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppFabricClient.AppFabricClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppFabricClient.AppFabricClientConfiguration { + config.authSchemeResolver = DefaultAppFabricAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AppFabricClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AppFabricAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppFabricClient.AppFabricClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAppIntegrations/AppIntegrationsClient.swift b/Sources/Services/AWSAppIntegrations/AppIntegrationsClient.swift index 6a9c06336db..be2334b12bf 100644 --- a/Sources/Services/AWSAppIntegrations/AppIntegrationsClient.swift +++ b/Sources/Services/AWSAppIntegrations/AppIntegrationsClient.swift @@ -117,7 +117,8 @@ extension AppIntegrationsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AppIntegrationsClientLogHandlerFactory: ClientRuntime.SDKLogHandle } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AppIntegrationsClient.AppIntegrationsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AppIntegrationsClient { /// Performs the `CreateApplication` operation on the `AmazonAppIntegrationService` service. /// diff --git a/Sources/Services/AWSAppIntegrations/Plugins.swift b/Sources/Services/AWSAppIntegrations/Plugins.swift new file mode 100644 index 00000000000..80e817cb371 --- /dev/null +++ b/Sources/Services/AWSAppIntegrations/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AppIntegrationsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppIntegrationsClient.AppIntegrationsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppIntegrationsClient.AppIntegrationsClientConfiguration { + config.authSchemeResolver = DefaultAppIntegrationsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AppIntegrationsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AppIntegrationsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppIntegrationsClient.AppIntegrationsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAppMesh/AppMeshClient.swift b/Sources/Services/AWSAppMesh/AppMeshClient.swift index 775b706b659..728cd2e40d5 100644 --- a/Sources/Services/AWSAppMesh/AppMeshClient.swift +++ b/Sources/Services/AWSAppMesh/AppMeshClient.swift @@ -117,7 +117,8 @@ extension AppMeshClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AppMeshClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AppMeshClient.AppMeshClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AppMeshClient { /// Performs the `CreateGatewayRoute` operation on the `AppMesh` service. /// diff --git a/Sources/Services/AWSAppMesh/Plugins.swift b/Sources/Services/AWSAppMesh/Plugins.swift new file mode 100644 index 00000000000..71e05753f11 --- /dev/null +++ b/Sources/Services/AWSAppMesh/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AppMeshClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppMeshClient.AppMeshClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppMeshClient.AppMeshClientConfiguration { + config.authSchemeResolver = DefaultAppMeshAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AppMeshClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AppMeshAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppMeshClient.AppMeshClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAppRunner/AppRunnerClient.swift b/Sources/Services/AWSAppRunner/AppRunnerClient.swift index af2d85fb986..517a8a35269 100644 --- a/Sources/Services/AWSAppRunner/AppRunnerClient.swift +++ b/Sources/Services/AWSAppRunner/AppRunnerClient.swift @@ -117,7 +117,8 @@ extension AppRunnerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AppRunnerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AppRunnerClient.AppRunnerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AppRunnerClient { /// Performs the `AssociateCustomDomain` operation on the `AppRunner` service. /// diff --git a/Sources/Services/AWSAppRunner/Plugins.swift b/Sources/Services/AWSAppRunner/Plugins.swift new file mode 100644 index 00000000000..9f01a9d89a6 --- /dev/null +++ b/Sources/Services/AWSAppRunner/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AppRunnerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppRunnerClient.AppRunnerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppRunnerClient.AppRunnerClientConfiguration { + config.authSchemeResolver = DefaultAppRunnerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AppRunnerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AppRunnerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppRunnerClient.AppRunnerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAppStream/AppStreamClient.swift b/Sources/Services/AWSAppStream/AppStreamClient.swift index d6e3c7f4b24..23b48e6707f 100644 --- a/Sources/Services/AWSAppStream/AppStreamClient.swift +++ b/Sources/Services/AWSAppStream/AppStreamClient.swift @@ -117,7 +117,8 @@ extension AppStreamClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AppStreamClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AppStreamClient.AppStreamClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AppStreamClient { /// Performs the `AssociateAppBlockBuilderAppBlock` operation on the `PhotonAdminProxyService` service. /// diff --git a/Sources/Services/AWSAppStream/Plugins.swift b/Sources/Services/AWSAppStream/Plugins.swift new file mode 100644 index 00000000000..acbf8cf006d --- /dev/null +++ b/Sources/Services/AWSAppStream/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AppStreamClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppStreamClient.AppStreamClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppStreamClient.AppStreamClientConfiguration { + config.authSchemeResolver = DefaultAppStreamAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AppStreamClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AppStreamAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppStreamClient.AppStreamClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAppSync/AppSyncClient.swift b/Sources/Services/AWSAppSync/AppSyncClient.swift index c56791c9c9e..1f7b9eec190 100644 --- a/Sources/Services/AWSAppSync/AppSyncClient.swift +++ b/Sources/Services/AWSAppSync/AppSyncClient.swift @@ -117,7 +117,8 @@ extension AppSyncClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AppSyncClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AppSyncClient.AppSyncClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AppSyncClient { /// Performs the `AssociateApi` operation on the `AWSDeepdishControlPlaneService` service. /// diff --git a/Sources/Services/AWSAppSync/Plugins.swift b/Sources/Services/AWSAppSync/Plugins.swift new file mode 100644 index 00000000000..c6928b40ca2 --- /dev/null +++ b/Sources/Services/AWSAppSync/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AppSyncClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppSyncClient.AppSyncClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppSyncClient.AppSyncClientConfiguration { + config.authSchemeResolver = DefaultAppSyncAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AppSyncClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AppSyncAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppSyncClient.AppSyncClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAppflow/AppflowClient.swift b/Sources/Services/AWSAppflow/AppflowClient.swift index 5052c08bd09..96883a02f94 100644 --- a/Sources/Services/AWSAppflow/AppflowClient.swift +++ b/Sources/Services/AWSAppflow/AppflowClient.swift @@ -117,7 +117,8 @@ extension AppflowClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AppflowClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AppflowClient.AppflowClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AppflowClient { /// Performs the `CancelFlowExecutions` operation on the `SandstoneConfigurationServiceLambda` service. /// diff --git a/Sources/Services/AWSAppflow/Plugins.swift b/Sources/Services/AWSAppflow/Plugins.swift new file mode 100644 index 00000000000..3e55099a6ad --- /dev/null +++ b/Sources/Services/AWSAppflow/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AppflowClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppflowClient.AppflowClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppflowClient.AppflowClientConfiguration { + config.authSchemeResolver = DefaultAppflowAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AppflowClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AppflowAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AppflowClient.AppflowClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSApplicationAutoScaling/ApplicationAutoScalingClient.swift b/Sources/Services/AWSApplicationAutoScaling/ApplicationAutoScalingClient.swift index 74fa037a364..8304b7db7bf 100644 --- a/Sources/Services/AWSApplicationAutoScaling/ApplicationAutoScalingClient.swift +++ b/Sources/Services/AWSApplicationAutoScaling/ApplicationAutoScalingClient.swift @@ -117,7 +117,8 @@ extension ApplicationAutoScalingClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ApplicationAutoScalingClientLogHandlerFactory: ClientRuntime.SDKLo } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ApplicationAutoScalingClient.ApplicationAutoScalingClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ApplicationAutoScalingClient { /// Performs the `DeleteScalingPolicy` operation on the `AnyScaleFrontendService` service. /// diff --git a/Sources/Services/AWSApplicationAutoScaling/Plugins.swift b/Sources/Services/AWSApplicationAutoScaling/Plugins.swift new file mode 100644 index 00000000000..7f8fb1f32f8 --- /dev/null +++ b/Sources/Services/AWSApplicationAutoScaling/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ApplicationAutoScalingClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApplicationAutoScalingClient.ApplicationAutoScalingClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApplicationAutoScalingClient.ApplicationAutoScalingClientConfiguration { + config.authSchemeResolver = DefaultApplicationAutoScalingAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ApplicationAutoScalingClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ApplicationAutoScalingAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApplicationAutoScalingClient.ApplicationAutoScalingClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSApplicationCostProfiler/ApplicationCostProfilerClient.swift b/Sources/Services/AWSApplicationCostProfiler/ApplicationCostProfilerClient.swift index 0e8b7e4b508..08a40ec90d5 100644 --- a/Sources/Services/AWSApplicationCostProfiler/ApplicationCostProfilerClient.swift +++ b/Sources/Services/AWSApplicationCostProfiler/ApplicationCostProfilerClient.swift @@ -117,7 +117,8 @@ extension ApplicationCostProfilerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ApplicationCostProfilerClientLogHandlerFactory: ClientRuntime.SDKL } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ApplicationCostProfilerClient.ApplicationCostProfilerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ApplicationCostProfilerClient { /// Performs the `DeleteReportDefinition` operation on the `AWSApplicationCostProfiler` service. /// diff --git a/Sources/Services/AWSApplicationCostProfiler/Plugins.swift b/Sources/Services/AWSApplicationCostProfiler/Plugins.swift new file mode 100644 index 00000000000..5f8d9c39fd8 --- /dev/null +++ b/Sources/Services/AWSApplicationCostProfiler/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ApplicationCostProfilerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApplicationCostProfilerClient.ApplicationCostProfilerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApplicationCostProfilerClient.ApplicationCostProfilerClientConfiguration { + config.authSchemeResolver = DefaultApplicationCostProfilerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ApplicationCostProfilerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ApplicationCostProfilerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApplicationCostProfilerClient.ApplicationCostProfilerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSApplicationDiscoveryService/ApplicationDiscoveryClient.swift b/Sources/Services/AWSApplicationDiscoveryService/ApplicationDiscoveryClient.swift index 171a85f7f40..7597da7c49f 100644 --- a/Sources/Services/AWSApplicationDiscoveryService/ApplicationDiscoveryClient.swift +++ b/Sources/Services/AWSApplicationDiscoveryService/ApplicationDiscoveryClient.swift @@ -117,7 +117,8 @@ extension ApplicationDiscoveryClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ApplicationDiscoveryClientLogHandlerFactory: ClientRuntime.SDKLogH } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ApplicationDiscoveryClient.ApplicationDiscoveryClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ApplicationDiscoveryClient { /// Performs the `AssociateConfigurationItemsToApplication` operation on the `AWSPoseidonService_V2015_11_01` service. /// diff --git a/Sources/Services/AWSApplicationDiscoveryService/Plugins.swift b/Sources/Services/AWSApplicationDiscoveryService/Plugins.swift new file mode 100644 index 00000000000..eed344c625a --- /dev/null +++ b/Sources/Services/AWSApplicationDiscoveryService/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ApplicationDiscoveryClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApplicationDiscoveryClient.ApplicationDiscoveryClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApplicationDiscoveryClient.ApplicationDiscoveryClientConfiguration { + config.authSchemeResolver = DefaultApplicationDiscoveryServiceAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ApplicationDiscoveryClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ApplicationDiscoveryServiceAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApplicationDiscoveryClient.ApplicationDiscoveryClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSApplicationInsights/ApplicationInsightsClient.swift b/Sources/Services/AWSApplicationInsights/ApplicationInsightsClient.swift index d980fd183f6..2ab52d715be 100644 --- a/Sources/Services/AWSApplicationInsights/ApplicationInsightsClient.swift +++ b/Sources/Services/AWSApplicationInsights/ApplicationInsightsClient.swift @@ -117,7 +117,8 @@ extension ApplicationInsightsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ApplicationInsightsClientLogHandlerFactory: ClientRuntime.SDKLogHa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ApplicationInsightsClient.ApplicationInsightsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ApplicationInsightsClient { /// Performs the `AddWorkload` operation on the `EC2WindowsBarleyService` service. /// diff --git a/Sources/Services/AWSApplicationInsights/Plugins.swift b/Sources/Services/AWSApplicationInsights/Plugins.swift new file mode 100644 index 00000000000..00d1000842a --- /dev/null +++ b/Sources/Services/AWSApplicationInsights/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ApplicationInsightsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApplicationInsightsClient.ApplicationInsightsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApplicationInsightsClient.ApplicationInsightsClientConfiguration { + config.authSchemeResolver = DefaultApplicationInsightsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ApplicationInsightsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ApplicationInsightsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ApplicationInsightsClient.ApplicationInsightsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSArtifact/ArtifactClient.swift b/Sources/Services/AWSArtifact/ArtifactClient.swift index 018f9840515..9b2963d018f 100644 --- a/Sources/Services/AWSArtifact/ArtifactClient.swift +++ b/Sources/Services/AWSArtifact/ArtifactClient.swift @@ -117,7 +117,8 @@ extension ArtifactClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ArtifactClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ArtifactClient.ArtifactClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ArtifactClient { /// Performs the `GetAccountSettings` operation on the `Artifact` service. /// diff --git a/Sources/Services/AWSArtifact/Plugins.swift b/Sources/Services/AWSArtifact/Plugins.swift new file mode 100644 index 00000000000..c994f3a06d5 --- /dev/null +++ b/Sources/Services/AWSArtifact/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ArtifactClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ArtifactClient.ArtifactClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ArtifactClient.ArtifactClientConfiguration { + config.authSchemeResolver = DefaultArtifactAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ArtifactClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ArtifactAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ArtifactClient.ArtifactClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAthena/AthenaClient.swift b/Sources/Services/AWSAthena/AthenaClient.swift index c0f87112b83..eac77a67637 100644 --- a/Sources/Services/AWSAthena/AthenaClient.swift +++ b/Sources/Services/AWSAthena/AthenaClient.swift @@ -117,7 +117,8 @@ extension AthenaClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AthenaClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AthenaClient.AthenaClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AthenaClient { /// Performs the `BatchGetNamedQuery` operation on the `AmazonAthena` service. /// diff --git a/Sources/Services/AWSAthena/Plugins.swift b/Sources/Services/AWSAthena/Plugins.swift new file mode 100644 index 00000000000..74309fd5e6f --- /dev/null +++ b/Sources/Services/AWSAthena/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AthenaClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AthenaClient.AthenaClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AthenaClient.AthenaClientConfiguration { + config.authSchemeResolver = DefaultAthenaAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AthenaClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AthenaAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AthenaClient.AthenaClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAuditManager/AuditManagerClient.swift b/Sources/Services/AWSAuditManager/AuditManagerClient.swift index f34cca3bca2..fdd3eef56e0 100644 --- a/Sources/Services/AWSAuditManager/AuditManagerClient.swift +++ b/Sources/Services/AWSAuditManager/AuditManagerClient.swift @@ -117,7 +117,8 @@ extension AuditManagerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AuditManagerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AuditManagerClient.AuditManagerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AuditManagerClient { /// Performs the `AssociateAssessmentReportEvidenceFolder` operation on the `BedrockAssessmentManagerLambda` service. /// diff --git a/Sources/Services/AWSAuditManager/Plugins.swift b/Sources/Services/AWSAuditManager/Plugins.swift new file mode 100644 index 00000000000..b54bc185bb0 --- /dev/null +++ b/Sources/Services/AWSAuditManager/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AuditManagerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AuditManagerClient.AuditManagerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AuditManagerClient.AuditManagerClientConfiguration { + config.authSchemeResolver = DefaultAuditManagerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AuditManagerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AuditManagerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AuditManagerClient.AuditManagerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAutoScaling/AutoScalingClient.swift b/Sources/Services/AWSAutoScaling/AutoScalingClient.swift index 2d62c04ce66..ba630b6601c 100644 --- a/Sources/Services/AWSAutoScaling/AutoScalingClient.swift +++ b/Sources/Services/AWSAutoScaling/AutoScalingClient.swift @@ -110,7 +110,8 @@ extension AutoScalingClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -128,21 +129,6 @@ public struct AutoScalingClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AutoScalingClient.AutoScalingClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AutoScalingClient { /// Performs the `AttachInstances` operation on the `AutoScaling_2011_01_01` service. /// diff --git a/Sources/Services/AWSAutoScaling/Plugins.swift b/Sources/Services/AWSAutoScaling/Plugins.swift new file mode 100644 index 00000000000..c943c462207 --- /dev/null +++ b/Sources/Services/AWSAutoScaling/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AutoScalingClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AutoScalingClient.AutoScalingClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AutoScalingClient.AutoScalingClientConfiguration { + config.authSchemeResolver = DefaultAutoScalingAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AutoScalingClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AutoScalingAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AutoScalingClient.AutoScalingClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSAutoScalingPlans/AutoScalingPlansClient.swift b/Sources/Services/AWSAutoScalingPlans/AutoScalingPlansClient.swift index 560654d70fc..0afc2564a45 100644 --- a/Sources/Services/AWSAutoScalingPlans/AutoScalingPlansClient.swift +++ b/Sources/Services/AWSAutoScalingPlans/AutoScalingPlansClient.swift @@ -117,7 +117,8 @@ extension AutoScalingPlansClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct AutoScalingPlansClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? AutoScalingPlansClient.AutoScalingPlansClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension AutoScalingPlansClient { /// Performs the `CreateScalingPlan` operation on the `AnyScaleScalingPlannerFrontendService` service. /// diff --git a/Sources/Services/AWSAutoScalingPlans/Plugins.swift b/Sources/Services/AWSAutoScalingPlans/Plugins.swift new file mode 100644 index 00000000000..925fe9c59d5 --- /dev/null +++ b/Sources/Services/AWSAutoScalingPlans/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class AutoScalingPlansClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AutoScalingPlansClient.AutoScalingPlansClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AutoScalingPlansClient.AutoScalingPlansClientConfiguration { + config.authSchemeResolver = DefaultAutoScalingPlansAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class AutoScalingPlansClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: AutoScalingPlansAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? AutoScalingPlansClient.AutoScalingPlansClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSB2bi/B2biClient.swift b/Sources/Services/AWSB2bi/B2biClient.swift index 44ff78b8c1a..26fb986ab7f 100644 --- a/Sources/Services/AWSB2bi/B2biClient.swift +++ b/Sources/Services/AWSB2bi/B2biClient.swift @@ -117,7 +117,8 @@ extension B2biClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct B2biClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? B2biClient.B2biClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension B2biClient { /// Performs the `CreateCapability` operation on the `B2BI` service. /// diff --git a/Sources/Services/AWSB2bi/Plugins.swift b/Sources/Services/AWSB2bi/Plugins.swift new file mode 100644 index 00000000000..a1d7033b3d6 --- /dev/null +++ b/Sources/Services/AWSB2bi/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class B2biClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? B2biClient.B2biClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? B2biClient.B2biClientConfiguration { + config.authSchemeResolver = DefaultB2biAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class B2biClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: B2biAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? B2biClient.B2biClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSBCMDataExports/BCMDataExportsClient.swift b/Sources/Services/AWSBCMDataExports/BCMDataExportsClient.swift index 1cad6770525..ca12af5f8e4 100644 --- a/Sources/Services/AWSBCMDataExports/BCMDataExportsClient.swift +++ b/Sources/Services/AWSBCMDataExports/BCMDataExportsClient.swift @@ -117,7 +117,8 @@ extension BCMDataExportsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct BCMDataExportsClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? BCMDataExportsClient.BCMDataExportsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension BCMDataExportsClient { /// Performs the `CreateExport` operation on the `AWSBillingAndCostManagementDataExports` service. /// diff --git a/Sources/Services/AWSBCMDataExports/Plugins.swift b/Sources/Services/AWSBCMDataExports/Plugins.swift new file mode 100644 index 00000000000..0d37238ae61 --- /dev/null +++ b/Sources/Services/AWSBCMDataExports/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class BCMDataExportsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BCMDataExportsClient.BCMDataExportsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BCMDataExportsClient.BCMDataExportsClientConfiguration { + config.authSchemeResolver = DefaultBCMDataExportsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class BCMDataExportsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: BCMDataExportsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BCMDataExportsClient.BCMDataExportsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSBackup/BackupClient.swift b/Sources/Services/AWSBackup/BackupClient.swift index 548c93b0ca3..a7e98562b2a 100644 --- a/Sources/Services/AWSBackup/BackupClient.swift +++ b/Sources/Services/AWSBackup/BackupClient.swift @@ -117,7 +117,8 @@ extension BackupClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct BackupClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? BackupClient.BackupClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension BackupClient { /// Performs the `CancelLegalHold` operation on the `CryoControllerUserManager` service. /// diff --git a/Sources/Services/AWSBackup/Plugins.swift b/Sources/Services/AWSBackup/Plugins.swift new file mode 100644 index 00000000000..c29fc330bb8 --- /dev/null +++ b/Sources/Services/AWSBackup/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class BackupClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BackupClient.BackupClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BackupClient.BackupClientConfiguration { + config.authSchemeResolver = DefaultBackupAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class BackupClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: BackupAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BackupClient.BackupClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSBackupGateway/BackupGatewayClient.swift b/Sources/Services/AWSBackupGateway/BackupGatewayClient.swift index 31d968863ef..e15f2d52b9c 100644 --- a/Sources/Services/AWSBackupGateway/BackupGatewayClient.swift +++ b/Sources/Services/AWSBackupGateway/BackupGatewayClient.swift @@ -117,7 +117,8 @@ extension BackupGatewayClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct BackupGatewayClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? BackupGatewayClient.BackupGatewayClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension BackupGatewayClient { /// Performs the `AssociateGatewayToServer` operation on the `BackupOnPremises_v20210101` service. /// diff --git a/Sources/Services/AWSBackupGateway/Plugins.swift b/Sources/Services/AWSBackupGateway/Plugins.swift new file mode 100644 index 00000000000..ca4874ccb90 --- /dev/null +++ b/Sources/Services/AWSBackupGateway/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class BackupGatewayClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BackupGatewayClient.BackupGatewayClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BackupGatewayClient.BackupGatewayClientConfiguration { + config.authSchemeResolver = DefaultBackupGatewayAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class BackupGatewayClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: BackupGatewayAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BackupGatewayClient.BackupGatewayClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSBackupStorage/BackupStorageClient.swift b/Sources/Services/AWSBackupStorage/BackupStorageClient.swift index a0a13b465fb..9ec3b492609 100644 --- a/Sources/Services/AWSBackupStorage/BackupStorageClient.swift +++ b/Sources/Services/AWSBackupStorage/BackupStorageClient.swift @@ -117,7 +117,8 @@ extension BackupStorageClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct BackupStorageClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? BackupStorageClient.BackupStorageClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension BackupStorageClient { /// Performs the `DeleteObject` operation on the `CryoStorageFrontendService` service. /// diff --git a/Sources/Services/AWSBackupStorage/Plugins.swift b/Sources/Services/AWSBackupStorage/Plugins.swift new file mode 100644 index 00000000000..9667de1bc2e --- /dev/null +++ b/Sources/Services/AWSBackupStorage/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class BackupStorageClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BackupStorageClient.BackupStorageClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BackupStorageClient.BackupStorageClientConfiguration { + config.authSchemeResolver = DefaultBackupStorageAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class BackupStorageClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: BackupStorageAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BackupStorageClient.BackupStorageClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSBatch/BatchClient.swift b/Sources/Services/AWSBatch/BatchClient.swift index 64b3114ac3e..4d29afb6de1 100644 --- a/Sources/Services/AWSBatch/BatchClient.swift +++ b/Sources/Services/AWSBatch/BatchClient.swift @@ -117,7 +117,8 @@ extension BatchClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct BatchClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? BatchClient.BatchClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension BatchClient { /// Performs the `CancelJob` operation on the `AWSBatchV20160810` service. /// diff --git a/Sources/Services/AWSBatch/Plugins.swift b/Sources/Services/AWSBatch/Plugins.swift new file mode 100644 index 00000000000..279d3cd7447 --- /dev/null +++ b/Sources/Services/AWSBatch/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class BatchClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BatchClient.BatchClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BatchClient.BatchClientConfiguration { + config.authSchemeResolver = DefaultBatchAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class BatchClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: BatchAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BatchClient.BatchClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSBedrock/BedrockClient.swift b/Sources/Services/AWSBedrock/BedrockClient.swift index 1b96f77a1b3..388fad71f35 100644 --- a/Sources/Services/AWSBedrock/BedrockClient.swift +++ b/Sources/Services/AWSBedrock/BedrockClient.swift @@ -117,7 +117,8 @@ extension BedrockClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct BedrockClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? BedrockClient.BedrockClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension BedrockClient { /// Performs the `CreateModelCustomizationJob` operation on the `AmazonBedrockControlPlaneService` service. /// diff --git a/Sources/Services/AWSBedrock/Plugins.swift b/Sources/Services/AWSBedrock/Plugins.swift new file mode 100644 index 00000000000..453c03b1b9d --- /dev/null +++ b/Sources/Services/AWSBedrock/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class BedrockClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BedrockClient.BedrockClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BedrockClient.BedrockClientConfiguration { + config.authSchemeResolver = DefaultBedrockAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class BedrockClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: BedrockAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BedrockClient.BedrockClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSBedrockAgent/BedrockAgentClient.swift b/Sources/Services/AWSBedrockAgent/BedrockAgentClient.swift index 8b82a445d8b..b6335fb0a96 100644 --- a/Sources/Services/AWSBedrockAgent/BedrockAgentClient.swift +++ b/Sources/Services/AWSBedrockAgent/BedrockAgentClient.swift @@ -117,7 +117,8 @@ extension BedrockAgentClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct BedrockAgentClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? BedrockAgentClient.BedrockAgentClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension BedrockAgentClient { /// Performs the `AssociateAgentKnowledgeBase` operation on the `AmazonBedrockAgentBuildTimeLambda` service. /// diff --git a/Sources/Services/AWSBedrockAgent/Plugins.swift b/Sources/Services/AWSBedrockAgent/Plugins.swift new file mode 100644 index 00000000000..d83de2f8210 --- /dev/null +++ b/Sources/Services/AWSBedrockAgent/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class BedrockAgentClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BedrockAgentClient.BedrockAgentClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BedrockAgentClient.BedrockAgentClientConfiguration { + config.authSchemeResolver = DefaultBedrockAgentAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class BedrockAgentClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: BedrockAgentAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BedrockAgentClient.BedrockAgentClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSBedrockAgentRuntime/BedrockAgentRuntimeClient.swift b/Sources/Services/AWSBedrockAgentRuntime/BedrockAgentRuntimeClient.swift index b7efab362d8..8a18b4a3d5d 100644 --- a/Sources/Services/AWSBedrockAgentRuntime/BedrockAgentRuntimeClient.swift +++ b/Sources/Services/AWSBedrockAgentRuntime/BedrockAgentRuntimeClient.swift @@ -117,7 +117,8 @@ extension BedrockAgentRuntimeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct BedrockAgentRuntimeClientLogHandlerFactory: ClientRuntime.SDKLogHa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? BedrockAgentRuntimeClient.BedrockAgentRuntimeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension BedrockAgentRuntimeClient { /// Performs the `InvokeAgent` operation on the `AmazonBedrockAgentRunTimeService` service. /// diff --git a/Sources/Services/AWSBedrockAgentRuntime/Plugins.swift b/Sources/Services/AWSBedrockAgentRuntime/Plugins.swift new file mode 100644 index 00000000000..cc83fa6fb23 --- /dev/null +++ b/Sources/Services/AWSBedrockAgentRuntime/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class BedrockAgentRuntimeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BedrockAgentRuntimeClient.BedrockAgentRuntimeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BedrockAgentRuntimeClient.BedrockAgentRuntimeClientConfiguration { + config.authSchemeResolver = DefaultBedrockAgentRuntimeAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class BedrockAgentRuntimeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: BedrockAgentRuntimeAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BedrockAgentRuntimeClient.BedrockAgentRuntimeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSBedrockRuntime/BedrockRuntimeClient.swift b/Sources/Services/AWSBedrockRuntime/BedrockRuntimeClient.swift index 7d382604003..7470db44c39 100644 --- a/Sources/Services/AWSBedrockRuntime/BedrockRuntimeClient.swift +++ b/Sources/Services/AWSBedrockRuntime/BedrockRuntimeClient.swift @@ -117,7 +117,8 @@ extension BedrockRuntimeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct BedrockRuntimeClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? BedrockRuntimeClient.BedrockRuntimeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension BedrockRuntimeClient { /// Performs the `InvokeModel` operation on the `AmazonBedrockFrontendService` service. /// diff --git a/Sources/Services/AWSBedrockRuntime/Plugins.swift b/Sources/Services/AWSBedrockRuntime/Plugins.swift new file mode 100644 index 00000000000..1263c509031 --- /dev/null +++ b/Sources/Services/AWSBedrockRuntime/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class BedrockRuntimeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BedrockRuntimeClient.BedrockRuntimeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BedrockRuntimeClient.BedrockRuntimeClientConfiguration { + config.authSchemeResolver = DefaultBedrockRuntimeAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class BedrockRuntimeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: BedrockRuntimeAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BedrockRuntimeClient.BedrockRuntimeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSBillingconductor/BillingconductorClient.swift b/Sources/Services/AWSBillingconductor/BillingconductorClient.swift index 0d8af397608..1a91a0a49a3 100644 --- a/Sources/Services/AWSBillingconductor/BillingconductorClient.swift +++ b/Sources/Services/AWSBillingconductor/BillingconductorClient.swift @@ -117,7 +117,8 @@ extension BillingconductorClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct BillingconductorClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? BillingconductorClient.BillingconductorClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension BillingconductorClient { /// Performs the `AssociateAccounts` operation on the `AWSBillingConductor` service. /// diff --git a/Sources/Services/AWSBillingconductor/Plugins.swift b/Sources/Services/AWSBillingconductor/Plugins.swift new file mode 100644 index 00000000000..28ce2b81485 --- /dev/null +++ b/Sources/Services/AWSBillingconductor/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class BillingconductorClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BillingconductorClient.BillingconductorClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BillingconductorClient.BillingconductorClientConfiguration { + config.authSchemeResolver = DefaultBillingconductorAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class BillingconductorClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: BillingconductorAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BillingconductorClient.BillingconductorClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSBraket/BraketClient.swift b/Sources/Services/AWSBraket/BraketClient.swift index c7e96839467..22b912d624a 100644 --- a/Sources/Services/AWSBraket/BraketClient.swift +++ b/Sources/Services/AWSBraket/BraketClient.swift @@ -117,7 +117,8 @@ extension BraketClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct BraketClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? BraketClient.BraketClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension BraketClient { /// Performs the `CancelJob` operation on the `Braket` service. /// diff --git a/Sources/Services/AWSBraket/Plugins.swift b/Sources/Services/AWSBraket/Plugins.swift new file mode 100644 index 00000000000..82a549ab60d --- /dev/null +++ b/Sources/Services/AWSBraket/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class BraketClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BraketClient.BraketClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BraketClient.BraketClientConfiguration { + config.authSchemeResolver = DefaultBraketAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class BraketClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: BraketAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BraketClient.BraketClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSBudgets/BudgetsClient.swift b/Sources/Services/AWSBudgets/BudgetsClient.swift index 1b7f0d44569..55ce614edbc 100644 --- a/Sources/Services/AWSBudgets/BudgetsClient.swift +++ b/Sources/Services/AWSBudgets/BudgetsClient.swift @@ -117,7 +117,8 @@ extension BudgetsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct BudgetsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? BudgetsClient.BudgetsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension BudgetsClient { /// Performs the `CreateBudget` operation on the `AWSBudgetServiceGateway` service. /// diff --git a/Sources/Services/AWSBudgets/Plugins.swift b/Sources/Services/AWSBudgets/Plugins.swift new file mode 100644 index 00000000000..1c882945840 --- /dev/null +++ b/Sources/Services/AWSBudgets/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class BudgetsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BudgetsClient.BudgetsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BudgetsClient.BudgetsClientConfiguration { + config.authSchemeResolver = DefaultBudgetsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class BudgetsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: BudgetsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? BudgetsClient.BudgetsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSChatbot/ChatbotClient.swift b/Sources/Services/AWSChatbot/ChatbotClient.swift index 58eb044568c..9ab3e7b1d80 100644 --- a/Sources/Services/AWSChatbot/ChatbotClient.swift +++ b/Sources/Services/AWSChatbot/ChatbotClient.swift @@ -117,7 +117,8 @@ extension ChatbotClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ChatbotClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ChatbotClient.ChatbotClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ChatbotClient { /// Performs the `CreateChimeWebhookConfiguration` operation on the `WheatleyOrchestration_20171011` service. /// diff --git a/Sources/Services/AWSChatbot/Plugins.swift b/Sources/Services/AWSChatbot/Plugins.swift new file mode 100644 index 00000000000..aed3d31d3f3 --- /dev/null +++ b/Sources/Services/AWSChatbot/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ChatbotClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChatbotClient.ChatbotClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChatbotClient.ChatbotClientConfiguration { + config.authSchemeResolver = DefaultChatbotAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ChatbotClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ChatbotAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChatbotClient.ChatbotClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSChime/ChimeClient.swift b/Sources/Services/AWSChime/ChimeClient.swift index 1b8b43e2734..ed8bbcd0c74 100644 --- a/Sources/Services/AWSChime/ChimeClient.swift +++ b/Sources/Services/AWSChime/ChimeClient.swift @@ -117,7 +117,8 @@ extension ChimeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ChimeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ChimeClient.ChimeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ChimeClient { /// Performs the `AssociatePhoneNumberWithUser` operation on the `UCBuzzConsoleService` service. /// diff --git a/Sources/Services/AWSChime/Plugins.swift b/Sources/Services/AWSChime/Plugins.swift new file mode 100644 index 00000000000..58c332f0479 --- /dev/null +++ b/Sources/Services/AWSChime/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ChimeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeClient.ChimeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeClient.ChimeClientConfiguration { + config.authSchemeResolver = DefaultChimeAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ChimeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ChimeAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeClient.ChimeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSChimeSDKIdentity/ChimeSDKIdentityClient.swift b/Sources/Services/AWSChimeSDKIdentity/ChimeSDKIdentityClient.swift index d3d4e644132..a24291a05b1 100644 --- a/Sources/Services/AWSChimeSDKIdentity/ChimeSDKIdentityClient.swift +++ b/Sources/Services/AWSChimeSDKIdentity/ChimeSDKIdentityClient.swift @@ -117,7 +117,8 @@ extension ChimeSDKIdentityClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ChimeSDKIdentityClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ChimeSDKIdentityClient.ChimeSDKIdentityClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ChimeSDKIdentityClient { /// Performs the `CreateAppInstance` operation on the `ChimeIdentityService` service. /// diff --git a/Sources/Services/AWSChimeSDKIdentity/Plugins.swift b/Sources/Services/AWSChimeSDKIdentity/Plugins.swift new file mode 100644 index 00000000000..0e607eed941 --- /dev/null +++ b/Sources/Services/AWSChimeSDKIdentity/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ChimeSDKIdentityClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeSDKIdentityClient.ChimeSDKIdentityClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeSDKIdentityClient.ChimeSDKIdentityClientConfiguration { + config.authSchemeResolver = DefaultChimeSDKIdentityAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ChimeSDKIdentityClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ChimeSDKIdentityAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeSDKIdentityClient.ChimeSDKIdentityClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSChimeSDKMediaPipelines/ChimeSDKMediaPipelinesClient.swift b/Sources/Services/AWSChimeSDKMediaPipelines/ChimeSDKMediaPipelinesClient.swift index 916f0bd8bb3..a601f49889b 100644 --- a/Sources/Services/AWSChimeSDKMediaPipelines/ChimeSDKMediaPipelinesClient.swift +++ b/Sources/Services/AWSChimeSDKMediaPipelines/ChimeSDKMediaPipelinesClient.swift @@ -117,7 +117,8 @@ extension ChimeSDKMediaPipelinesClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ChimeSDKMediaPipelinesClientLogHandlerFactory: ClientRuntime.SDKLo } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ChimeSDKMediaPipelinesClient.ChimeSDKMediaPipelinesClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ChimeSDKMediaPipelinesClient { /// Performs the `CreateMediaCapturePipeline` operation on the `ChimeSDKMediaPipelinesService` service. /// diff --git a/Sources/Services/AWSChimeSDKMediaPipelines/Plugins.swift b/Sources/Services/AWSChimeSDKMediaPipelines/Plugins.swift new file mode 100644 index 00000000000..26a0dd513b3 --- /dev/null +++ b/Sources/Services/AWSChimeSDKMediaPipelines/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ChimeSDKMediaPipelinesClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeSDKMediaPipelinesClient.ChimeSDKMediaPipelinesClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeSDKMediaPipelinesClient.ChimeSDKMediaPipelinesClientConfiguration { + config.authSchemeResolver = DefaultChimeSDKMediaPipelinesAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ChimeSDKMediaPipelinesClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ChimeSDKMediaPipelinesAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeSDKMediaPipelinesClient.ChimeSDKMediaPipelinesClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSChimeSDKMeetings/ChimeSDKMeetingsClient.swift b/Sources/Services/AWSChimeSDKMeetings/ChimeSDKMeetingsClient.swift index b76d9f0cba2..848c5843678 100644 --- a/Sources/Services/AWSChimeSDKMeetings/ChimeSDKMeetingsClient.swift +++ b/Sources/Services/AWSChimeSDKMeetings/ChimeSDKMeetingsClient.swift @@ -117,7 +117,8 @@ extension ChimeSDKMeetingsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ChimeSDKMeetingsClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ChimeSDKMeetingsClient.ChimeSDKMeetingsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ChimeSDKMeetingsClient { /// Performs the `BatchCreateAttendee` operation on the `ChimeMeetingsSDKService` service. /// diff --git a/Sources/Services/AWSChimeSDKMeetings/Plugins.swift b/Sources/Services/AWSChimeSDKMeetings/Plugins.swift new file mode 100644 index 00000000000..ce1a82bdb4e --- /dev/null +++ b/Sources/Services/AWSChimeSDKMeetings/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ChimeSDKMeetingsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeSDKMeetingsClient.ChimeSDKMeetingsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeSDKMeetingsClient.ChimeSDKMeetingsClientConfiguration { + config.authSchemeResolver = DefaultChimeSDKMeetingsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ChimeSDKMeetingsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ChimeSDKMeetingsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeSDKMeetingsClient.ChimeSDKMeetingsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSChimeSDKMessaging/ChimeSDKMessagingClient.swift b/Sources/Services/AWSChimeSDKMessaging/ChimeSDKMessagingClient.swift index 8ae314b72aa..f67142a583b 100644 --- a/Sources/Services/AWSChimeSDKMessaging/ChimeSDKMessagingClient.swift +++ b/Sources/Services/AWSChimeSDKMessaging/ChimeSDKMessagingClient.swift @@ -117,7 +117,8 @@ extension ChimeSDKMessagingClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ChimeSDKMessagingClientLogHandlerFactory: ClientRuntime.SDKLogHand } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ChimeSDKMessagingClient.ChimeSDKMessagingClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ChimeSDKMessagingClient { /// Performs the `AssociateChannelFlow` operation on the `ChimeMessagingService` service. /// diff --git a/Sources/Services/AWSChimeSDKMessaging/Plugins.swift b/Sources/Services/AWSChimeSDKMessaging/Plugins.swift new file mode 100644 index 00000000000..65d0aad2405 --- /dev/null +++ b/Sources/Services/AWSChimeSDKMessaging/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ChimeSDKMessagingClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeSDKMessagingClient.ChimeSDKMessagingClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeSDKMessagingClient.ChimeSDKMessagingClientConfiguration { + config.authSchemeResolver = DefaultChimeSDKMessagingAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ChimeSDKMessagingClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ChimeSDKMessagingAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeSDKMessagingClient.ChimeSDKMessagingClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSChimeSDKVoice/ChimeSDKVoiceClient.swift b/Sources/Services/AWSChimeSDKVoice/ChimeSDKVoiceClient.swift index b9ab910eca2..6b24385337d 100644 --- a/Sources/Services/AWSChimeSDKVoice/ChimeSDKVoiceClient.swift +++ b/Sources/Services/AWSChimeSDKVoice/ChimeSDKVoiceClient.swift @@ -117,7 +117,8 @@ extension ChimeSDKVoiceClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ChimeSDKVoiceClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ChimeSDKVoiceClient.ChimeSDKVoiceClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ChimeSDKVoiceClient { /// Performs the `AssociatePhoneNumbersWithVoiceConnector` operation on the `ChimeSDKTelephonyService` service. /// diff --git a/Sources/Services/AWSChimeSDKVoice/Plugins.swift b/Sources/Services/AWSChimeSDKVoice/Plugins.swift new file mode 100644 index 00000000000..1b50e0f3ec3 --- /dev/null +++ b/Sources/Services/AWSChimeSDKVoice/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ChimeSDKVoiceClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeSDKVoiceClient.ChimeSDKVoiceClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeSDKVoiceClient.ChimeSDKVoiceClientConfiguration { + config.authSchemeResolver = DefaultChimeSDKVoiceAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ChimeSDKVoiceClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ChimeSDKVoiceAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ChimeSDKVoiceClient.ChimeSDKVoiceClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCleanRooms/CleanRoomsClient.swift b/Sources/Services/AWSCleanRooms/CleanRoomsClient.swift index 65cb1e9e26c..0db398f843a 100644 --- a/Sources/Services/AWSCleanRooms/CleanRoomsClient.swift +++ b/Sources/Services/AWSCleanRooms/CleanRoomsClient.swift @@ -117,7 +117,8 @@ extension CleanRoomsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CleanRoomsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CleanRoomsClient.CleanRoomsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CleanRoomsClient { /// Performs the `BatchGetCollaborationAnalysisTemplate` operation on the `AWSBastionControlPlaneServiceLambda` service. /// diff --git a/Sources/Services/AWSCleanRooms/Plugins.swift b/Sources/Services/AWSCleanRooms/Plugins.swift new file mode 100644 index 00000000000..cba0bea9df8 --- /dev/null +++ b/Sources/Services/AWSCleanRooms/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CleanRoomsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CleanRoomsClient.CleanRoomsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CleanRoomsClient.CleanRoomsClientConfiguration { + config.authSchemeResolver = DefaultCleanRoomsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CleanRoomsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CleanRoomsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CleanRoomsClient.CleanRoomsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCleanRoomsML/CleanRoomsMLClient.swift b/Sources/Services/AWSCleanRoomsML/CleanRoomsMLClient.swift index d18d137fcb7..96086ffd775 100644 --- a/Sources/Services/AWSCleanRoomsML/CleanRoomsMLClient.swift +++ b/Sources/Services/AWSCleanRoomsML/CleanRoomsMLClient.swift @@ -117,7 +117,8 @@ extension CleanRoomsMLClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CleanRoomsMLClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CleanRoomsMLClient.CleanRoomsMLClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CleanRoomsMLClient { /// Performs the `CreateAudienceModel` operation on the `AWSStarkControlService` service. /// diff --git a/Sources/Services/AWSCleanRoomsML/Plugins.swift b/Sources/Services/AWSCleanRoomsML/Plugins.swift new file mode 100644 index 00000000000..9bf92762051 --- /dev/null +++ b/Sources/Services/AWSCleanRoomsML/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CleanRoomsMLClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CleanRoomsMLClient.CleanRoomsMLClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CleanRoomsMLClient.CleanRoomsMLClientConfiguration { + config.authSchemeResolver = DefaultCleanRoomsMLAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CleanRoomsMLClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CleanRoomsMLAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CleanRoomsMLClient.CleanRoomsMLClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCloud9/Cloud9Client.swift b/Sources/Services/AWSCloud9/Cloud9Client.swift index 37ae2b21361..12e885a75d5 100644 --- a/Sources/Services/AWSCloud9/Cloud9Client.swift +++ b/Sources/Services/AWSCloud9/Cloud9Client.swift @@ -117,7 +117,8 @@ extension Cloud9Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct Cloud9ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? Cloud9Client.Cloud9ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension Cloud9Client { /// Performs the `CreateEnvironmentEC2` operation on the `AWSCloud9WorkspaceManagementService` service. /// diff --git a/Sources/Services/AWSCloud9/Plugins.swift b/Sources/Services/AWSCloud9/Plugins.swift new file mode 100644 index 00000000000..32a2dbe01bd --- /dev/null +++ b/Sources/Services/AWSCloud9/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class Cloud9ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Cloud9Client.Cloud9ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Cloud9Client.Cloud9ClientConfiguration { + config.authSchemeResolver = DefaultCloud9AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class Cloud9ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: Cloud9AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Cloud9Client.Cloud9ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCloudControl/CloudControlClient.swift b/Sources/Services/AWSCloudControl/CloudControlClient.swift index ff076c22ff0..f338788df5c 100644 --- a/Sources/Services/AWSCloudControl/CloudControlClient.swift +++ b/Sources/Services/AWSCloudControl/CloudControlClient.swift @@ -117,7 +117,8 @@ extension CloudControlClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CloudControlClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CloudControlClient.CloudControlClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CloudControlClient { /// Performs the `CancelResourceRequest` operation on the `CloudApiService` service. /// diff --git a/Sources/Services/AWSCloudControl/Plugins.swift b/Sources/Services/AWSCloudControl/Plugins.swift new file mode 100644 index 00000000000..24f07cd050d --- /dev/null +++ b/Sources/Services/AWSCloudControl/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CloudControlClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudControlClient.CloudControlClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudControlClient.CloudControlClientConfiguration { + config.authSchemeResolver = DefaultCloudControlAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CloudControlClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CloudControlAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudControlClient.CloudControlClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCloudDirectory/CloudDirectoryClient.swift b/Sources/Services/AWSCloudDirectory/CloudDirectoryClient.swift index 5b9970203ad..021fc45c8de 100644 --- a/Sources/Services/AWSCloudDirectory/CloudDirectoryClient.swift +++ b/Sources/Services/AWSCloudDirectory/CloudDirectoryClient.swift @@ -117,7 +117,8 @@ extension CloudDirectoryClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CloudDirectoryClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CloudDirectoryClient.CloudDirectoryClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CloudDirectoryClient { /// Performs the `AddFacetToObject` operation on the `AmazonCloudDirectory_20170111` service. /// diff --git a/Sources/Services/AWSCloudDirectory/Plugins.swift b/Sources/Services/AWSCloudDirectory/Plugins.swift new file mode 100644 index 00000000000..9df7bf48ed5 --- /dev/null +++ b/Sources/Services/AWSCloudDirectory/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CloudDirectoryClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudDirectoryClient.CloudDirectoryClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudDirectoryClient.CloudDirectoryClientConfiguration { + config.authSchemeResolver = DefaultCloudDirectoryAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CloudDirectoryClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CloudDirectoryAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudDirectoryClient.CloudDirectoryClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCloudFormation/CloudFormationClient.swift b/Sources/Services/AWSCloudFormation/CloudFormationClient.swift index 94fdda731e7..9afff3a7d3a 100644 --- a/Sources/Services/AWSCloudFormation/CloudFormationClient.swift +++ b/Sources/Services/AWSCloudFormation/CloudFormationClient.swift @@ -110,7 +110,8 @@ extension CloudFormationClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -128,21 +129,6 @@ public struct CloudFormationClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CloudFormationClient.CloudFormationClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CloudFormationClient { /// Performs the `ActivateOrganizationsAccess` operation on the `CloudFormation` service. /// diff --git a/Sources/Services/AWSCloudFormation/Plugins.swift b/Sources/Services/AWSCloudFormation/Plugins.swift new file mode 100644 index 00000000000..c641e05d554 --- /dev/null +++ b/Sources/Services/AWSCloudFormation/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CloudFormationClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudFormationClient.CloudFormationClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudFormationClient.CloudFormationClientConfiguration { + config.authSchemeResolver = DefaultCloudFormationAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CloudFormationClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CloudFormationAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudFormationClient.CloudFormationClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCloudFront/CloudFrontClient.swift b/Sources/Services/AWSCloudFront/CloudFrontClient.swift index 6fe17d4dd31..ee6b29105f6 100644 --- a/Sources/Services/AWSCloudFront/CloudFrontClient.swift +++ b/Sources/Services/AWSCloudFront/CloudFrontClient.swift @@ -108,7 +108,8 @@ extension CloudFrontClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -126,21 +127,6 @@ public struct CloudFrontClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CloudFrontClient.CloudFrontClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CloudFrontClient { /// Performs the `AssociateAlias` operation on the `Cloudfront2020_05_31` service. /// diff --git a/Sources/Services/AWSCloudFront/Plugins.swift b/Sources/Services/AWSCloudFront/Plugins.swift new file mode 100644 index 00000000000..1902b4a5ddf --- /dev/null +++ b/Sources/Services/AWSCloudFront/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CloudFrontClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudFrontClient.CloudFrontClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudFrontClient.CloudFrontClientConfiguration { + config.authSchemeResolver = DefaultCloudFrontAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CloudFrontClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CloudFrontAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudFrontClient.CloudFrontClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCloudFrontKeyValueStore/CloudFrontKeyValueStoreClient.swift b/Sources/Services/AWSCloudFrontKeyValueStore/CloudFrontKeyValueStoreClient.swift index 8a0e1c5c4e6..71966d47635 100644 --- a/Sources/Services/AWSCloudFrontKeyValueStore/CloudFrontKeyValueStoreClient.swift +++ b/Sources/Services/AWSCloudFrontKeyValueStore/CloudFrontKeyValueStoreClient.swift @@ -117,7 +117,8 @@ extension CloudFrontKeyValueStoreClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CloudFrontKeyValueStoreClientLogHandlerFactory: ClientRuntime.SDKL } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CloudFrontKeyValueStoreClient.CloudFrontKeyValueStoreClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CloudFrontKeyValueStoreClient { /// Performs the `DeleteKey` operation on the `CloudFrontKeyValueStore` service. /// diff --git a/Sources/Services/AWSCloudFrontKeyValueStore/Plugins.swift b/Sources/Services/AWSCloudFrontKeyValueStore/Plugins.swift new file mode 100644 index 00000000000..8dc9d64de37 --- /dev/null +++ b/Sources/Services/AWSCloudFrontKeyValueStore/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CloudFrontKeyValueStoreClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudFrontKeyValueStoreClient.CloudFrontKeyValueStoreClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudFrontKeyValueStoreClient.CloudFrontKeyValueStoreClientConfiguration { + config.authSchemeResolver = DefaultCloudFrontKeyValueStoreAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme(), SigV4AAuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CloudFrontKeyValueStoreClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CloudFrontKeyValueStoreAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudFrontKeyValueStoreClient.CloudFrontKeyValueStoreClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCloudHSM/CloudHSMClient.swift b/Sources/Services/AWSCloudHSM/CloudHSMClient.swift index 0f9ea8ee06e..0bd213e92f0 100644 --- a/Sources/Services/AWSCloudHSM/CloudHSMClient.swift +++ b/Sources/Services/AWSCloudHSM/CloudHSMClient.swift @@ -117,7 +117,8 @@ extension CloudHSMClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CloudHSMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CloudHSMClient.CloudHSMClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CloudHSMClient { /// Performs the `AddTagsToResource` operation on the `CloudHsmFrontendService` service. /// diff --git a/Sources/Services/AWSCloudHSM/Plugins.swift b/Sources/Services/AWSCloudHSM/Plugins.swift new file mode 100644 index 00000000000..4dd23a58aa1 --- /dev/null +++ b/Sources/Services/AWSCloudHSM/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CloudHSMClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudHSMClient.CloudHSMClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudHSMClient.CloudHSMClientConfiguration { + config.authSchemeResolver = DefaultCloudHSMAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CloudHSMClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CloudHSMAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudHSMClient.CloudHSMClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCloudHSMV2/CloudHSMV2Client.swift b/Sources/Services/AWSCloudHSMV2/CloudHSMV2Client.swift index d28d3fd17dc..a13a5ae699c 100644 --- a/Sources/Services/AWSCloudHSMV2/CloudHSMV2Client.swift +++ b/Sources/Services/AWSCloudHSMV2/CloudHSMV2Client.swift @@ -117,7 +117,8 @@ extension CloudHSMV2Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CloudHSMV2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CloudHSMV2Client.CloudHSMV2ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CloudHSMV2Client { /// Performs the `CopyBackupToRegion` operation on the `BaldrApiService` service. /// diff --git a/Sources/Services/AWSCloudHSMV2/Plugins.swift b/Sources/Services/AWSCloudHSMV2/Plugins.swift new file mode 100644 index 00000000000..0a14fe1c678 --- /dev/null +++ b/Sources/Services/AWSCloudHSMV2/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CloudHSMV2ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudHSMV2Client.CloudHSMV2ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudHSMV2Client.CloudHSMV2ClientConfiguration { + config.authSchemeResolver = DefaultCloudHSMV2AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CloudHSMV2ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CloudHSMV2AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudHSMV2Client.CloudHSMV2ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCloudSearch/CloudSearchClient.swift b/Sources/Services/AWSCloudSearch/CloudSearchClient.swift index 6e140f2c1e9..513a7ef5581 100644 --- a/Sources/Services/AWSCloudSearch/CloudSearchClient.swift +++ b/Sources/Services/AWSCloudSearch/CloudSearchClient.swift @@ -110,7 +110,8 @@ extension CloudSearchClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -128,21 +129,6 @@ public struct CloudSearchClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CloudSearchClient.CloudSearchClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CloudSearchClient { /// Performs the `BuildSuggesters` operation on the `A9SearchCloudConfigService2013` service. /// diff --git a/Sources/Services/AWSCloudSearch/Plugins.swift b/Sources/Services/AWSCloudSearch/Plugins.swift new file mode 100644 index 00000000000..c418d2a452a --- /dev/null +++ b/Sources/Services/AWSCloudSearch/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CloudSearchClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudSearchClient.CloudSearchClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudSearchClient.CloudSearchClientConfiguration { + config.authSchemeResolver = DefaultCloudSearchAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CloudSearchClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CloudSearchAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudSearchClient.CloudSearchClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCloudSearchDomain/CloudSearchDomainClient.swift b/Sources/Services/AWSCloudSearchDomain/CloudSearchDomainClient.swift index 5e6e076d75b..984d0145b98 100644 --- a/Sources/Services/AWSCloudSearchDomain/CloudSearchDomainClient.swift +++ b/Sources/Services/AWSCloudSearchDomain/CloudSearchDomainClient.swift @@ -117,7 +117,8 @@ extension CloudSearchDomainClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CloudSearchDomainClientLogHandlerFactory: ClientRuntime.SDKLogHand } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CloudSearchDomainClient.CloudSearchDomainClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CloudSearchDomainClient { /// Performs the `Search` operation on the `AmazonCloudSearch2013` service. /// diff --git a/Sources/Services/AWSCloudSearchDomain/Plugins.swift b/Sources/Services/AWSCloudSearchDomain/Plugins.swift new file mode 100644 index 00000000000..c6412f116e0 --- /dev/null +++ b/Sources/Services/AWSCloudSearchDomain/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CloudSearchDomainClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudSearchDomainClient.CloudSearchDomainClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudSearchDomainClient.CloudSearchDomainClientConfiguration { + config.authSchemeResolver = DefaultCloudSearchDomainAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CloudSearchDomainClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CloudSearchDomainAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudSearchDomainClient.CloudSearchDomainClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCloudTrail/CloudTrailClient.swift b/Sources/Services/AWSCloudTrail/CloudTrailClient.swift index c05144c8d08..e7e46912d6e 100644 --- a/Sources/Services/AWSCloudTrail/CloudTrailClient.swift +++ b/Sources/Services/AWSCloudTrail/CloudTrailClient.swift @@ -117,7 +117,8 @@ extension CloudTrailClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CloudTrailClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CloudTrailClient.CloudTrailClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CloudTrailClient { /// Performs the `AddTags` operation on the `CloudTrail_20131101` service. /// diff --git a/Sources/Services/AWSCloudTrail/Plugins.swift b/Sources/Services/AWSCloudTrail/Plugins.swift new file mode 100644 index 00000000000..e7945d42dcd --- /dev/null +++ b/Sources/Services/AWSCloudTrail/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CloudTrailClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudTrailClient.CloudTrailClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudTrailClient.CloudTrailClientConfiguration { + config.authSchemeResolver = DefaultCloudTrailAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CloudTrailClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CloudTrailAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudTrailClient.CloudTrailClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCloudTrailData/CloudTrailDataClient.swift b/Sources/Services/AWSCloudTrailData/CloudTrailDataClient.swift index 4df79a98a26..7838721b838 100644 --- a/Sources/Services/AWSCloudTrailData/CloudTrailDataClient.swift +++ b/Sources/Services/AWSCloudTrailData/CloudTrailDataClient.swift @@ -117,7 +117,8 @@ extension CloudTrailDataClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CloudTrailDataClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CloudTrailDataClient.CloudTrailDataClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CloudTrailDataClient { /// Performs the `PutAuditEvents` operation on the `CloudTrailDataService` service. /// diff --git a/Sources/Services/AWSCloudTrailData/Plugins.swift b/Sources/Services/AWSCloudTrailData/Plugins.swift new file mode 100644 index 00000000000..2e7b021d9fb --- /dev/null +++ b/Sources/Services/AWSCloudTrailData/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CloudTrailDataClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudTrailDataClient.CloudTrailDataClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudTrailDataClient.CloudTrailDataClientConfiguration { + config.authSchemeResolver = DefaultCloudTrailDataAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CloudTrailDataClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CloudTrailDataAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudTrailDataClient.CloudTrailDataClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCloudWatch/CloudWatchClient.swift b/Sources/Services/AWSCloudWatch/CloudWatchClient.swift index 734a4d23da3..165cf69e6a2 100644 --- a/Sources/Services/AWSCloudWatch/CloudWatchClient.swift +++ b/Sources/Services/AWSCloudWatch/CloudWatchClient.swift @@ -110,7 +110,8 @@ extension CloudWatchClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -128,21 +129,6 @@ public struct CloudWatchClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CloudWatchClient.CloudWatchClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CloudWatchClient { /// Performs the `DeleteAlarms` operation on the `GraniteServiceVersion20100801` service. /// diff --git a/Sources/Services/AWSCloudWatch/Plugins.swift b/Sources/Services/AWSCloudWatch/Plugins.swift new file mode 100644 index 00000000000..0c52e56a3e4 --- /dev/null +++ b/Sources/Services/AWSCloudWatch/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CloudWatchClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudWatchClient.CloudWatchClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudWatchClient.CloudWatchClientConfiguration { + config.authSchemeResolver = DefaultCloudWatchAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CloudWatchClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CloudWatchAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudWatchClient.CloudWatchClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCloudWatchEvents/CloudWatchEventsClient.swift b/Sources/Services/AWSCloudWatchEvents/CloudWatchEventsClient.swift index 114e1f5b6a1..5aaf6fa1e46 100644 --- a/Sources/Services/AWSCloudWatchEvents/CloudWatchEventsClient.swift +++ b/Sources/Services/AWSCloudWatchEvents/CloudWatchEventsClient.swift @@ -117,7 +117,8 @@ extension CloudWatchEventsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CloudWatchEventsClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CloudWatchEventsClient.CloudWatchEventsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CloudWatchEventsClient { /// Performs the `ActivateEventSource` operation on the `AWSEvents` service. /// diff --git a/Sources/Services/AWSCloudWatchEvents/Plugins.swift b/Sources/Services/AWSCloudWatchEvents/Plugins.swift new file mode 100644 index 00000000000..3a33b3af53e --- /dev/null +++ b/Sources/Services/AWSCloudWatchEvents/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CloudWatchEventsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudWatchEventsClient.CloudWatchEventsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudWatchEventsClient.CloudWatchEventsClientConfiguration { + config.authSchemeResolver = DefaultCloudWatchEventsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CloudWatchEventsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CloudWatchEventsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudWatchEventsClient.CloudWatchEventsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCloudWatchLogs/CloudWatchLogsClient.swift b/Sources/Services/AWSCloudWatchLogs/CloudWatchLogsClient.swift index 19610771fcb..12f595e6c52 100644 --- a/Sources/Services/AWSCloudWatchLogs/CloudWatchLogsClient.swift +++ b/Sources/Services/AWSCloudWatchLogs/CloudWatchLogsClient.swift @@ -117,7 +117,8 @@ extension CloudWatchLogsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CloudWatchLogsClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CloudWatchLogsClient.CloudWatchLogsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CloudWatchLogsClient { /// Performs the `AssociateKmsKey` operation on the `Logs_20140328` service. /// diff --git a/Sources/Services/AWSCloudWatchLogs/Plugins.swift b/Sources/Services/AWSCloudWatchLogs/Plugins.swift new file mode 100644 index 00000000000..a7abba7e89c --- /dev/null +++ b/Sources/Services/AWSCloudWatchLogs/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CloudWatchLogsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudWatchLogsClient.CloudWatchLogsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudWatchLogsClient.CloudWatchLogsClientConfiguration { + config.authSchemeResolver = DefaultCloudWatchLogsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CloudWatchLogsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CloudWatchLogsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CloudWatchLogsClient.CloudWatchLogsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCodeBuild/CodeBuildClient.swift b/Sources/Services/AWSCodeBuild/CodeBuildClient.swift index 2e9798107dd..480ce9627c8 100644 --- a/Sources/Services/AWSCodeBuild/CodeBuildClient.swift +++ b/Sources/Services/AWSCodeBuild/CodeBuildClient.swift @@ -117,7 +117,8 @@ extension CodeBuildClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CodeBuildClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CodeBuildClient.CodeBuildClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CodeBuildClient { /// Performs the `BatchDeleteBuilds` operation on the `CodeBuild_20161006` service. /// diff --git a/Sources/Services/AWSCodeBuild/Plugins.swift b/Sources/Services/AWSCodeBuild/Plugins.swift new file mode 100644 index 00000000000..25a1c65c1e6 --- /dev/null +++ b/Sources/Services/AWSCodeBuild/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CodeBuildClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeBuildClient.CodeBuildClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeBuildClient.CodeBuildClientConfiguration { + config.authSchemeResolver = DefaultCodeBuildAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CodeBuildClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CodeBuildAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeBuildClient.CodeBuildClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCodeCatalyst/CodeCatalystClient.swift b/Sources/Services/AWSCodeCatalyst/CodeCatalystClient.swift index 68945debb04..da958700aaf 100644 --- a/Sources/Services/AWSCodeCatalyst/CodeCatalystClient.swift +++ b/Sources/Services/AWSCodeCatalyst/CodeCatalystClient.swift @@ -117,7 +117,8 @@ extension CodeCatalystClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CodeCatalystClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CodeCatalystClient.CodeCatalystClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CodeCatalystClient { /// Performs the `CreateAccessToken` operation on the `CodeCatalyst` service. /// diff --git a/Sources/Services/AWSCodeCatalyst/Plugins.swift b/Sources/Services/AWSCodeCatalyst/Plugins.swift new file mode 100644 index 00000000000..057a5d8b2e2 --- /dev/null +++ b/Sources/Services/AWSCodeCatalyst/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CodeCatalystClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeCatalystClient.CodeCatalystClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeCatalystClient.CodeCatalystClientConfiguration { + config.authSchemeResolver = DefaultCodeCatalystAuthSchemeResolver() + config.authSchemes = [] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CodeCatalystClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CodeCatalystAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeCatalystClient.CodeCatalystClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCodeCommit/CodeCommitClient.swift b/Sources/Services/AWSCodeCommit/CodeCommitClient.swift index 289293f6647..61ded456ce6 100644 --- a/Sources/Services/AWSCodeCommit/CodeCommitClient.swift +++ b/Sources/Services/AWSCodeCommit/CodeCommitClient.swift @@ -117,7 +117,8 @@ extension CodeCommitClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CodeCommitClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CodeCommitClient.CodeCommitClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CodeCommitClient { /// Performs the `AssociateApprovalRuleTemplateWithRepository` operation on the `CodeCommit_20150413` service. /// diff --git a/Sources/Services/AWSCodeCommit/Plugins.swift b/Sources/Services/AWSCodeCommit/Plugins.swift new file mode 100644 index 00000000000..1e649d1b2e6 --- /dev/null +++ b/Sources/Services/AWSCodeCommit/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CodeCommitClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeCommitClient.CodeCommitClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeCommitClient.CodeCommitClientConfiguration { + config.authSchemeResolver = DefaultCodeCommitAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CodeCommitClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CodeCommitAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeCommitClient.CodeCommitClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCodeDeploy/CodeDeployClient.swift b/Sources/Services/AWSCodeDeploy/CodeDeployClient.swift index 15031df4125..b68840e0c3a 100644 --- a/Sources/Services/AWSCodeDeploy/CodeDeployClient.swift +++ b/Sources/Services/AWSCodeDeploy/CodeDeployClient.swift @@ -117,7 +117,8 @@ extension CodeDeployClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CodeDeployClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CodeDeployClient.CodeDeployClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CodeDeployClient { /// Performs the `AddTagsToOnPremisesInstances` operation on the `CodeDeploy_20141006` service. /// diff --git a/Sources/Services/AWSCodeDeploy/Plugins.swift b/Sources/Services/AWSCodeDeploy/Plugins.swift new file mode 100644 index 00000000000..314b860c2b4 --- /dev/null +++ b/Sources/Services/AWSCodeDeploy/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CodeDeployClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeDeployClient.CodeDeployClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeDeployClient.CodeDeployClientConfiguration { + config.authSchemeResolver = DefaultCodeDeployAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CodeDeployClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CodeDeployAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeDeployClient.CodeDeployClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCodeGuruProfiler/CodeGuruProfilerClient.swift b/Sources/Services/AWSCodeGuruProfiler/CodeGuruProfilerClient.swift index c774741c010..f4b1666ebbe 100644 --- a/Sources/Services/AWSCodeGuruProfiler/CodeGuruProfilerClient.swift +++ b/Sources/Services/AWSCodeGuruProfiler/CodeGuruProfilerClient.swift @@ -117,7 +117,8 @@ extension CodeGuruProfilerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CodeGuruProfilerClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CodeGuruProfilerClient.CodeGuruProfilerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CodeGuruProfilerClient { /// Performs the `AddNotificationChannels` operation on the `CodeGuruProfiler` service. /// diff --git a/Sources/Services/AWSCodeGuruProfiler/Plugins.swift b/Sources/Services/AWSCodeGuruProfiler/Plugins.swift new file mode 100644 index 00000000000..eafd7b1d357 --- /dev/null +++ b/Sources/Services/AWSCodeGuruProfiler/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CodeGuruProfilerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeGuruProfilerClient.CodeGuruProfilerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeGuruProfilerClient.CodeGuruProfilerClientConfiguration { + config.authSchemeResolver = DefaultCodeGuruProfilerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CodeGuruProfilerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CodeGuruProfilerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeGuruProfilerClient.CodeGuruProfilerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCodeGuruReviewer/CodeGuruReviewerClient.swift b/Sources/Services/AWSCodeGuruReviewer/CodeGuruReviewerClient.swift index 84b1f431a6a..4e9fd01a905 100644 --- a/Sources/Services/AWSCodeGuruReviewer/CodeGuruReviewerClient.swift +++ b/Sources/Services/AWSCodeGuruReviewer/CodeGuruReviewerClient.swift @@ -117,7 +117,8 @@ extension CodeGuruReviewerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CodeGuruReviewerClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CodeGuruReviewerClient.CodeGuruReviewerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CodeGuruReviewerClient { /// Performs the `AssociateRepository` operation on the `AWSGuruFrontendService` service. /// diff --git a/Sources/Services/AWSCodeGuruReviewer/Plugins.swift b/Sources/Services/AWSCodeGuruReviewer/Plugins.swift new file mode 100644 index 00000000000..7b963e7f017 --- /dev/null +++ b/Sources/Services/AWSCodeGuruReviewer/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CodeGuruReviewerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeGuruReviewerClient.CodeGuruReviewerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeGuruReviewerClient.CodeGuruReviewerClientConfiguration { + config.authSchemeResolver = DefaultCodeGuruReviewerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CodeGuruReviewerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CodeGuruReviewerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeGuruReviewerClient.CodeGuruReviewerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCodeGuruSecurity/CodeGuruSecurityClient.swift b/Sources/Services/AWSCodeGuruSecurity/CodeGuruSecurityClient.swift index a547a24b464..512c5cbe15e 100644 --- a/Sources/Services/AWSCodeGuruSecurity/CodeGuruSecurityClient.swift +++ b/Sources/Services/AWSCodeGuruSecurity/CodeGuruSecurityClient.swift @@ -117,7 +117,8 @@ extension CodeGuruSecurityClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CodeGuruSecurityClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CodeGuruSecurityClient.CodeGuruSecurityClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CodeGuruSecurityClient { /// Performs the `BatchGetFindings` operation on the `AwsCodeGuruSecurity` service. /// diff --git a/Sources/Services/AWSCodeGuruSecurity/Plugins.swift b/Sources/Services/AWSCodeGuruSecurity/Plugins.swift new file mode 100644 index 00000000000..94550822835 --- /dev/null +++ b/Sources/Services/AWSCodeGuruSecurity/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CodeGuruSecurityClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeGuruSecurityClient.CodeGuruSecurityClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeGuruSecurityClient.CodeGuruSecurityClientConfiguration { + config.authSchemeResolver = DefaultCodeGuruSecurityAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CodeGuruSecurityClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CodeGuruSecurityAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeGuruSecurityClient.CodeGuruSecurityClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCodePipeline/CodePipelineClient.swift b/Sources/Services/AWSCodePipeline/CodePipelineClient.swift index aa034931d91..2a9a2671795 100644 --- a/Sources/Services/AWSCodePipeline/CodePipelineClient.swift +++ b/Sources/Services/AWSCodePipeline/CodePipelineClient.swift @@ -117,7 +117,8 @@ extension CodePipelineClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CodePipelineClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CodePipelineClient.CodePipelineClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CodePipelineClient { /// Performs the `AcknowledgeJob` operation on the `CodePipeline_20150709` service. /// diff --git a/Sources/Services/AWSCodePipeline/Plugins.swift b/Sources/Services/AWSCodePipeline/Plugins.swift new file mode 100644 index 00000000000..5b0ef37d224 --- /dev/null +++ b/Sources/Services/AWSCodePipeline/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CodePipelineClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodePipelineClient.CodePipelineClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodePipelineClient.CodePipelineClientConfiguration { + config.authSchemeResolver = DefaultCodePipelineAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CodePipelineClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CodePipelineAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodePipelineClient.CodePipelineClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCodeStar/CodeStarClient.swift b/Sources/Services/AWSCodeStar/CodeStarClient.swift index 82180900069..177b8fbb90d 100644 --- a/Sources/Services/AWSCodeStar/CodeStarClient.swift +++ b/Sources/Services/AWSCodeStar/CodeStarClient.swift @@ -117,7 +117,8 @@ extension CodeStarClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CodeStarClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CodeStarClient.CodeStarClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CodeStarClient { /// Performs the `AssociateTeamMember` operation on the `CodeStar_20170419` service. /// diff --git a/Sources/Services/AWSCodeStar/Plugins.swift b/Sources/Services/AWSCodeStar/Plugins.swift new file mode 100644 index 00000000000..59edd702930 --- /dev/null +++ b/Sources/Services/AWSCodeStar/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CodeStarClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeStarClient.CodeStarClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeStarClient.CodeStarClientConfiguration { + config.authSchemeResolver = DefaultCodeStarAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CodeStarClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CodeStarAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeStarClient.CodeStarClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCodeStarconnections/CodeStarconnectionsClient.swift b/Sources/Services/AWSCodeStarconnections/CodeStarconnectionsClient.swift index 16f06041941..85b02baab36 100644 --- a/Sources/Services/AWSCodeStarconnections/CodeStarconnectionsClient.swift +++ b/Sources/Services/AWSCodeStarconnections/CodeStarconnectionsClient.swift @@ -117,7 +117,8 @@ extension CodeStarconnectionsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CodeStarconnectionsClientLogHandlerFactory: ClientRuntime.SDKLogHa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CodeStarconnectionsClient.CodeStarconnectionsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CodeStarconnectionsClient { /// Performs the `CreateConnection` operation on the `CodeStar_connections_20191201` service. /// diff --git a/Sources/Services/AWSCodeStarconnections/Plugins.swift b/Sources/Services/AWSCodeStarconnections/Plugins.swift new file mode 100644 index 00000000000..d0668a61389 --- /dev/null +++ b/Sources/Services/AWSCodeStarconnections/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CodeStarconnectionsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeStarconnectionsClient.CodeStarconnectionsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeStarconnectionsClient.CodeStarconnectionsClientConfiguration { + config.authSchemeResolver = DefaultCodeStarconnectionsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CodeStarconnectionsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CodeStarconnectionsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeStarconnectionsClient.CodeStarconnectionsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCodeartifact/CodeartifactClient.swift b/Sources/Services/AWSCodeartifact/CodeartifactClient.swift index 75aeebb86e4..d6263ef1bf9 100644 --- a/Sources/Services/AWSCodeartifact/CodeartifactClient.swift +++ b/Sources/Services/AWSCodeartifact/CodeartifactClient.swift @@ -117,7 +117,8 @@ extension CodeartifactClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CodeartifactClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CodeartifactClient.CodeartifactClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CodeartifactClient { /// Performs the `AssociateExternalConnection` operation on the `CodeArtifactControlPlaneService` service. /// diff --git a/Sources/Services/AWSCodeartifact/Plugins.swift b/Sources/Services/AWSCodeartifact/Plugins.swift new file mode 100644 index 00000000000..b645de3dabd --- /dev/null +++ b/Sources/Services/AWSCodeartifact/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CodeartifactClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeartifactClient.CodeartifactClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeartifactClient.CodeartifactClientConfiguration { + config.authSchemeResolver = DefaultCodeartifactAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CodeartifactClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CodeartifactAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodeartifactClient.CodeartifactClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCodestarnotifications/CodestarnotificationsClient.swift b/Sources/Services/AWSCodestarnotifications/CodestarnotificationsClient.swift index b8f0403b67f..1cb504ec575 100644 --- a/Sources/Services/AWSCodestarnotifications/CodestarnotificationsClient.swift +++ b/Sources/Services/AWSCodestarnotifications/CodestarnotificationsClient.swift @@ -117,7 +117,8 @@ extension CodestarnotificationsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CodestarnotificationsClientLogHandlerFactory: ClientRuntime.SDKLog } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CodestarnotificationsClient.CodestarnotificationsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CodestarnotificationsClient { /// Performs the `CreateNotificationRule` operation on the `CodeStarNotifications_20191015` service. /// diff --git a/Sources/Services/AWSCodestarnotifications/Plugins.swift b/Sources/Services/AWSCodestarnotifications/Plugins.swift new file mode 100644 index 00000000000..85891d14c75 --- /dev/null +++ b/Sources/Services/AWSCodestarnotifications/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CodestarnotificationsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodestarnotificationsClient.CodestarnotificationsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodestarnotificationsClient.CodestarnotificationsClientConfiguration { + config.authSchemeResolver = DefaultCodestarnotificationsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CodestarnotificationsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CodestarnotificationsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CodestarnotificationsClient.CodestarnotificationsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCognitoIdentity/CognitoIdentityClient.swift b/Sources/Services/AWSCognitoIdentity/CognitoIdentityClient.swift index 4d58935f0b6..47fdd8c8865 100644 --- a/Sources/Services/AWSCognitoIdentity/CognitoIdentityClient.swift +++ b/Sources/Services/AWSCognitoIdentity/CognitoIdentityClient.swift @@ -117,7 +117,8 @@ extension CognitoIdentityClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CognitoIdentityClientLogHandlerFactory: ClientRuntime.SDKLogHandle } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CognitoIdentityClient.CognitoIdentityClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CognitoIdentityClient { /// Performs the `CreateIdentityPool` operation on the `AWSCognitoIdentityService` service. /// diff --git a/Sources/Services/AWSCognitoIdentity/Plugins.swift b/Sources/Services/AWSCognitoIdentity/Plugins.swift new file mode 100644 index 00000000000..5ec17153788 --- /dev/null +++ b/Sources/Services/AWSCognitoIdentity/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CognitoIdentityClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CognitoIdentityClient.CognitoIdentityClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CognitoIdentityClient.CognitoIdentityClientConfiguration { + config.authSchemeResolver = DefaultCognitoIdentityAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CognitoIdentityClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CognitoIdentityAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CognitoIdentityClient.CognitoIdentityClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCognitoIdentityProvider/CognitoIdentityProviderClient.swift b/Sources/Services/AWSCognitoIdentityProvider/CognitoIdentityProviderClient.swift index 0b6f360967e..8445db35aa2 100644 --- a/Sources/Services/AWSCognitoIdentityProvider/CognitoIdentityProviderClient.swift +++ b/Sources/Services/AWSCognitoIdentityProvider/CognitoIdentityProviderClient.swift @@ -117,7 +117,8 @@ extension CognitoIdentityProviderClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CognitoIdentityProviderClientLogHandlerFactory: ClientRuntime.SDKL } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CognitoIdentityProviderClient.CognitoIdentityProviderClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CognitoIdentityProviderClient { /// Performs the `AddCustomAttributes` operation on the `AWSCognitoIdentityProviderService` service. /// diff --git a/Sources/Services/AWSCognitoIdentityProvider/Plugins.swift b/Sources/Services/AWSCognitoIdentityProvider/Plugins.swift new file mode 100644 index 00000000000..979b7a3627c --- /dev/null +++ b/Sources/Services/AWSCognitoIdentityProvider/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CognitoIdentityProviderClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CognitoIdentityProviderClient.CognitoIdentityProviderClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CognitoIdentityProviderClient.CognitoIdentityProviderClientConfiguration { + config.authSchemeResolver = DefaultCognitoIdentityProviderAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CognitoIdentityProviderClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CognitoIdentityProviderAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CognitoIdentityProviderClient.CognitoIdentityProviderClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCognitoSync/CognitoSyncClient.swift b/Sources/Services/AWSCognitoSync/CognitoSyncClient.swift index db68502111b..401dc205c77 100644 --- a/Sources/Services/AWSCognitoSync/CognitoSyncClient.swift +++ b/Sources/Services/AWSCognitoSync/CognitoSyncClient.swift @@ -117,7 +117,8 @@ extension CognitoSyncClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CognitoSyncClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CognitoSyncClient.CognitoSyncClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CognitoSyncClient { /// Performs the `BulkPublish` operation on the `AWSCognitoSyncService` service. /// diff --git a/Sources/Services/AWSCognitoSync/Plugins.swift b/Sources/Services/AWSCognitoSync/Plugins.swift new file mode 100644 index 00000000000..5816ee08e29 --- /dev/null +++ b/Sources/Services/AWSCognitoSync/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CognitoSyncClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CognitoSyncClient.CognitoSyncClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CognitoSyncClient.CognitoSyncClientConfiguration { + config.authSchemeResolver = DefaultCognitoSyncAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CognitoSyncClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CognitoSyncAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CognitoSyncClient.CognitoSyncClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSComprehend/ComprehendClient.swift b/Sources/Services/AWSComprehend/ComprehendClient.swift index 3343993f8e5..493c9a3db39 100644 --- a/Sources/Services/AWSComprehend/ComprehendClient.swift +++ b/Sources/Services/AWSComprehend/ComprehendClient.swift @@ -117,7 +117,8 @@ extension ComprehendClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ComprehendClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ComprehendClient.ComprehendClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ComprehendClient { /// Performs the `BatchDetectDominantLanguage` operation on the `Comprehend_20171127` service. /// diff --git a/Sources/Services/AWSComprehend/Plugins.swift b/Sources/Services/AWSComprehend/Plugins.swift new file mode 100644 index 00000000000..957ff525321 --- /dev/null +++ b/Sources/Services/AWSComprehend/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ComprehendClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ComprehendClient.ComprehendClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ComprehendClient.ComprehendClientConfiguration { + config.authSchemeResolver = DefaultComprehendAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ComprehendClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ComprehendAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ComprehendClient.ComprehendClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSComprehendMedical/ComprehendMedicalClient.swift b/Sources/Services/AWSComprehendMedical/ComprehendMedicalClient.swift index 2f488969a96..8fa2f6ad9e6 100644 --- a/Sources/Services/AWSComprehendMedical/ComprehendMedicalClient.swift +++ b/Sources/Services/AWSComprehendMedical/ComprehendMedicalClient.swift @@ -117,7 +117,8 @@ extension ComprehendMedicalClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ComprehendMedicalClientLogHandlerFactory: ClientRuntime.SDKLogHand } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ComprehendMedicalClient.ComprehendMedicalClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ComprehendMedicalClient { /// Performs the `DescribeEntitiesDetectionV2Job` operation on the `ComprehendMedical_20181030` service. /// diff --git a/Sources/Services/AWSComprehendMedical/Plugins.swift b/Sources/Services/AWSComprehendMedical/Plugins.swift new file mode 100644 index 00000000000..8f72eac833b --- /dev/null +++ b/Sources/Services/AWSComprehendMedical/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ComprehendMedicalClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ComprehendMedicalClient.ComprehendMedicalClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ComprehendMedicalClient.ComprehendMedicalClientConfiguration { + config.authSchemeResolver = DefaultComprehendMedicalAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ComprehendMedicalClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ComprehendMedicalAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ComprehendMedicalClient.ComprehendMedicalClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSComputeOptimizer/ComputeOptimizerClient.swift b/Sources/Services/AWSComputeOptimizer/ComputeOptimizerClient.swift index f4998ab7f77..9d882b285b0 100644 --- a/Sources/Services/AWSComputeOptimizer/ComputeOptimizerClient.swift +++ b/Sources/Services/AWSComputeOptimizer/ComputeOptimizerClient.swift @@ -117,7 +117,8 @@ extension ComputeOptimizerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ComputeOptimizerClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ComputeOptimizerClient.ComputeOptimizerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ComputeOptimizerClient { /// Performs the `DeleteRecommendationPreferences` operation on the `ComputeOptimizerService` service. /// diff --git a/Sources/Services/AWSComputeOptimizer/Plugins.swift b/Sources/Services/AWSComputeOptimizer/Plugins.swift new file mode 100644 index 00000000000..d99f207c34e --- /dev/null +++ b/Sources/Services/AWSComputeOptimizer/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ComputeOptimizerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ComputeOptimizerClient.ComputeOptimizerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ComputeOptimizerClient.ComputeOptimizerClientConfiguration { + config.authSchemeResolver = DefaultComputeOptimizerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ComputeOptimizerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ComputeOptimizerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ComputeOptimizerClient.ComputeOptimizerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSConfigService/ConfigClient.swift b/Sources/Services/AWSConfigService/ConfigClient.swift index bf21de59954..2befe22e658 100644 --- a/Sources/Services/AWSConfigService/ConfigClient.swift +++ b/Sources/Services/AWSConfigService/ConfigClient.swift @@ -117,7 +117,8 @@ extension ConfigClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ConfigClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ConfigClient.ConfigClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ConfigClient { /// Performs the `BatchGetAggregateResourceConfig` operation on the `StarlingDoveService` service. /// diff --git a/Sources/Services/AWSConfigService/Plugins.swift b/Sources/Services/AWSConfigService/Plugins.swift new file mode 100644 index 00000000000..39e6804d9fb --- /dev/null +++ b/Sources/Services/AWSConfigService/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ConfigClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConfigClient.ConfigClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConfigClient.ConfigClientConfiguration { + config.authSchemeResolver = DefaultConfigServiceAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ConfigClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ConfigServiceAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConfigClient.ConfigClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSConnect/ConnectClient.swift b/Sources/Services/AWSConnect/ConnectClient.swift index bb34cc9d24b..c3c13ffaad4 100644 --- a/Sources/Services/AWSConnect/ConnectClient.swift +++ b/Sources/Services/AWSConnect/ConnectClient.swift @@ -117,7 +117,8 @@ extension ConnectClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ConnectClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ConnectClient.ConnectClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ConnectClient { /// Performs the `ActivateEvaluationForm` operation on the `AmazonConnectService` service. /// diff --git a/Sources/Services/AWSConnect/Plugins.swift b/Sources/Services/AWSConnect/Plugins.swift new file mode 100644 index 00000000000..8a9bfd0246c --- /dev/null +++ b/Sources/Services/AWSConnect/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ConnectClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConnectClient.ConnectClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConnectClient.ConnectClientConfiguration { + config.authSchemeResolver = DefaultConnectAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ConnectClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ConnectAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConnectClient.ConnectClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSConnectCampaigns/ConnectCampaignsClient.swift b/Sources/Services/AWSConnectCampaigns/ConnectCampaignsClient.swift index f3f99ca3771..c2f5ef70916 100644 --- a/Sources/Services/AWSConnectCampaigns/ConnectCampaignsClient.swift +++ b/Sources/Services/AWSConnectCampaigns/ConnectCampaignsClient.swift @@ -117,7 +117,8 @@ extension ConnectCampaignsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ConnectCampaignsClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ConnectCampaignsClient.ConnectCampaignsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ConnectCampaignsClient { /// Performs the `CreateCampaign` operation on the `AmazonConnectCampaignService` service. /// diff --git a/Sources/Services/AWSConnectCampaigns/Plugins.swift b/Sources/Services/AWSConnectCampaigns/Plugins.swift new file mode 100644 index 00000000000..293e69c5005 --- /dev/null +++ b/Sources/Services/AWSConnectCampaigns/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ConnectCampaignsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConnectCampaignsClient.ConnectCampaignsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConnectCampaignsClient.ConnectCampaignsClientConfiguration { + config.authSchemeResolver = DefaultConnectCampaignsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ConnectCampaignsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ConnectCampaignsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConnectCampaignsClient.ConnectCampaignsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSConnectCases/ConnectCasesClient.swift b/Sources/Services/AWSConnectCases/ConnectCasesClient.swift index 1488b9aa101..f2a08cef121 100644 --- a/Sources/Services/AWSConnectCases/ConnectCasesClient.swift +++ b/Sources/Services/AWSConnectCases/ConnectCasesClient.swift @@ -117,7 +117,8 @@ extension ConnectCasesClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ConnectCasesClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ConnectCasesClient.ConnectCasesClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ConnectCasesClient { /// Performs the `BatchGetField` operation on the `AmazonConnectCases` service. /// diff --git a/Sources/Services/AWSConnectCases/Plugins.swift b/Sources/Services/AWSConnectCases/Plugins.swift new file mode 100644 index 00000000000..d759f6d4d42 --- /dev/null +++ b/Sources/Services/AWSConnectCases/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ConnectCasesClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConnectCasesClient.ConnectCasesClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConnectCasesClient.ConnectCasesClientConfiguration { + config.authSchemeResolver = DefaultConnectCasesAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ConnectCasesClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ConnectCasesAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConnectCasesClient.ConnectCasesClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSConnectContactLens/ConnectContactLensClient.swift b/Sources/Services/AWSConnectContactLens/ConnectContactLensClient.swift index d446064d44e..7944b1fe927 100644 --- a/Sources/Services/AWSConnectContactLens/ConnectContactLensClient.swift +++ b/Sources/Services/AWSConnectContactLens/ConnectContactLensClient.swift @@ -117,7 +117,8 @@ extension ConnectContactLensClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ConnectContactLensClientLogHandlerFactory: ClientRuntime.SDKLogHan } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ConnectContactLensClient.ConnectContactLensClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ConnectContactLensClient { /// Performs the `ListRealtimeContactAnalysisSegments` operation on the `AmazonConnectContactLens` service. /// diff --git a/Sources/Services/AWSConnectContactLens/Plugins.swift b/Sources/Services/AWSConnectContactLens/Plugins.swift new file mode 100644 index 00000000000..6b37d4501f5 --- /dev/null +++ b/Sources/Services/AWSConnectContactLens/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ConnectContactLensClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConnectContactLensClient.ConnectContactLensClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConnectContactLensClient.ConnectContactLensClientConfiguration { + config.authSchemeResolver = DefaultConnectContactLensAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ConnectContactLensClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ConnectContactLensAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConnectContactLensClient.ConnectContactLensClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSConnectParticipant/ConnectParticipantClient.swift b/Sources/Services/AWSConnectParticipant/ConnectParticipantClient.swift index 6b085d8d7ac..498ddc86afe 100644 --- a/Sources/Services/AWSConnectParticipant/ConnectParticipantClient.swift +++ b/Sources/Services/AWSConnectParticipant/ConnectParticipantClient.swift @@ -117,7 +117,8 @@ extension ConnectParticipantClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ConnectParticipantClientLogHandlerFactory: ClientRuntime.SDKLogHan } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ConnectParticipantClient.ConnectParticipantClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ConnectParticipantClient { /// Performs the `CompleteAttachmentUpload` operation on the `AmazonConnectParticipantServiceLambda` service. /// diff --git a/Sources/Services/AWSConnectParticipant/Plugins.swift b/Sources/Services/AWSConnectParticipant/Plugins.swift new file mode 100644 index 00000000000..48e0fa42caf --- /dev/null +++ b/Sources/Services/AWSConnectParticipant/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ConnectParticipantClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConnectParticipantClient.ConnectParticipantClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConnectParticipantClient.ConnectParticipantClientConfiguration { + config.authSchemeResolver = DefaultConnectParticipantAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ConnectParticipantClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ConnectParticipantAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ConnectParticipantClient.ConnectParticipantClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSControlTower/ControlTowerClient.swift b/Sources/Services/AWSControlTower/ControlTowerClient.swift index 6e4febbd4a9..1cde8206319 100644 --- a/Sources/Services/AWSControlTower/ControlTowerClient.swift +++ b/Sources/Services/AWSControlTower/ControlTowerClient.swift @@ -117,7 +117,8 @@ extension ControlTowerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ControlTowerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ControlTowerClient.ControlTowerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ControlTowerClient { /// Performs the `CreateLandingZone` operation on the `AWSControlTowerApis` service. /// diff --git a/Sources/Services/AWSControlTower/Plugins.swift b/Sources/Services/AWSControlTower/Plugins.swift new file mode 100644 index 00000000000..d8059802c80 --- /dev/null +++ b/Sources/Services/AWSControlTower/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ControlTowerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ControlTowerClient.ControlTowerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ControlTowerClient.ControlTowerClientConfiguration { + config.authSchemeResolver = DefaultControlTowerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ControlTowerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ControlTowerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ControlTowerClient.ControlTowerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCostExplorer/CostExplorerClient.swift b/Sources/Services/AWSCostExplorer/CostExplorerClient.swift index 0dc396d1f56..8d923c4b4ed 100644 --- a/Sources/Services/AWSCostExplorer/CostExplorerClient.swift +++ b/Sources/Services/AWSCostExplorer/CostExplorerClient.swift @@ -117,7 +117,8 @@ extension CostExplorerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CostExplorerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CostExplorerClient.CostExplorerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CostExplorerClient { /// Performs the `CreateAnomalyMonitor` operation on the `AWSInsightsIndexService` service. /// diff --git a/Sources/Services/AWSCostExplorer/Plugins.swift b/Sources/Services/AWSCostExplorer/Plugins.swift new file mode 100644 index 00000000000..67095aaae66 --- /dev/null +++ b/Sources/Services/AWSCostExplorer/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CostExplorerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CostExplorerClient.CostExplorerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CostExplorerClient.CostExplorerClientConfiguration { + config.authSchemeResolver = DefaultCostExplorerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CostExplorerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CostExplorerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CostExplorerClient.CostExplorerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCostOptimizationHub/CostOptimizationHubClient.swift b/Sources/Services/AWSCostOptimizationHub/CostOptimizationHubClient.swift index 2d21d3e5433..daf03fe2ad7 100644 --- a/Sources/Services/AWSCostOptimizationHub/CostOptimizationHubClient.swift +++ b/Sources/Services/AWSCostOptimizationHub/CostOptimizationHubClient.swift @@ -117,7 +117,8 @@ extension CostOptimizationHubClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CostOptimizationHubClientLogHandlerFactory: ClientRuntime.SDKLogHa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CostOptimizationHubClient.CostOptimizationHubClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CostOptimizationHubClient { /// Performs the `GetPreferences` operation on the `CostOptimizationHubService` service. /// diff --git a/Sources/Services/AWSCostOptimizationHub/Plugins.swift b/Sources/Services/AWSCostOptimizationHub/Plugins.swift new file mode 100644 index 00000000000..5c3f4426738 --- /dev/null +++ b/Sources/Services/AWSCostOptimizationHub/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CostOptimizationHubClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CostOptimizationHubClient.CostOptimizationHubClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CostOptimizationHubClient.CostOptimizationHubClientConfiguration { + config.authSchemeResolver = DefaultCostOptimizationHubAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CostOptimizationHubClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CostOptimizationHubAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CostOptimizationHubClient.CostOptimizationHubClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCostandUsageReportService/CostandUsageReportClient.swift b/Sources/Services/AWSCostandUsageReportService/CostandUsageReportClient.swift index f957763a594..249230244b2 100644 --- a/Sources/Services/AWSCostandUsageReportService/CostandUsageReportClient.swift +++ b/Sources/Services/AWSCostandUsageReportService/CostandUsageReportClient.swift @@ -117,7 +117,8 @@ extension CostandUsageReportClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CostandUsageReportClientLogHandlerFactory: ClientRuntime.SDKLogHan } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CostandUsageReportClient.CostandUsageReportClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CostandUsageReportClient { /// Performs the `DeleteReportDefinition` operation on the `AWSOrigamiServiceGatewayService` service. /// diff --git a/Sources/Services/AWSCostandUsageReportService/Plugins.swift b/Sources/Services/AWSCostandUsageReportService/Plugins.swift new file mode 100644 index 00000000000..fd8602e61dc --- /dev/null +++ b/Sources/Services/AWSCostandUsageReportService/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CostandUsageReportClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CostandUsageReportClient.CostandUsageReportClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CostandUsageReportClient.CostandUsageReportClientConfiguration { + config.authSchemeResolver = DefaultCostandUsageReportServiceAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CostandUsageReportClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CostandUsageReportServiceAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CostandUsageReportClient.CostandUsageReportClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSCustomerProfiles/CustomerProfilesClient.swift b/Sources/Services/AWSCustomerProfiles/CustomerProfilesClient.swift index 5b5c466a9be..d047c82b2d6 100644 --- a/Sources/Services/AWSCustomerProfiles/CustomerProfilesClient.swift +++ b/Sources/Services/AWSCustomerProfiles/CustomerProfilesClient.swift @@ -117,7 +117,8 @@ extension CustomerProfilesClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct CustomerProfilesClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? CustomerProfilesClient.CustomerProfilesClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension CustomerProfilesClient { /// Performs the `AddProfileKey` operation on the `CustomerProfiles_20200815` service. /// diff --git a/Sources/Services/AWSCustomerProfiles/Plugins.swift b/Sources/Services/AWSCustomerProfiles/Plugins.swift new file mode 100644 index 00000000000..a6494fd1348 --- /dev/null +++ b/Sources/Services/AWSCustomerProfiles/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class CustomerProfilesClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CustomerProfilesClient.CustomerProfilesClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CustomerProfilesClient.CustomerProfilesClientConfiguration { + config.authSchemeResolver = DefaultCustomerProfilesAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class CustomerProfilesClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: CustomerProfilesAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? CustomerProfilesClient.CustomerProfilesClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDAX/DAXClient.swift b/Sources/Services/AWSDAX/DAXClient.swift index 17c2f2b30c5..8ead760f691 100644 --- a/Sources/Services/AWSDAX/DAXClient.swift +++ b/Sources/Services/AWSDAX/DAXClient.swift @@ -117,7 +117,8 @@ extension DAXClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct DAXClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DAXClient.DAXClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DAXClient { /// Performs the `CreateCluster` operation on the `AmazonDAXV3` service. /// diff --git a/Sources/Services/AWSDAX/Plugins.swift b/Sources/Services/AWSDAX/Plugins.swift new file mode 100644 index 00000000000..772f89376a1 --- /dev/null +++ b/Sources/Services/AWSDAX/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DAXClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DAXClient.DAXClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DAXClient.DAXClientConfiguration { + config.authSchemeResolver = DefaultDAXAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DAXClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DAXAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DAXClient.DAXClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDLM/DLMClient.swift b/Sources/Services/AWSDLM/DLMClient.swift index 56e7b08c85f..01c71d996ac 100644 --- a/Sources/Services/AWSDLM/DLMClient.swift +++ b/Sources/Services/AWSDLM/DLMClient.swift @@ -117,7 +117,8 @@ extension DLMClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct DLMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DLMClient.DLMClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DLMClient { /// Performs the `CreateLifecyclePolicy` operation on the `dlm_20180112` service. /// diff --git a/Sources/Services/AWSDLM/Plugins.swift b/Sources/Services/AWSDLM/Plugins.swift new file mode 100644 index 00000000000..b163cd7e731 --- /dev/null +++ b/Sources/Services/AWSDLM/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DLMClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DLMClient.DLMClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DLMClient.DLMClientConfiguration { + config.authSchemeResolver = DefaultDLMAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DLMClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DLMAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DLMClient.DLMClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDataBrew/DataBrewClient.swift b/Sources/Services/AWSDataBrew/DataBrewClient.swift index 2b7b357ece2..fc6b9856e61 100644 --- a/Sources/Services/AWSDataBrew/DataBrewClient.swift +++ b/Sources/Services/AWSDataBrew/DataBrewClient.swift @@ -117,7 +117,8 @@ extension DataBrewClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct DataBrewClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DataBrewClient.DataBrewClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DataBrewClient { /// Performs the `BatchDeleteRecipeVersion` operation on the `AWSGlueDataBrew` service. /// diff --git a/Sources/Services/AWSDataBrew/Plugins.swift b/Sources/Services/AWSDataBrew/Plugins.swift new file mode 100644 index 00000000000..e2e8fe5ab35 --- /dev/null +++ b/Sources/Services/AWSDataBrew/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DataBrewClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DataBrewClient.DataBrewClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DataBrewClient.DataBrewClientConfiguration { + config.authSchemeResolver = DefaultDataBrewAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DataBrewClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DataBrewAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DataBrewClient.DataBrewClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDataExchange/DataExchangeClient.swift b/Sources/Services/AWSDataExchange/DataExchangeClient.swift index 3430b087062..27445462fda 100644 --- a/Sources/Services/AWSDataExchange/DataExchangeClient.swift +++ b/Sources/Services/AWSDataExchange/DataExchangeClient.swift @@ -117,7 +117,8 @@ extension DataExchangeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct DataExchangeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DataExchangeClient.DataExchangeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DataExchangeClient { /// Performs the `CancelJob` operation on the `DataExchange` service. /// diff --git a/Sources/Services/AWSDataExchange/Plugins.swift b/Sources/Services/AWSDataExchange/Plugins.swift new file mode 100644 index 00000000000..6c78043867f --- /dev/null +++ b/Sources/Services/AWSDataExchange/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DataExchangeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DataExchangeClient.DataExchangeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DataExchangeClient.DataExchangeClientConfiguration { + config.authSchemeResolver = DefaultDataExchangeAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DataExchangeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DataExchangeAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DataExchangeClient.DataExchangeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDataPipeline/DataPipelineClient.swift b/Sources/Services/AWSDataPipeline/DataPipelineClient.swift index 4ea1324e57b..d818764cfa6 100644 --- a/Sources/Services/AWSDataPipeline/DataPipelineClient.swift +++ b/Sources/Services/AWSDataPipeline/DataPipelineClient.swift @@ -117,7 +117,8 @@ extension DataPipelineClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct DataPipelineClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DataPipelineClient.DataPipelineClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DataPipelineClient { /// Performs the `ActivatePipeline` operation on the `DataPipeline` service. /// diff --git a/Sources/Services/AWSDataPipeline/Plugins.swift b/Sources/Services/AWSDataPipeline/Plugins.swift new file mode 100644 index 00000000000..291231a3602 --- /dev/null +++ b/Sources/Services/AWSDataPipeline/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DataPipelineClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DataPipelineClient.DataPipelineClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DataPipelineClient.DataPipelineClientConfiguration { + config.authSchemeResolver = DefaultDataPipelineAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DataPipelineClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DataPipelineAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DataPipelineClient.DataPipelineClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDataSync/DataSyncClient.swift b/Sources/Services/AWSDataSync/DataSyncClient.swift index 1cee359b7cd..170f1b4d0a8 100644 --- a/Sources/Services/AWSDataSync/DataSyncClient.swift +++ b/Sources/Services/AWSDataSync/DataSyncClient.swift @@ -117,7 +117,8 @@ extension DataSyncClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct DataSyncClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DataSyncClient.DataSyncClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DataSyncClient { /// Performs the `AddStorageSystem` operation on the `FmrsService` service. /// diff --git a/Sources/Services/AWSDataSync/Plugins.swift b/Sources/Services/AWSDataSync/Plugins.swift new file mode 100644 index 00000000000..bb80cacf052 --- /dev/null +++ b/Sources/Services/AWSDataSync/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DataSyncClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DataSyncClient.DataSyncClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DataSyncClient.DataSyncClientConfiguration { + config.authSchemeResolver = DefaultDataSyncAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DataSyncClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DataSyncAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DataSyncClient.DataSyncClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDataZone/DataZoneClient.swift b/Sources/Services/AWSDataZone/DataZoneClient.swift index 01ecd3de78c..593855c98b1 100644 --- a/Sources/Services/AWSDataZone/DataZoneClient.swift +++ b/Sources/Services/AWSDataZone/DataZoneClient.swift @@ -117,7 +117,8 @@ extension DataZoneClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct DataZoneClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DataZoneClient.DataZoneClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DataZoneClient { /// Performs the `AcceptPredictions` operation on the `DataZone` service. /// diff --git a/Sources/Services/AWSDataZone/Plugins.swift b/Sources/Services/AWSDataZone/Plugins.swift new file mode 100644 index 00000000000..bad26ccb512 --- /dev/null +++ b/Sources/Services/AWSDataZone/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DataZoneClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DataZoneClient.DataZoneClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DataZoneClient.DataZoneClientConfiguration { + config.authSchemeResolver = DefaultDataZoneAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DataZoneClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DataZoneAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DataZoneClient.DataZoneClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDatabaseMigrationService/DatabaseMigrationClient.swift b/Sources/Services/AWSDatabaseMigrationService/DatabaseMigrationClient.swift index 97af91c9ca3..3485efd9827 100644 --- a/Sources/Services/AWSDatabaseMigrationService/DatabaseMigrationClient.swift +++ b/Sources/Services/AWSDatabaseMigrationService/DatabaseMigrationClient.swift @@ -117,7 +117,8 @@ extension DatabaseMigrationClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct DatabaseMigrationClientLogHandlerFactory: ClientRuntime.SDKLogHand } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DatabaseMigrationClient.DatabaseMigrationClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DatabaseMigrationClient { /// Performs the `AddTagsToResource` operation on the `AmazonDMSv20160101` service. /// diff --git a/Sources/Services/AWSDatabaseMigrationService/Plugins.swift b/Sources/Services/AWSDatabaseMigrationService/Plugins.swift new file mode 100644 index 00000000000..927f032b5bc --- /dev/null +++ b/Sources/Services/AWSDatabaseMigrationService/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DatabaseMigrationClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DatabaseMigrationClient.DatabaseMigrationClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DatabaseMigrationClient.DatabaseMigrationClientConfiguration { + config.authSchemeResolver = DefaultDatabaseMigrationServiceAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DatabaseMigrationClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DatabaseMigrationServiceAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DatabaseMigrationClient.DatabaseMigrationClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDetective/DetectiveClient.swift b/Sources/Services/AWSDetective/DetectiveClient.swift index f81cd72f27b..592caa66ec6 100644 --- a/Sources/Services/AWSDetective/DetectiveClient.swift +++ b/Sources/Services/AWSDetective/DetectiveClient.swift @@ -117,7 +117,8 @@ extension DetectiveClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct DetectiveClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DetectiveClient.DetectiveClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DetectiveClient { /// Performs the `AcceptInvitation` operation on the `AmazonDetective` service. /// diff --git a/Sources/Services/AWSDetective/Plugins.swift b/Sources/Services/AWSDetective/Plugins.swift new file mode 100644 index 00000000000..5c98ad30cec --- /dev/null +++ b/Sources/Services/AWSDetective/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DetectiveClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DetectiveClient.DetectiveClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DetectiveClient.DetectiveClientConfiguration { + config.authSchemeResolver = DefaultDetectiveAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DetectiveClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DetectiveAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DetectiveClient.DetectiveClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDevOpsGuru/DevOpsGuruClient.swift b/Sources/Services/AWSDevOpsGuru/DevOpsGuruClient.swift index 2f1d586472d..32761f408c9 100644 --- a/Sources/Services/AWSDevOpsGuru/DevOpsGuruClient.swift +++ b/Sources/Services/AWSDevOpsGuru/DevOpsGuruClient.swift @@ -117,7 +117,8 @@ extension DevOpsGuruClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct DevOpsGuruClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DevOpsGuruClient.DevOpsGuruClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DevOpsGuruClient { /// Performs the `AddNotificationChannel` operation on the `CapstoneControlPlaneService` service. /// diff --git a/Sources/Services/AWSDevOpsGuru/Plugins.swift b/Sources/Services/AWSDevOpsGuru/Plugins.swift new file mode 100644 index 00000000000..28c4c9d0ee3 --- /dev/null +++ b/Sources/Services/AWSDevOpsGuru/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DevOpsGuruClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DevOpsGuruClient.DevOpsGuruClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DevOpsGuruClient.DevOpsGuruClientConfiguration { + config.authSchemeResolver = DefaultDevOpsGuruAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DevOpsGuruClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DevOpsGuruAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DevOpsGuruClient.DevOpsGuruClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDeviceFarm/DeviceFarmClient.swift b/Sources/Services/AWSDeviceFarm/DeviceFarmClient.swift index 32c3dc60bec..2483788c825 100644 --- a/Sources/Services/AWSDeviceFarm/DeviceFarmClient.swift +++ b/Sources/Services/AWSDeviceFarm/DeviceFarmClient.swift @@ -117,7 +117,8 @@ extension DeviceFarmClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct DeviceFarmClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DeviceFarmClient.DeviceFarmClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DeviceFarmClient { /// Performs the `CreateDevicePool` operation on the `DeviceFarm_20150623` service. /// diff --git a/Sources/Services/AWSDeviceFarm/Plugins.swift b/Sources/Services/AWSDeviceFarm/Plugins.swift new file mode 100644 index 00000000000..98eed5fd1c6 --- /dev/null +++ b/Sources/Services/AWSDeviceFarm/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DeviceFarmClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DeviceFarmClient.DeviceFarmClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DeviceFarmClient.DeviceFarmClientConfiguration { + config.authSchemeResolver = DefaultDeviceFarmAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DeviceFarmClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DeviceFarmAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DeviceFarmClient.DeviceFarmClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDirectConnect/DirectConnectClient.swift b/Sources/Services/AWSDirectConnect/DirectConnectClient.swift index 56cb1b97fc7..b9781209fd3 100644 --- a/Sources/Services/AWSDirectConnect/DirectConnectClient.swift +++ b/Sources/Services/AWSDirectConnect/DirectConnectClient.swift @@ -117,7 +117,8 @@ extension DirectConnectClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct DirectConnectClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DirectConnectClient.DirectConnectClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DirectConnectClient { /// Performs the `AcceptDirectConnectGatewayAssociationProposal` operation on the `OvertureService` service. /// diff --git a/Sources/Services/AWSDirectConnect/Plugins.swift b/Sources/Services/AWSDirectConnect/Plugins.swift new file mode 100644 index 00000000000..d8b5dcef97b --- /dev/null +++ b/Sources/Services/AWSDirectConnect/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DirectConnectClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DirectConnectClient.DirectConnectClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DirectConnectClient.DirectConnectClientConfiguration { + config.authSchemeResolver = DefaultDirectConnectAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DirectConnectClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DirectConnectAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DirectConnectClient.DirectConnectClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDirectoryService/DirectoryClient.swift b/Sources/Services/AWSDirectoryService/DirectoryClient.swift index 9d6b8620f2b..b93daf079c6 100644 --- a/Sources/Services/AWSDirectoryService/DirectoryClient.swift +++ b/Sources/Services/AWSDirectoryService/DirectoryClient.swift @@ -117,7 +117,8 @@ extension DirectoryClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct DirectoryClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DirectoryClient.DirectoryClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DirectoryClient { /// Performs the `AcceptSharedDirectory` operation on the `DirectoryService_20150416` service. /// diff --git a/Sources/Services/AWSDirectoryService/Plugins.swift b/Sources/Services/AWSDirectoryService/Plugins.swift new file mode 100644 index 00000000000..c70296527fb --- /dev/null +++ b/Sources/Services/AWSDirectoryService/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DirectoryClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DirectoryClient.DirectoryClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DirectoryClient.DirectoryClientConfiguration { + config.authSchemeResolver = DefaultDirectoryServiceAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DirectoryClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DirectoryServiceAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DirectoryClient.DirectoryClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDocDB/DocDBClient.swift b/Sources/Services/AWSDocDB/DocDBClient.swift index 2f1c8b8f1f4..78806ce6f3b 100644 --- a/Sources/Services/AWSDocDB/DocDBClient.swift +++ b/Sources/Services/AWSDocDB/DocDBClient.swift @@ -110,7 +110,8 @@ extension DocDBClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -128,21 +129,6 @@ public struct DocDBClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DocDBClient.DocDBClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DocDBClient { /// Performs the `AddSourceIdentifierToSubscription` operation on the `AmazonRDSv19` service. /// diff --git a/Sources/Services/AWSDocDB/Plugins.swift b/Sources/Services/AWSDocDB/Plugins.swift new file mode 100644 index 00000000000..38fceca7ed6 --- /dev/null +++ b/Sources/Services/AWSDocDB/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DocDBClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DocDBClient.DocDBClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DocDBClient.DocDBClientConfiguration { + config.authSchemeResolver = DefaultDocDBAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DocDBClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DocDBAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DocDBClient.DocDBClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDocDBElastic/DocDBElasticClient.swift b/Sources/Services/AWSDocDBElastic/DocDBElasticClient.swift index aa321287d0d..8614d5eca0a 100644 --- a/Sources/Services/AWSDocDBElastic/DocDBElasticClient.swift +++ b/Sources/Services/AWSDocDBElastic/DocDBElasticClient.swift @@ -117,7 +117,8 @@ extension DocDBElasticClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct DocDBElasticClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DocDBElasticClient.DocDBElasticClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DocDBElasticClient { /// Performs the `CreateCluster` operation on the `ChimeraDbLionfishServiceLambda` service. /// diff --git a/Sources/Services/AWSDocDBElastic/Plugins.swift b/Sources/Services/AWSDocDBElastic/Plugins.swift new file mode 100644 index 00000000000..149ea80854c --- /dev/null +++ b/Sources/Services/AWSDocDBElastic/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DocDBElasticClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DocDBElasticClient.DocDBElasticClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DocDBElasticClient.DocDBElasticClientConfiguration { + config.authSchemeResolver = DefaultDocDBElasticAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DocDBElasticClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DocDBElasticAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DocDBElasticClient.DocDBElasticClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDrs/DrsClient.swift b/Sources/Services/AWSDrs/DrsClient.swift index 4703cbdf2d5..9660767e299 100644 --- a/Sources/Services/AWSDrs/DrsClient.swift +++ b/Sources/Services/AWSDrs/DrsClient.swift @@ -117,7 +117,8 @@ extension DrsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct DrsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DrsClient.DrsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DrsClient { /// Performs the `AssociateSourceNetworkStack` operation on the `ElasticDisasterRecoveryService` service. /// diff --git a/Sources/Services/AWSDrs/Plugins.swift b/Sources/Services/AWSDrs/Plugins.swift new file mode 100644 index 00000000000..a314f5f80b8 --- /dev/null +++ b/Sources/Services/AWSDrs/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DrsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DrsClient.DrsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DrsClient.DrsClientConfiguration { + config.authSchemeResolver = DefaultDrsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DrsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DrsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DrsClient.DrsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDynamoDB/DynamoDBClient.swift b/Sources/Services/AWSDynamoDB/DynamoDBClient.swift index 14cc90dbb22..c04285f7ae0 100644 --- a/Sources/Services/AWSDynamoDB/DynamoDBClient.swift +++ b/Sources/Services/AWSDynamoDB/DynamoDBClient.swift @@ -117,7 +117,8 @@ extension DynamoDBClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct DynamoDBClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DynamoDBClient.DynamoDBClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DynamoDBClient { /// Performs the `BatchExecuteStatement` operation on the `DynamoDB_20120810` service. /// diff --git a/Sources/Services/AWSDynamoDB/Plugins.swift b/Sources/Services/AWSDynamoDB/Plugins.swift new file mode 100644 index 00000000000..ae25e3cdccc --- /dev/null +++ b/Sources/Services/AWSDynamoDB/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DynamoDBClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DynamoDBClient.DynamoDBClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DynamoDBClient.DynamoDBClientConfiguration { + config.authSchemeResolver = DefaultDynamoDBAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DynamoDBClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DynamoDBAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DynamoDBClient.DynamoDBClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSDynamoDBStreams/DynamoDBStreamsClient.swift b/Sources/Services/AWSDynamoDBStreams/DynamoDBStreamsClient.swift index 5d32a4ef36f..a6f2ec51c72 100644 --- a/Sources/Services/AWSDynamoDBStreams/DynamoDBStreamsClient.swift +++ b/Sources/Services/AWSDynamoDBStreams/DynamoDBStreamsClient.swift @@ -117,7 +117,8 @@ extension DynamoDBStreamsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct DynamoDBStreamsClientLogHandlerFactory: ClientRuntime.SDKLogHandle } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? DynamoDBStreamsClient.DynamoDBStreamsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension DynamoDBStreamsClient { /// Performs the `DescribeStream` operation on the `DynamoDBStreams_20120810` service. /// diff --git a/Sources/Services/AWSDynamoDBStreams/Plugins.swift b/Sources/Services/AWSDynamoDBStreams/Plugins.swift new file mode 100644 index 00000000000..7cb17afd9e6 --- /dev/null +++ b/Sources/Services/AWSDynamoDBStreams/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class DynamoDBStreamsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DynamoDBStreamsClient.DynamoDBStreamsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DynamoDBStreamsClient.DynamoDBStreamsClientConfiguration { + config.authSchemeResolver = DefaultDynamoDBStreamsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class DynamoDBStreamsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: DynamoDBStreamsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? DynamoDBStreamsClient.DynamoDBStreamsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSEBS/EBSClient.swift b/Sources/Services/AWSEBS/EBSClient.swift index 93da0846a23..4b8087ac4cd 100644 --- a/Sources/Services/AWSEBS/EBSClient.swift +++ b/Sources/Services/AWSEBS/EBSClient.swift @@ -117,7 +117,8 @@ extension EBSClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct EBSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? EBSClient.EBSClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension EBSClient { /// Performs the `CompleteSnapshot` operation on the `Ebs` service. /// diff --git a/Sources/Services/AWSEBS/Plugins.swift b/Sources/Services/AWSEBS/Plugins.swift new file mode 100644 index 00000000000..bfd58f71cd4 --- /dev/null +++ b/Sources/Services/AWSEBS/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class EBSClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EBSClient.EBSClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EBSClient.EBSClientConfiguration { + config.authSchemeResolver = DefaultEBSAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class EBSClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: EBSAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EBSClient.EBSClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSEC2/EC2Client.swift b/Sources/Services/AWSEC2/EC2Client.swift index af4c925553b..f420dd2611a 100644 --- a/Sources/Services/AWSEC2/EC2Client.swift +++ b/Sources/Services/AWSEC2/EC2Client.swift @@ -110,7 +110,8 @@ extension EC2Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -128,21 +129,6 @@ public struct EC2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? EC2Client.EC2ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension EC2Client { /// Performs the `AcceptAddressTransfer` operation on the `AmazonEC2` service. /// diff --git a/Sources/Services/AWSEC2/Plugins.swift b/Sources/Services/AWSEC2/Plugins.swift new file mode 100644 index 00000000000..2aacaf0e7f6 --- /dev/null +++ b/Sources/Services/AWSEC2/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class EC2ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EC2Client.EC2ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EC2Client.EC2ClientConfiguration { + config.authSchemeResolver = DefaultEC2AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class EC2ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: EC2AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EC2Client.EC2ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSEC2InstanceConnect/EC2InstanceConnectClient.swift b/Sources/Services/AWSEC2InstanceConnect/EC2InstanceConnectClient.swift index 35d25976e6c..c18611151c1 100644 --- a/Sources/Services/AWSEC2InstanceConnect/EC2InstanceConnectClient.swift +++ b/Sources/Services/AWSEC2InstanceConnect/EC2InstanceConnectClient.swift @@ -117,7 +117,8 @@ extension EC2InstanceConnectClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct EC2InstanceConnectClientLogHandlerFactory: ClientRuntime.SDKLogHan } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? EC2InstanceConnectClient.EC2InstanceConnectClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension EC2InstanceConnectClient { /// Performs the `SendSSHPublicKey` operation on the `AWSEC2InstanceConnectService` service. /// diff --git a/Sources/Services/AWSEC2InstanceConnect/Plugins.swift b/Sources/Services/AWSEC2InstanceConnect/Plugins.swift new file mode 100644 index 00000000000..8c5947fe3c1 --- /dev/null +++ b/Sources/Services/AWSEC2InstanceConnect/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class EC2InstanceConnectClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EC2InstanceConnectClient.EC2InstanceConnectClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EC2InstanceConnectClient.EC2InstanceConnectClientConfiguration { + config.authSchemeResolver = DefaultEC2InstanceConnectAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class EC2InstanceConnectClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: EC2InstanceConnectAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EC2InstanceConnectClient.EC2InstanceConnectClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSECR/ECRClient.swift b/Sources/Services/AWSECR/ECRClient.swift index 155d462b1d1..76ac0a2c180 100644 --- a/Sources/Services/AWSECR/ECRClient.swift +++ b/Sources/Services/AWSECR/ECRClient.swift @@ -117,7 +117,8 @@ extension ECRClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ECRClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ECRClient.ECRClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ECRClient { /// Performs the `BatchCheckLayerAvailability` operation on the `AmazonEC2ContainerRegistry_V20150921` service. /// diff --git a/Sources/Services/AWSECR/Plugins.swift b/Sources/Services/AWSECR/Plugins.swift new file mode 100644 index 00000000000..59e30b0dc0d --- /dev/null +++ b/Sources/Services/AWSECR/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ECRClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ECRClient.ECRClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ECRClient.ECRClientConfiguration { + config.authSchemeResolver = DefaultECRAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ECRClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ECRAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ECRClient.ECRClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSECRPUBLIC/ECRPUBLICClient.swift b/Sources/Services/AWSECRPUBLIC/ECRPUBLICClient.swift index f251c1b66f6..f32295df871 100644 --- a/Sources/Services/AWSECRPUBLIC/ECRPUBLICClient.swift +++ b/Sources/Services/AWSECRPUBLIC/ECRPUBLICClient.swift @@ -117,7 +117,8 @@ extension ECRPUBLICClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ECRPUBLICClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ECRPUBLICClient.ECRPUBLICClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ECRPUBLICClient { /// Performs the `BatchCheckLayerAvailability` operation on the `SpencerFrontendService` service. /// diff --git a/Sources/Services/AWSECRPUBLIC/Plugins.swift b/Sources/Services/AWSECRPUBLIC/Plugins.swift new file mode 100644 index 00000000000..5d86fa90e3e --- /dev/null +++ b/Sources/Services/AWSECRPUBLIC/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ECRPUBLICClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ECRPUBLICClient.ECRPUBLICClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ECRPUBLICClient.ECRPUBLICClientConfiguration { + config.authSchemeResolver = DefaultECRPUBLICAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ECRPUBLICClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ECRPUBLICAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ECRPUBLICClient.ECRPUBLICClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSECS/ECSClient.swift b/Sources/Services/AWSECS/ECSClient.swift index 4dd7f376ca8..ebf541475a2 100644 --- a/Sources/Services/AWSECS/ECSClient.swift +++ b/Sources/Services/AWSECS/ECSClient.swift @@ -117,7 +117,8 @@ extension ECSClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ECSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ECSClient.ECSClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ECSClient { /// Performs the `CreateCapacityProvider` operation on the `AmazonEC2ContainerServiceV20141113` service. /// diff --git a/Sources/Services/AWSECS/Plugins.swift b/Sources/Services/AWSECS/Plugins.swift new file mode 100644 index 00000000000..0840ba73d9c --- /dev/null +++ b/Sources/Services/AWSECS/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ECSClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ECSClient.ECSClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ECSClient.ECSClientConfiguration { + config.authSchemeResolver = DefaultECSAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ECSClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ECSAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ECSClient.ECSClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSEFS/EFSClient.swift b/Sources/Services/AWSEFS/EFSClient.swift index 60c752e686a..76254e34752 100644 --- a/Sources/Services/AWSEFS/EFSClient.swift +++ b/Sources/Services/AWSEFS/EFSClient.swift @@ -117,7 +117,8 @@ extension EFSClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct EFSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? EFSClient.EFSClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension EFSClient { /// Performs the `CreateAccessPoint` operation on the `MagnolioAPIService_v20150201` service. /// diff --git a/Sources/Services/AWSEFS/Plugins.swift b/Sources/Services/AWSEFS/Plugins.swift new file mode 100644 index 00000000000..05794649ea0 --- /dev/null +++ b/Sources/Services/AWSEFS/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class EFSClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EFSClient.EFSClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EFSClient.EFSClientConfiguration { + config.authSchemeResolver = DefaultEFSAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class EFSClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: EFSAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EFSClient.EFSClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSEKS/EKSClient.swift b/Sources/Services/AWSEKS/EKSClient.swift index a93d93fc59f..bc41a9f2a41 100644 --- a/Sources/Services/AWSEKS/EKSClient.swift +++ b/Sources/Services/AWSEKS/EKSClient.swift @@ -117,7 +117,8 @@ extension EKSClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct EKSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? EKSClient.EKSClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension EKSClient { /// Performs the `AssociateAccessPolicy` operation on the `AWSWesleyFrontend` service. /// diff --git a/Sources/Services/AWSEKS/Plugins.swift b/Sources/Services/AWSEKS/Plugins.swift new file mode 100644 index 00000000000..abcb04ac8ee --- /dev/null +++ b/Sources/Services/AWSEKS/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class EKSClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EKSClient.EKSClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EKSClient.EKSClientConfiguration { + config.authSchemeResolver = DefaultEKSAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class EKSClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: EKSAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EKSClient.EKSClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSEKSAuth/EKSAuthClient.swift b/Sources/Services/AWSEKSAuth/EKSAuthClient.swift index 98398e4ed8f..35297cd12b1 100644 --- a/Sources/Services/AWSEKSAuth/EKSAuthClient.swift +++ b/Sources/Services/AWSEKSAuth/EKSAuthClient.swift @@ -117,7 +117,8 @@ extension EKSAuthClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct EKSAuthClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? EKSAuthClient.EKSAuthClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension EKSAuthClient { /// Performs the `AssumeRoleForPodIdentity` operation on the `EKSAuthFrontend` service. /// diff --git a/Sources/Services/AWSEKSAuth/Plugins.swift b/Sources/Services/AWSEKSAuth/Plugins.swift new file mode 100644 index 00000000000..5b14dc36435 --- /dev/null +++ b/Sources/Services/AWSEKSAuth/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class EKSAuthClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EKSAuthClient.EKSAuthClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EKSAuthClient.EKSAuthClientConfiguration { + config.authSchemeResolver = DefaultEKSAuthAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class EKSAuthClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: EKSAuthAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EKSAuthClient.EKSAuthClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSEMR/EMRClient.swift b/Sources/Services/AWSEMR/EMRClient.swift index 92193b760ec..92f8d645910 100644 --- a/Sources/Services/AWSEMR/EMRClient.swift +++ b/Sources/Services/AWSEMR/EMRClient.swift @@ -117,7 +117,8 @@ extension EMRClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct EMRClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? EMRClient.EMRClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension EMRClient { /// Performs the `AddInstanceFleet` operation on the `ElasticMapReduce` service. /// diff --git a/Sources/Services/AWSEMR/Plugins.swift b/Sources/Services/AWSEMR/Plugins.swift new file mode 100644 index 00000000000..417bfa49fef --- /dev/null +++ b/Sources/Services/AWSEMR/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class EMRClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EMRClient.EMRClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EMRClient.EMRClientConfiguration { + config.authSchemeResolver = DefaultEMRAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class EMRClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: EMRAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EMRClient.EMRClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSEMRServerless/EMRServerlessClient.swift b/Sources/Services/AWSEMRServerless/EMRServerlessClient.swift index dc735c610b3..c55af99ae97 100644 --- a/Sources/Services/AWSEMRServerless/EMRServerlessClient.swift +++ b/Sources/Services/AWSEMRServerless/EMRServerlessClient.swift @@ -117,7 +117,8 @@ extension EMRServerlessClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct EMRServerlessClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? EMRServerlessClient.EMRServerlessClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension EMRServerlessClient { /// Performs the `CancelJobRun` operation on the `AwsToledoWebService` service. /// diff --git a/Sources/Services/AWSEMRServerless/Plugins.swift b/Sources/Services/AWSEMRServerless/Plugins.swift new file mode 100644 index 00000000000..07c1626cce2 --- /dev/null +++ b/Sources/Services/AWSEMRServerless/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class EMRServerlessClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EMRServerlessClient.EMRServerlessClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EMRServerlessClient.EMRServerlessClientConfiguration { + config.authSchemeResolver = DefaultEMRServerlessAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class EMRServerlessClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: EMRServerlessAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EMRServerlessClient.EMRServerlessClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSEMRcontainers/EMRcontainersClient.swift b/Sources/Services/AWSEMRcontainers/EMRcontainersClient.swift index 18216829ad2..82d93517d3d 100644 --- a/Sources/Services/AWSEMRcontainers/EMRcontainersClient.swift +++ b/Sources/Services/AWSEMRcontainers/EMRcontainersClient.swift @@ -117,7 +117,8 @@ extension EMRcontainersClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct EMRcontainersClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? EMRcontainersClient.EMRcontainersClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension EMRcontainersClient { /// Performs the `CancelJobRun` operation on the `AwsChicagoWebService` service. /// diff --git a/Sources/Services/AWSEMRcontainers/Plugins.swift b/Sources/Services/AWSEMRcontainers/Plugins.swift new file mode 100644 index 00000000000..3c7f87eb667 --- /dev/null +++ b/Sources/Services/AWSEMRcontainers/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class EMRcontainersClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EMRcontainersClient.EMRcontainersClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EMRcontainersClient.EMRcontainersClientConfiguration { + config.authSchemeResolver = DefaultEMRcontainersAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class EMRcontainersClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: EMRcontainersAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EMRcontainersClient.EMRcontainersClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSElastiCache/ElastiCacheClient.swift b/Sources/Services/AWSElastiCache/ElastiCacheClient.swift index 4046b15640c..9427dedfae6 100644 --- a/Sources/Services/AWSElastiCache/ElastiCacheClient.swift +++ b/Sources/Services/AWSElastiCache/ElastiCacheClient.swift @@ -110,7 +110,8 @@ extension ElastiCacheClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -128,21 +129,6 @@ public struct ElastiCacheClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ElastiCacheClient.ElastiCacheClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ElastiCacheClient { /// Performs the `AddTagsToResource` operation on the `AmazonElastiCacheV9` service. /// diff --git a/Sources/Services/AWSElastiCache/Plugins.swift b/Sources/Services/AWSElastiCache/Plugins.swift new file mode 100644 index 00000000000..495efbbd3cb --- /dev/null +++ b/Sources/Services/AWSElastiCache/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ElastiCacheClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElastiCacheClient.ElastiCacheClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElastiCacheClient.ElastiCacheClientConfiguration { + config.authSchemeResolver = DefaultElastiCacheAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ElastiCacheClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ElastiCacheAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElastiCacheClient.ElastiCacheClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSElasticBeanstalk/ElasticBeanstalkClient.swift b/Sources/Services/AWSElasticBeanstalk/ElasticBeanstalkClient.swift index 15101f5c492..eb04358b5a0 100644 --- a/Sources/Services/AWSElasticBeanstalk/ElasticBeanstalkClient.swift +++ b/Sources/Services/AWSElasticBeanstalk/ElasticBeanstalkClient.swift @@ -110,7 +110,8 @@ extension ElasticBeanstalkClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -128,21 +129,6 @@ public struct ElasticBeanstalkClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ElasticBeanstalkClient.ElasticBeanstalkClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ElasticBeanstalkClient { /// Performs the `AbortEnvironmentUpdate` operation on the `AWSElasticBeanstalkService` service. /// diff --git a/Sources/Services/AWSElasticBeanstalk/Plugins.swift b/Sources/Services/AWSElasticBeanstalk/Plugins.swift new file mode 100644 index 00000000000..d49fa47b6ea --- /dev/null +++ b/Sources/Services/AWSElasticBeanstalk/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ElasticBeanstalkClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticBeanstalkClient.ElasticBeanstalkClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticBeanstalkClient.ElasticBeanstalkClientConfiguration { + config.authSchemeResolver = DefaultElasticBeanstalkAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ElasticBeanstalkClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ElasticBeanstalkAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticBeanstalkClient.ElasticBeanstalkClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSElasticInference/ElasticInferenceClient.swift b/Sources/Services/AWSElasticInference/ElasticInferenceClient.swift index 4a401ca8f2b..c7432804369 100644 --- a/Sources/Services/AWSElasticInference/ElasticInferenceClient.swift +++ b/Sources/Services/AWSElasticInference/ElasticInferenceClient.swift @@ -117,7 +117,8 @@ extension ElasticInferenceClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ElasticInferenceClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ElasticInferenceClient.ElasticInferenceClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ElasticInferenceClient { /// Performs the `DescribeAcceleratorOfferings` operation on the `EC2MatterhornCfSoothsayerApiGatewayLambda` service. /// diff --git a/Sources/Services/AWSElasticInference/Plugins.swift b/Sources/Services/AWSElasticInference/Plugins.swift new file mode 100644 index 00000000000..beb60874c23 --- /dev/null +++ b/Sources/Services/AWSElasticInference/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ElasticInferenceClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticInferenceClient.ElasticInferenceClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticInferenceClient.ElasticInferenceClientConfiguration { + config.authSchemeResolver = DefaultElasticInferenceAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ElasticInferenceClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ElasticInferenceAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticInferenceClient.ElasticInferenceClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSElasticLoadBalancing/ElasticLoadBalancingClient.swift b/Sources/Services/AWSElasticLoadBalancing/ElasticLoadBalancingClient.swift index b31d170ae3f..794535d5b79 100644 --- a/Sources/Services/AWSElasticLoadBalancing/ElasticLoadBalancingClient.swift +++ b/Sources/Services/AWSElasticLoadBalancing/ElasticLoadBalancingClient.swift @@ -110,7 +110,8 @@ extension ElasticLoadBalancingClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -128,21 +129,6 @@ public struct ElasticLoadBalancingClientLogHandlerFactory: ClientRuntime.SDKLogH } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ElasticLoadBalancingClient.ElasticLoadBalancingClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ElasticLoadBalancingClient { /// Performs the `AddTags` operation on the `ElasticLoadBalancing_v7` service. /// diff --git a/Sources/Services/AWSElasticLoadBalancing/Plugins.swift b/Sources/Services/AWSElasticLoadBalancing/Plugins.swift new file mode 100644 index 00000000000..c4f133e66df --- /dev/null +++ b/Sources/Services/AWSElasticLoadBalancing/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ElasticLoadBalancingClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticLoadBalancingClient.ElasticLoadBalancingClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticLoadBalancingClient.ElasticLoadBalancingClientConfiguration { + config.authSchemeResolver = DefaultElasticLoadBalancingAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ElasticLoadBalancingClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ElasticLoadBalancingAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticLoadBalancingClient.ElasticLoadBalancingClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSElasticLoadBalancingv2/ElasticLoadBalancingv2Client.swift b/Sources/Services/AWSElasticLoadBalancingv2/ElasticLoadBalancingv2Client.swift index e0490990106..b04aaebdc21 100644 --- a/Sources/Services/AWSElasticLoadBalancingv2/ElasticLoadBalancingv2Client.swift +++ b/Sources/Services/AWSElasticLoadBalancingv2/ElasticLoadBalancingv2Client.swift @@ -110,7 +110,8 @@ extension ElasticLoadBalancingv2Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -128,21 +129,6 @@ public struct ElasticLoadBalancingv2ClientLogHandlerFactory: ClientRuntime.SDKLo } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ElasticLoadBalancingv2Client.ElasticLoadBalancingv2ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ElasticLoadBalancingv2Client { /// Performs the `AddListenerCertificates` operation on the `ElasticLoadBalancing_v10` service. /// diff --git a/Sources/Services/AWSElasticLoadBalancingv2/Plugins.swift b/Sources/Services/AWSElasticLoadBalancingv2/Plugins.swift new file mode 100644 index 00000000000..82e80986c36 --- /dev/null +++ b/Sources/Services/AWSElasticLoadBalancingv2/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ElasticLoadBalancingv2ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticLoadBalancingv2Client.ElasticLoadBalancingv2ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticLoadBalancingv2Client.ElasticLoadBalancingv2ClientConfiguration { + config.authSchemeResolver = DefaultElasticLoadBalancingv2AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ElasticLoadBalancingv2ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ElasticLoadBalancingv2AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticLoadBalancingv2Client.ElasticLoadBalancingv2ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSElasticTranscoder/ElasticTranscoderClient.swift b/Sources/Services/AWSElasticTranscoder/ElasticTranscoderClient.swift index 5c2bad4a12c..09b24a6c7c8 100644 --- a/Sources/Services/AWSElasticTranscoder/ElasticTranscoderClient.swift +++ b/Sources/Services/AWSElasticTranscoder/ElasticTranscoderClient.swift @@ -117,7 +117,8 @@ extension ElasticTranscoderClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ElasticTranscoderClientLogHandlerFactory: ClientRuntime.SDKLogHand } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ElasticTranscoderClient.ElasticTranscoderClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ElasticTranscoderClient { /// Performs the `CancelJob` operation on the `EtsCustomerService` service. /// diff --git a/Sources/Services/AWSElasticTranscoder/Plugins.swift b/Sources/Services/AWSElasticTranscoder/Plugins.swift new file mode 100644 index 00000000000..9655104086d --- /dev/null +++ b/Sources/Services/AWSElasticTranscoder/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ElasticTranscoderClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticTranscoderClient.ElasticTranscoderClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticTranscoderClient.ElasticTranscoderClientConfiguration { + config.authSchemeResolver = DefaultElasticTranscoderAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ElasticTranscoderClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ElasticTranscoderAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticTranscoderClient.ElasticTranscoderClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSElasticsearchService/ElasticsearchClient.swift b/Sources/Services/AWSElasticsearchService/ElasticsearchClient.swift index 601dfc03b4c..da0081b662a 100644 --- a/Sources/Services/AWSElasticsearchService/ElasticsearchClient.swift +++ b/Sources/Services/AWSElasticsearchService/ElasticsearchClient.swift @@ -117,7 +117,8 @@ extension ElasticsearchClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ElasticsearchClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ElasticsearchClient.ElasticsearchClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ElasticsearchClient { /// Performs the `AcceptInboundCrossClusterSearchConnection` operation on the `AmazonElasticsearchService2015` service. /// diff --git a/Sources/Services/AWSElasticsearchService/Plugins.swift b/Sources/Services/AWSElasticsearchService/Plugins.swift new file mode 100644 index 00000000000..226564f438f --- /dev/null +++ b/Sources/Services/AWSElasticsearchService/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ElasticsearchClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticsearchClient.ElasticsearchClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticsearchClient.ElasticsearchClientConfiguration { + config.authSchemeResolver = DefaultElasticsearchServiceAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ElasticsearchClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ElasticsearchServiceAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ElasticsearchClient.ElasticsearchClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSEntityResolution/EntityResolutionClient.swift b/Sources/Services/AWSEntityResolution/EntityResolutionClient.swift index 59f96a475f4..616132e1223 100644 --- a/Sources/Services/AWSEntityResolution/EntityResolutionClient.swift +++ b/Sources/Services/AWSEntityResolution/EntityResolutionClient.swift @@ -117,7 +117,8 @@ extension EntityResolutionClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct EntityResolutionClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? EntityResolutionClient.EntityResolutionClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension EntityResolutionClient { /// Performs the `CreateIdMappingWorkflow` operation on the `AWSVeniceService` service. /// diff --git a/Sources/Services/AWSEntityResolution/Plugins.swift b/Sources/Services/AWSEntityResolution/Plugins.swift new file mode 100644 index 00000000000..67dd7143bce --- /dev/null +++ b/Sources/Services/AWSEntityResolution/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class EntityResolutionClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EntityResolutionClient.EntityResolutionClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EntityResolutionClient.EntityResolutionClientConfiguration { + config.authSchemeResolver = DefaultEntityResolutionAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class EntityResolutionClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: EntityResolutionAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EntityResolutionClient.EntityResolutionClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSEventBridge/EventBridgeClient.swift b/Sources/Services/AWSEventBridge/EventBridgeClient.swift index 113aeffe918..b1586bfbcc3 100644 --- a/Sources/Services/AWSEventBridge/EventBridgeClient.swift +++ b/Sources/Services/AWSEventBridge/EventBridgeClient.swift @@ -117,7 +117,8 @@ extension EventBridgeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct EventBridgeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? EventBridgeClient.EventBridgeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension EventBridgeClient { /// Performs the `ActivateEventSource` operation on the `AWSEvents` service. /// diff --git a/Sources/Services/AWSEventBridge/Plugins.swift b/Sources/Services/AWSEventBridge/Plugins.swift new file mode 100644 index 00000000000..9bea99da220 --- /dev/null +++ b/Sources/Services/AWSEventBridge/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class EventBridgeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EventBridgeClient.EventBridgeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EventBridgeClient.EventBridgeClientConfiguration { + config.authSchemeResolver = DefaultEventBridgeAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme(), SigV4AAuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class EventBridgeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: EventBridgeAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EventBridgeClient.EventBridgeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSEvidently/EvidentlyClient.swift b/Sources/Services/AWSEvidently/EvidentlyClient.swift index 74737882d58..acec309667e 100644 --- a/Sources/Services/AWSEvidently/EvidentlyClient.swift +++ b/Sources/Services/AWSEvidently/EvidentlyClient.swift @@ -117,7 +117,8 @@ extension EvidentlyClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct EvidentlyClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? EvidentlyClient.EvidentlyClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension EvidentlyClient { /// Performs the `BatchEvaluateFeature` operation on the `Evidently` service. /// diff --git a/Sources/Services/AWSEvidently/Plugins.swift b/Sources/Services/AWSEvidently/Plugins.swift new file mode 100644 index 00000000000..09449ddd346 --- /dev/null +++ b/Sources/Services/AWSEvidently/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class EvidentlyClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EvidentlyClient.EvidentlyClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EvidentlyClient.EvidentlyClientConfiguration { + config.authSchemeResolver = DefaultEvidentlyAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class EvidentlyClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: EvidentlyAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? EvidentlyClient.EvidentlyClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSFMS/FMSClient.swift b/Sources/Services/AWSFMS/FMSClient.swift index 3baeca33f7b..bd9cf15e3d2 100644 --- a/Sources/Services/AWSFMS/FMSClient.swift +++ b/Sources/Services/AWSFMS/FMSClient.swift @@ -117,7 +117,8 @@ extension FMSClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct FMSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? FMSClient.FMSClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension FMSClient { /// Performs the `AssociateAdminAccount` operation on the `AWSFMS_20180101` service. /// diff --git a/Sources/Services/AWSFMS/Plugins.swift b/Sources/Services/AWSFMS/Plugins.swift new file mode 100644 index 00000000000..4a8825dca6d --- /dev/null +++ b/Sources/Services/AWSFMS/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class FMSClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FMSClient.FMSClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FMSClient.FMSClientConfiguration { + config.authSchemeResolver = DefaultFMSAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class FMSClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: FMSAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FMSClient.FMSClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSFSx/FSxClient.swift b/Sources/Services/AWSFSx/FSxClient.swift index b8fa0850441..db7b183494b 100644 --- a/Sources/Services/AWSFSx/FSxClient.swift +++ b/Sources/Services/AWSFSx/FSxClient.swift @@ -117,7 +117,8 @@ extension FSxClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct FSxClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? FSxClient.FSxClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension FSxClient { /// Performs the `AssociateFileSystemAliases` operation on the `AWSSimbaAPIService_v20180301` service. /// diff --git a/Sources/Services/AWSFSx/Plugins.swift b/Sources/Services/AWSFSx/Plugins.swift new file mode 100644 index 00000000000..e3cc67b42e7 --- /dev/null +++ b/Sources/Services/AWSFSx/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class FSxClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FSxClient.FSxClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FSxClient.FSxClientConfiguration { + config.authSchemeResolver = DefaultFSxAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class FSxClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: FSxAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FSxClient.FSxClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSFinspace/FinspaceClient.swift b/Sources/Services/AWSFinspace/FinspaceClient.swift index 22378d85b16..b763fa3ef92 100644 --- a/Sources/Services/AWSFinspace/FinspaceClient.swift +++ b/Sources/Services/AWSFinspace/FinspaceClient.swift @@ -117,7 +117,8 @@ extension FinspaceClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct FinspaceClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? FinspaceClient.FinspaceClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension FinspaceClient { /// Performs the `CreateEnvironment` operation on the `AWSHabaneroManagementService` service. /// diff --git a/Sources/Services/AWSFinspace/Plugins.swift b/Sources/Services/AWSFinspace/Plugins.swift new file mode 100644 index 00000000000..cf480262081 --- /dev/null +++ b/Sources/Services/AWSFinspace/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class FinspaceClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FinspaceClient.FinspaceClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FinspaceClient.FinspaceClientConfiguration { + config.authSchemeResolver = DefaultFinspaceAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class FinspaceClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: FinspaceAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FinspaceClient.FinspaceClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSFinspacedata/FinspacedataClient.swift b/Sources/Services/AWSFinspacedata/FinspacedataClient.swift index f1af43c6681..f8b5ac88474 100644 --- a/Sources/Services/AWSFinspacedata/FinspacedataClient.swift +++ b/Sources/Services/AWSFinspacedata/FinspacedataClient.swift @@ -117,7 +117,8 @@ extension FinspacedataClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct FinspacedataClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? FinspacedataClient.FinspacedataClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension FinspacedataClient { /// Performs the `AssociateUserToPermissionGroup` operation on the `AWSHabaneroPublicAPI` service. /// diff --git a/Sources/Services/AWSFinspacedata/Plugins.swift b/Sources/Services/AWSFinspacedata/Plugins.swift new file mode 100644 index 00000000000..b76aa1f1ee5 --- /dev/null +++ b/Sources/Services/AWSFinspacedata/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class FinspacedataClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FinspacedataClient.FinspacedataClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FinspacedataClient.FinspacedataClientConfiguration { + config.authSchemeResolver = DefaultFinspacedataAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class FinspacedataClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: FinspacedataAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FinspacedataClient.FinspacedataClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSFirehose/FirehoseClient.swift b/Sources/Services/AWSFirehose/FirehoseClient.swift index 874831c2749..6632479db4a 100644 --- a/Sources/Services/AWSFirehose/FirehoseClient.swift +++ b/Sources/Services/AWSFirehose/FirehoseClient.swift @@ -117,7 +117,8 @@ extension FirehoseClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct FirehoseClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? FirehoseClient.FirehoseClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension FirehoseClient { /// Performs the `CreateDeliveryStream` operation on the `Firehose_20150804` service. /// diff --git a/Sources/Services/AWSFirehose/Plugins.swift b/Sources/Services/AWSFirehose/Plugins.swift new file mode 100644 index 00000000000..d7969341ff7 --- /dev/null +++ b/Sources/Services/AWSFirehose/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class FirehoseClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FirehoseClient.FirehoseClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FirehoseClient.FirehoseClientConfiguration { + config.authSchemeResolver = DefaultFirehoseAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class FirehoseClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: FirehoseAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FirehoseClient.FirehoseClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSFis/FisClient.swift b/Sources/Services/AWSFis/FisClient.swift index 32cc1dcdb53..e61e000716c 100644 --- a/Sources/Services/AWSFis/FisClient.swift +++ b/Sources/Services/AWSFis/FisClient.swift @@ -117,7 +117,8 @@ extension FisClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct FisClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? FisClient.FisClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension FisClient { /// Performs the `CreateExperimentTemplate` operation on the `FaultInjectionSimulator` service. /// diff --git a/Sources/Services/AWSFis/Plugins.swift b/Sources/Services/AWSFis/Plugins.swift new file mode 100644 index 00000000000..ccce89ecda2 --- /dev/null +++ b/Sources/Services/AWSFis/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class FisClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FisClient.FisClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FisClient.FisClientConfiguration { + config.authSchemeResolver = DefaultFisAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class FisClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: FisAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FisClient.FisClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSForecast/ForecastClient.swift b/Sources/Services/AWSForecast/ForecastClient.swift index 065a52f254e..ef20ddd2b1c 100644 --- a/Sources/Services/AWSForecast/ForecastClient.swift +++ b/Sources/Services/AWSForecast/ForecastClient.swift @@ -117,7 +117,8 @@ extension ForecastClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ForecastClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ForecastClient.ForecastClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ForecastClient { /// Performs the `CreateAutoPredictor` operation on the `AmazonForecast` service. /// diff --git a/Sources/Services/AWSForecast/Plugins.swift b/Sources/Services/AWSForecast/Plugins.swift new file mode 100644 index 00000000000..1d4e0b111b2 --- /dev/null +++ b/Sources/Services/AWSForecast/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ForecastClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ForecastClient.ForecastClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ForecastClient.ForecastClientConfiguration { + config.authSchemeResolver = DefaultForecastAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ForecastClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ForecastAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ForecastClient.ForecastClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSForecastquery/ForecastqueryClient.swift b/Sources/Services/AWSForecastquery/ForecastqueryClient.swift index 8024ce40302..cef51138bb4 100644 --- a/Sources/Services/AWSForecastquery/ForecastqueryClient.swift +++ b/Sources/Services/AWSForecastquery/ForecastqueryClient.swift @@ -117,7 +117,8 @@ extension ForecastqueryClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ForecastqueryClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ForecastqueryClient.ForecastqueryClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ForecastqueryClient { /// Performs the `QueryForecast` operation on the `AmazonForecastRuntime` service. /// diff --git a/Sources/Services/AWSForecastquery/Plugins.swift b/Sources/Services/AWSForecastquery/Plugins.swift new file mode 100644 index 00000000000..85749fac31d --- /dev/null +++ b/Sources/Services/AWSForecastquery/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ForecastqueryClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ForecastqueryClient.ForecastqueryClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ForecastqueryClient.ForecastqueryClientConfiguration { + config.authSchemeResolver = DefaultForecastqueryAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ForecastqueryClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ForecastqueryAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ForecastqueryClient.ForecastqueryClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSFraudDetector/FraudDetectorClient.swift b/Sources/Services/AWSFraudDetector/FraudDetectorClient.swift index 82e7293a02b..7322b785712 100644 --- a/Sources/Services/AWSFraudDetector/FraudDetectorClient.swift +++ b/Sources/Services/AWSFraudDetector/FraudDetectorClient.swift @@ -117,7 +117,8 @@ extension FraudDetectorClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct FraudDetectorClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? FraudDetectorClient.FraudDetectorClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension FraudDetectorClient { /// Performs the `BatchCreateVariable` operation on the `AWSHawksNestServiceFacade` service. /// diff --git a/Sources/Services/AWSFraudDetector/Plugins.swift b/Sources/Services/AWSFraudDetector/Plugins.swift new file mode 100644 index 00000000000..f0548abe651 --- /dev/null +++ b/Sources/Services/AWSFraudDetector/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class FraudDetectorClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FraudDetectorClient.FraudDetectorClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FraudDetectorClient.FraudDetectorClientConfiguration { + config.authSchemeResolver = DefaultFraudDetectorAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class FraudDetectorClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: FraudDetectorAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FraudDetectorClient.FraudDetectorClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSFreeTier/FreeTierClient.swift b/Sources/Services/AWSFreeTier/FreeTierClient.swift index 2effdd3f7ed..1995acab359 100644 --- a/Sources/Services/AWSFreeTier/FreeTierClient.swift +++ b/Sources/Services/AWSFreeTier/FreeTierClient.swift @@ -117,7 +117,8 @@ extension FreeTierClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct FreeTierClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? FreeTierClient.FreeTierClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension FreeTierClient { /// Performs the `GetFreeTierUsage` operation on the `AWSFreeTierService` service. /// diff --git a/Sources/Services/AWSFreeTier/Plugins.swift b/Sources/Services/AWSFreeTier/Plugins.swift new file mode 100644 index 00000000000..9bc3d817379 --- /dev/null +++ b/Sources/Services/AWSFreeTier/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class FreeTierClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FreeTierClient.FreeTierClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FreeTierClient.FreeTierClientConfiguration { + config.authSchemeResolver = DefaultFreeTierAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class FreeTierClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: FreeTierAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? FreeTierClient.FreeTierClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSGameLift/GameLiftClient.swift b/Sources/Services/AWSGameLift/GameLiftClient.swift index f5fdbdfe61e..c23b5f7785f 100644 --- a/Sources/Services/AWSGameLift/GameLiftClient.swift +++ b/Sources/Services/AWSGameLift/GameLiftClient.swift @@ -117,7 +117,8 @@ extension GameLiftClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct GameLiftClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? GameLiftClient.GameLiftClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension GameLiftClient { /// Performs the `AcceptMatch` operation on the `GameLift` service. /// diff --git a/Sources/Services/AWSGameLift/Plugins.swift b/Sources/Services/AWSGameLift/Plugins.swift new file mode 100644 index 00000000000..03e663fb0ab --- /dev/null +++ b/Sources/Services/AWSGameLift/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class GameLiftClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GameLiftClient.GameLiftClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GameLiftClient.GameLiftClientConfiguration { + config.authSchemeResolver = DefaultGameLiftAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class GameLiftClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: GameLiftAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GameLiftClient.GameLiftClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSGlacier/GlacierClient.swift b/Sources/Services/AWSGlacier/GlacierClient.swift index 874a8919ee2..14061036852 100644 --- a/Sources/Services/AWSGlacier/GlacierClient.swift +++ b/Sources/Services/AWSGlacier/GlacierClient.swift @@ -117,7 +117,8 @@ extension GlacierClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct GlacierClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? GlacierClient.GlacierClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension GlacierClient { /// Performs the `AbortMultipartUpload` operation on the `Glacier` service. /// diff --git a/Sources/Services/AWSGlacier/Plugins.swift b/Sources/Services/AWSGlacier/Plugins.swift new file mode 100644 index 00000000000..abb29765cfb --- /dev/null +++ b/Sources/Services/AWSGlacier/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class GlacierClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GlacierClient.GlacierClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GlacierClient.GlacierClientConfiguration { + config.authSchemeResolver = DefaultGlacierAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class GlacierClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: GlacierAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GlacierClient.GlacierClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSGlobalAccelerator/GlobalAcceleratorClient.swift b/Sources/Services/AWSGlobalAccelerator/GlobalAcceleratorClient.swift index d60b052c256..c8ad6e617ff 100644 --- a/Sources/Services/AWSGlobalAccelerator/GlobalAcceleratorClient.swift +++ b/Sources/Services/AWSGlobalAccelerator/GlobalAcceleratorClient.swift @@ -117,7 +117,8 @@ extension GlobalAcceleratorClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct GlobalAcceleratorClientLogHandlerFactory: ClientRuntime.SDKLogHand } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? GlobalAcceleratorClient.GlobalAcceleratorClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension GlobalAcceleratorClient { /// Performs the `AddCustomRoutingEndpoints` operation on the `GlobalAccelerator_V20180706` service. /// diff --git a/Sources/Services/AWSGlobalAccelerator/Plugins.swift b/Sources/Services/AWSGlobalAccelerator/Plugins.swift new file mode 100644 index 00000000000..d3125b540fa --- /dev/null +++ b/Sources/Services/AWSGlobalAccelerator/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class GlobalAcceleratorClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GlobalAcceleratorClient.GlobalAcceleratorClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GlobalAcceleratorClient.GlobalAcceleratorClientConfiguration { + config.authSchemeResolver = DefaultGlobalAcceleratorAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class GlobalAcceleratorClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: GlobalAcceleratorAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GlobalAcceleratorClient.GlobalAcceleratorClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSGlue/GlueClient.swift b/Sources/Services/AWSGlue/GlueClient.swift index a3ef51b8a3d..1ecb725f149 100644 --- a/Sources/Services/AWSGlue/GlueClient.swift +++ b/Sources/Services/AWSGlue/GlueClient.swift @@ -117,7 +117,8 @@ extension GlueClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct GlueClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? GlueClient.GlueClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension GlueClient { /// Performs the `BatchCreatePartition` operation on the `AWSGlue` service. /// diff --git a/Sources/Services/AWSGlue/Plugins.swift b/Sources/Services/AWSGlue/Plugins.swift new file mode 100644 index 00000000000..ed26c20e493 --- /dev/null +++ b/Sources/Services/AWSGlue/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class GlueClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GlueClient.GlueClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GlueClient.GlueClientConfiguration { + config.authSchemeResolver = DefaultGlueAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class GlueClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: GlueAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GlueClient.GlueClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSGrafana/GrafanaClient.swift b/Sources/Services/AWSGrafana/GrafanaClient.swift index 0509e20bfd5..a5b231b09e1 100644 --- a/Sources/Services/AWSGrafana/GrafanaClient.swift +++ b/Sources/Services/AWSGrafana/GrafanaClient.swift @@ -117,7 +117,8 @@ extension GrafanaClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct GrafanaClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? GrafanaClient.GrafanaClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension GrafanaClient { /// Performs the `AssociateLicense` operation on the `AWSGrafanaControlPlane` service. /// diff --git a/Sources/Services/AWSGrafana/Plugins.swift b/Sources/Services/AWSGrafana/Plugins.swift new file mode 100644 index 00000000000..419e2660c15 --- /dev/null +++ b/Sources/Services/AWSGrafana/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class GrafanaClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GrafanaClient.GrafanaClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GrafanaClient.GrafanaClientConfiguration { + config.authSchemeResolver = DefaultGrafanaAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class GrafanaClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: GrafanaAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GrafanaClient.GrafanaClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSGreengrass/GreengrassClient.swift b/Sources/Services/AWSGreengrass/GreengrassClient.swift index 2577ef6435a..78fef05c263 100644 --- a/Sources/Services/AWSGreengrass/GreengrassClient.swift +++ b/Sources/Services/AWSGreengrass/GreengrassClient.swift @@ -117,7 +117,8 @@ extension GreengrassClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct GreengrassClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? GreengrassClient.GreengrassClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension GreengrassClient { /// Performs the `AssociateRoleToGroup` operation on the `Greengrass` service. /// diff --git a/Sources/Services/AWSGreengrass/Plugins.swift b/Sources/Services/AWSGreengrass/Plugins.swift new file mode 100644 index 00000000000..d4e8df6b53b --- /dev/null +++ b/Sources/Services/AWSGreengrass/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class GreengrassClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GreengrassClient.GreengrassClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GreengrassClient.GreengrassClientConfiguration { + config.authSchemeResolver = DefaultGreengrassAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class GreengrassClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: GreengrassAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GreengrassClient.GreengrassClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSGreengrassV2/GreengrassV2Client.swift b/Sources/Services/AWSGreengrassV2/GreengrassV2Client.swift index 681badcc3ab..e099a8f2905 100644 --- a/Sources/Services/AWSGreengrassV2/GreengrassV2Client.swift +++ b/Sources/Services/AWSGreengrassV2/GreengrassV2Client.swift @@ -117,7 +117,8 @@ extension GreengrassV2Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct GreengrassV2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? GreengrassV2Client.GreengrassV2ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension GreengrassV2Client { /// Performs the `AssociateServiceRoleToAccount` operation on the `GreengrassV2` service. /// diff --git a/Sources/Services/AWSGreengrassV2/Plugins.swift b/Sources/Services/AWSGreengrassV2/Plugins.swift new file mode 100644 index 00000000000..03418d155b8 --- /dev/null +++ b/Sources/Services/AWSGreengrassV2/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class GreengrassV2ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GreengrassV2Client.GreengrassV2ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GreengrassV2Client.GreengrassV2ClientConfiguration { + config.authSchemeResolver = DefaultGreengrassV2AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class GreengrassV2ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: GreengrassV2AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GreengrassV2Client.GreengrassV2ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSGroundStation/GroundStationClient.swift b/Sources/Services/AWSGroundStation/GroundStationClient.swift index b1f0a18b9a0..be3d5de4500 100644 --- a/Sources/Services/AWSGroundStation/GroundStationClient.swift +++ b/Sources/Services/AWSGroundStation/GroundStationClient.swift @@ -117,7 +117,8 @@ extension GroundStationClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct GroundStationClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? GroundStationClient.GroundStationClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension GroundStationClient { /// Performs the `CancelContact` operation on the `GroundStation` service. /// diff --git a/Sources/Services/AWSGroundStation/Plugins.swift b/Sources/Services/AWSGroundStation/Plugins.swift new file mode 100644 index 00000000000..4e022e505cf --- /dev/null +++ b/Sources/Services/AWSGroundStation/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class GroundStationClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GroundStationClient.GroundStationClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GroundStationClient.GroundStationClientConfiguration { + config.authSchemeResolver = DefaultGroundStationAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class GroundStationClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: GroundStationAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GroundStationClient.GroundStationClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSGuardDuty/GuardDutyClient.swift b/Sources/Services/AWSGuardDuty/GuardDutyClient.swift index 39dfecb93af..93014c4cfbc 100644 --- a/Sources/Services/AWSGuardDuty/GuardDutyClient.swift +++ b/Sources/Services/AWSGuardDuty/GuardDutyClient.swift @@ -117,7 +117,8 @@ extension GuardDutyClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct GuardDutyClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? GuardDutyClient.GuardDutyClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension GuardDutyClient { /// Performs the `AcceptAdministratorInvitation` operation on the `GuardDutyAPIService` service. /// diff --git a/Sources/Services/AWSGuardDuty/Plugins.swift b/Sources/Services/AWSGuardDuty/Plugins.swift new file mode 100644 index 00000000000..dee19344a8b --- /dev/null +++ b/Sources/Services/AWSGuardDuty/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class GuardDutyClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GuardDutyClient.GuardDutyClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GuardDutyClient.GuardDutyClientConfiguration { + config.authSchemeResolver = DefaultGuardDutyAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class GuardDutyClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: GuardDutyAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? GuardDutyClient.GuardDutyClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSHealth/HealthClient.swift b/Sources/Services/AWSHealth/HealthClient.swift index 64d2bf2b32c..70823269112 100644 --- a/Sources/Services/AWSHealth/HealthClient.swift +++ b/Sources/Services/AWSHealth/HealthClient.swift @@ -117,7 +117,8 @@ extension HealthClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct HealthClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? HealthClient.HealthClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension HealthClient { /// Performs the `DescribeAffectedAccountsForOrganization` operation on the `AWSHealth_20160804` service. /// diff --git a/Sources/Services/AWSHealth/Plugins.swift b/Sources/Services/AWSHealth/Plugins.swift new file mode 100644 index 00000000000..cb5168482d7 --- /dev/null +++ b/Sources/Services/AWSHealth/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class HealthClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? HealthClient.HealthClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? HealthClient.HealthClientConfiguration { + config.authSchemeResolver = DefaultHealthAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class HealthClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: HealthAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? HealthClient.HealthClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSHealthLake/HealthLakeClient.swift b/Sources/Services/AWSHealthLake/HealthLakeClient.swift index 92dd002dbfd..a8c28b557de 100644 --- a/Sources/Services/AWSHealthLake/HealthLakeClient.swift +++ b/Sources/Services/AWSHealthLake/HealthLakeClient.swift @@ -117,7 +117,8 @@ extension HealthLakeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct HealthLakeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? HealthLakeClient.HealthLakeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension HealthLakeClient { /// Performs the `CreateFHIRDatastore` operation on the `HealthLake` service. /// diff --git a/Sources/Services/AWSHealthLake/Plugins.swift b/Sources/Services/AWSHealthLake/Plugins.swift new file mode 100644 index 00000000000..e1eaa0bd0b5 --- /dev/null +++ b/Sources/Services/AWSHealthLake/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class HealthLakeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? HealthLakeClient.HealthLakeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? HealthLakeClient.HealthLakeClientConfiguration { + config.authSchemeResolver = DefaultHealthLakeAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class HealthLakeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: HealthLakeAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? HealthLakeClient.HealthLakeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSHoneycode/HoneycodeClient.swift b/Sources/Services/AWSHoneycode/HoneycodeClient.swift index 0dad6ebc5cf..6026b6edbd6 100644 --- a/Sources/Services/AWSHoneycode/HoneycodeClient.swift +++ b/Sources/Services/AWSHoneycode/HoneycodeClient.swift @@ -117,7 +117,8 @@ extension HoneycodeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct HoneycodeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? HoneycodeClient.HoneycodeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension HoneycodeClient { /// Performs the `BatchCreateTableRows` operation on the `SheetsPublicApiService` service. /// diff --git a/Sources/Services/AWSHoneycode/Plugins.swift b/Sources/Services/AWSHoneycode/Plugins.swift new file mode 100644 index 00000000000..de4cae95138 --- /dev/null +++ b/Sources/Services/AWSHoneycode/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class HoneycodeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? HoneycodeClient.HoneycodeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? HoneycodeClient.HoneycodeClientConfiguration { + config.authSchemeResolver = DefaultHoneycodeAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class HoneycodeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: HoneycodeAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? HoneycodeClient.HoneycodeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIAM/IAMClient.swift b/Sources/Services/AWSIAM/IAMClient.swift index 6071db2ea15..a86d708fce8 100644 --- a/Sources/Services/AWSIAM/IAMClient.swift +++ b/Sources/Services/AWSIAM/IAMClient.swift @@ -110,7 +110,8 @@ extension IAMClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -128,21 +129,6 @@ public struct IAMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IAMClient.IAMClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IAMClient { /// Performs the `AddClientIDToOpenIDConnectProvider` operation on the `AWSIdentityManagementV20100508` service. /// diff --git a/Sources/Services/AWSIAM/Plugins.swift b/Sources/Services/AWSIAM/Plugins.swift new file mode 100644 index 00000000000..83148933a54 --- /dev/null +++ b/Sources/Services/AWSIAM/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IAMClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IAMClient.IAMClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IAMClient.IAMClientConfiguration { + config.authSchemeResolver = DefaultIAMAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IAMClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IAMAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IAMClient.IAMClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIVSRealTime/IVSRealTimeClient.swift b/Sources/Services/AWSIVSRealTime/IVSRealTimeClient.swift index 90e787547b4..8e55d1ef5ba 100644 --- a/Sources/Services/AWSIVSRealTime/IVSRealTimeClient.swift +++ b/Sources/Services/AWSIVSRealTime/IVSRealTimeClient.swift @@ -117,7 +117,8 @@ extension IVSRealTimeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IVSRealTimeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IVSRealTimeClient.IVSRealTimeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IVSRealTimeClient { /// Performs the `CreateEncoderConfiguration` operation on the `AmazonInteractiveVideoServiceRealTime` service. /// diff --git a/Sources/Services/AWSIVSRealTime/Plugins.swift b/Sources/Services/AWSIVSRealTime/Plugins.swift new file mode 100644 index 00000000000..e8e624a9003 --- /dev/null +++ b/Sources/Services/AWSIVSRealTime/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IVSRealTimeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IVSRealTimeClient.IVSRealTimeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IVSRealTimeClient.IVSRealTimeClientConfiguration { + config.authSchemeResolver = DefaultIVSRealTimeAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IVSRealTimeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IVSRealTimeAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IVSRealTimeClient.IVSRealTimeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIdentitystore/IdentitystoreClient.swift b/Sources/Services/AWSIdentitystore/IdentitystoreClient.swift index b65ec10ee5e..adad457c86c 100644 --- a/Sources/Services/AWSIdentitystore/IdentitystoreClient.swift +++ b/Sources/Services/AWSIdentitystore/IdentitystoreClient.swift @@ -117,7 +117,8 @@ extension IdentitystoreClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IdentitystoreClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IdentitystoreClient.IdentitystoreClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IdentitystoreClient { /// Performs the `CreateGroup` operation on the `AWSIdentityStore` service. /// diff --git a/Sources/Services/AWSIdentitystore/Plugins.swift b/Sources/Services/AWSIdentitystore/Plugins.swift new file mode 100644 index 00000000000..bc99da2e198 --- /dev/null +++ b/Sources/Services/AWSIdentitystore/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IdentitystoreClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IdentitystoreClient.IdentitystoreClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IdentitystoreClient.IdentitystoreClientConfiguration { + config.authSchemeResolver = DefaultIdentitystoreAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IdentitystoreClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IdentitystoreAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IdentitystoreClient.IdentitystoreClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSImagebuilder/ImagebuilderClient.swift b/Sources/Services/AWSImagebuilder/ImagebuilderClient.swift index 6489b9715ad..d1ae0f01aeb 100644 --- a/Sources/Services/AWSImagebuilder/ImagebuilderClient.swift +++ b/Sources/Services/AWSImagebuilder/ImagebuilderClient.swift @@ -117,7 +117,8 @@ extension ImagebuilderClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ImagebuilderClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ImagebuilderClient.ImagebuilderClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ImagebuilderClient { /// Performs the `CancelImageCreation` operation on the `imagebuilder` service. /// diff --git a/Sources/Services/AWSImagebuilder/Plugins.swift b/Sources/Services/AWSImagebuilder/Plugins.swift new file mode 100644 index 00000000000..ae9ac83616b --- /dev/null +++ b/Sources/Services/AWSImagebuilder/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ImagebuilderClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ImagebuilderClient.ImagebuilderClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ImagebuilderClient.ImagebuilderClientConfiguration { + config.authSchemeResolver = DefaultImagebuilderAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ImagebuilderClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ImagebuilderAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ImagebuilderClient.ImagebuilderClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSInspector/InspectorClient.swift b/Sources/Services/AWSInspector/InspectorClient.swift index e5578cf9aa2..2bd973b2163 100644 --- a/Sources/Services/AWSInspector/InspectorClient.swift +++ b/Sources/Services/AWSInspector/InspectorClient.swift @@ -117,7 +117,8 @@ extension InspectorClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct InspectorClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? InspectorClient.InspectorClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension InspectorClient { /// Performs the `AddAttributesToFindings` operation on the `InspectorService` service. /// diff --git a/Sources/Services/AWSInspector/Plugins.swift b/Sources/Services/AWSInspector/Plugins.swift new file mode 100644 index 00000000000..b6dbe1ec7c2 --- /dev/null +++ b/Sources/Services/AWSInspector/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class InspectorClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? InspectorClient.InspectorClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? InspectorClient.InspectorClientConfiguration { + config.authSchemeResolver = DefaultInspectorAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class InspectorClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: InspectorAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? InspectorClient.InspectorClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSInspector2/Inspector2Client.swift b/Sources/Services/AWSInspector2/Inspector2Client.swift index 89a2f20aa68..db0677eedcb 100644 --- a/Sources/Services/AWSInspector2/Inspector2Client.swift +++ b/Sources/Services/AWSInspector2/Inspector2Client.swift @@ -117,7 +117,8 @@ extension Inspector2Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct Inspector2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? Inspector2Client.Inspector2ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension Inspector2Client { /// Performs the `AssociateMember` operation on the `Inspector2` service. /// diff --git a/Sources/Services/AWSInspector2/Plugins.swift b/Sources/Services/AWSInspector2/Plugins.swift new file mode 100644 index 00000000000..6aa60730d79 --- /dev/null +++ b/Sources/Services/AWSInspector2/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class Inspector2ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Inspector2Client.Inspector2ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Inspector2Client.Inspector2ClientConfiguration { + config.authSchemeResolver = DefaultInspector2AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class Inspector2ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: Inspector2AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Inspector2Client.Inspector2ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSInspectorScan/InspectorScanClient.swift b/Sources/Services/AWSInspectorScan/InspectorScanClient.swift index ed05130cea8..863378739fe 100644 --- a/Sources/Services/AWSInspectorScan/InspectorScanClient.swift +++ b/Sources/Services/AWSInspectorScan/InspectorScanClient.swift @@ -117,7 +117,8 @@ extension InspectorScanClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct InspectorScanClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? InspectorScanClient.InspectorScanClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension InspectorScanClient { /// Performs the `ScanSbom` operation on the `InspectorScan` service. /// diff --git a/Sources/Services/AWSInspectorScan/Plugins.swift b/Sources/Services/AWSInspectorScan/Plugins.swift new file mode 100644 index 00000000000..cb1a3d03c28 --- /dev/null +++ b/Sources/Services/AWSInspectorScan/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class InspectorScanClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? InspectorScanClient.InspectorScanClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? InspectorScanClient.InspectorScanClientConfiguration { + config.authSchemeResolver = DefaultInspectorScanAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class InspectorScanClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: InspectorScanAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? InspectorScanClient.InspectorScanClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSInternetMonitor/InternetMonitorClient.swift b/Sources/Services/AWSInternetMonitor/InternetMonitorClient.swift index a379b7ace00..90742dca092 100644 --- a/Sources/Services/AWSInternetMonitor/InternetMonitorClient.swift +++ b/Sources/Services/AWSInternetMonitor/InternetMonitorClient.swift @@ -117,7 +117,8 @@ extension InternetMonitorClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct InternetMonitorClientLogHandlerFactory: ClientRuntime.SDKLogHandle } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? InternetMonitorClient.InternetMonitorClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension InternetMonitorClient { /// Performs the `CreateMonitor` operation on the `InternetMonitor20210603` service. /// diff --git a/Sources/Services/AWSInternetMonitor/Plugins.swift b/Sources/Services/AWSInternetMonitor/Plugins.swift new file mode 100644 index 00000000000..40da1fbe5a7 --- /dev/null +++ b/Sources/Services/AWSInternetMonitor/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class InternetMonitorClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? InternetMonitorClient.InternetMonitorClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? InternetMonitorClient.InternetMonitorClientConfiguration { + config.authSchemeResolver = DefaultInternetMonitorAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class InternetMonitorClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: InternetMonitorAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? InternetMonitorClient.InternetMonitorClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIoT/IoTClient.swift b/Sources/Services/AWSIoT/IoTClient.swift index 54280d54634..450cd5416f0 100644 --- a/Sources/Services/AWSIoT/IoTClient.swift +++ b/Sources/Services/AWSIoT/IoTClient.swift @@ -117,7 +117,8 @@ extension IoTClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IoTClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IoTClient.IoTClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IoTClient { /// Performs the `AcceptCertificateTransfer` operation on the `AWSIotService` service. /// diff --git a/Sources/Services/AWSIoT/Plugins.swift b/Sources/Services/AWSIoT/Plugins.swift new file mode 100644 index 00000000000..b67431b799e --- /dev/null +++ b/Sources/Services/AWSIoT/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IoTClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTClient.IoTClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTClient.IoTClientConfiguration { + config.authSchemeResolver = DefaultIoTAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IoTClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IoTAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTClient.IoTClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIoT1ClickDevicesService/IoT1ClickDevicesClient.swift b/Sources/Services/AWSIoT1ClickDevicesService/IoT1ClickDevicesClient.swift index a17e80c1e1e..84c947bf283 100644 --- a/Sources/Services/AWSIoT1ClickDevicesService/IoT1ClickDevicesClient.swift +++ b/Sources/Services/AWSIoT1ClickDevicesService/IoT1ClickDevicesClient.swift @@ -117,7 +117,8 @@ extension IoT1ClickDevicesClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IoT1ClickDevicesClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IoT1ClickDevicesClient.IoT1ClickDevicesClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IoT1ClickDevicesClient { /// Performs the `ClaimDevicesByClaimCode` operation on the `IoT1ClickDevicesService` service. /// diff --git a/Sources/Services/AWSIoT1ClickDevicesService/Plugins.swift b/Sources/Services/AWSIoT1ClickDevicesService/Plugins.swift new file mode 100644 index 00000000000..7afa08a725b --- /dev/null +++ b/Sources/Services/AWSIoT1ClickDevicesService/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IoT1ClickDevicesClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoT1ClickDevicesClient.IoT1ClickDevicesClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoT1ClickDevicesClient.IoT1ClickDevicesClientConfiguration { + config.authSchemeResolver = DefaultIoT1ClickDevicesServiceAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IoT1ClickDevicesClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IoT1ClickDevicesServiceAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoT1ClickDevicesClient.IoT1ClickDevicesClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIoT1ClickProjects/IoT1ClickProjectsClient.swift b/Sources/Services/AWSIoT1ClickProjects/IoT1ClickProjectsClient.swift index f60811a861a..2fde9d61433 100644 --- a/Sources/Services/AWSIoT1ClickProjects/IoT1ClickProjectsClient.swift +++ b/Sources/Services/AWSIoT1ClickProjects/IoT1ClickProjectsClient.swift @@ -117,7 +117,8 @@ extension IoT1ClickProjectsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IoT1ClickProjectsClientLogHandlerFactory: ClientRuntime.SDKLogHand } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IoT1ClickProjectsClient.IoT1ClickProjectsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IoT1ClickProjectsClient { /// Performs the `AssociateDeviceWithPlacement` operation on the `AWSIoT1ClickProjects` service. /// diff --git a/Sources/Services/AWSIoT1ClickProjects/Plugins.swift b/Sources/Services/AWSIoT1ClickProjects/Plugins.swift new file mode 100644 index 00000000000..4d9eeba79b2 --- /dev/null +++ b/Sources/Services/AWSIoT1ClickProjects/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IoT1ClickProjectsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoT1ClickProjectsClient.IoT1ClickProjectsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoT1ClickProjectsClient.IoT1ClickProjectsClientConfiguration { + config.authSchemeResolver = DefaultIoT1ClickProjectsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IoT1ClickProjectsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IoT1ClickProjectsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoT1ClickProjectsClient.IoT1ClickProjectsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIoTAnalytics/IoTAnalyticsClient.swift b/Sources/Services/AWSIoTAnalytics/IoTAnalyticsClient.swift index 368a1f9887c..c10fedba91d 100644 --- a/Sources/Services/AWSIoTAnalytics/IoTAnalyticsClient.swift +++ b/Sources/Services/AWSIoTAnalytics/IoTAnalyticsClient.swift @@ -117,7 +117,8 @@ extension IoTAnalyticsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IoTAnalyticsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IoTAnalyticsClient.IoTAnalyticsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IoTAnalyticsClient { /// Performs the `BatchPutMessage` operation on the `AWSIoTAnalytics` service. /// diff --git a/Sources/Services/AWSIoTAnalytics/Plugins.swift b/Sources/Services/AWSIoTAnalytics/Plugins.swift new file mode 100644 index 00000000000..16c1a2c79c7 --- /dev/null +++ b/Sources/Services/AWSIoTAnalytics/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IoTAnalyticsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTAnalyticsClient.IoTAnalyticsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTAnalyticsClient.IoTAnalyticsClientConfiguration { + config.authSchemeResolver = DefaultIoTAnalyticsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IoTAnalyticsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IoTAnalyticsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTAnalyticsClient.IoTAnalyticsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIoTDataPlane/IoTDataPlaneClient.swift b/Sources/Services/AWSIoTDataPlane/IoTDataPlaneClient.swift index 630e56932b2..7c4df525192 100644 --- a/Sources/Services/AWSIoTDataPlane/IoTDataPlaneClient.swift +++ b/Sources/Services/AWSIoTDataPlane/IoTDataPlaneClient.swift @@ -117,7 +117,8 @@ extension IoTDataPlaneClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IoTDataPlaneClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IoTDataPlaneClient.IoTDataPlaneClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IoTDataPlaneClient { /// Performs the `DeleteThingShadow` operation on the `IotMoonrakerService` service. /// diff --git a/Sources/Services/AWSIoTDataPlane/Plugins.swift b/Sources/Services/AWSIoTDataPlane/Plugins.swift new file mode 100644 index 00000000000..87dbc48b9ff --- /dev/null +++ b/Sources/Services/AWSIoTDataPlane/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IoTDataPlaneClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTDataPlaneClient.IoTDataPlaneClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTDataPlaneClient.IoTDataPlaneClientConfiguration { + config.authSchemeResolver = DefaultIoTDataPlaneAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IoTDataPlaneClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IoTDataPlaneAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTDataPlaneClient.IoTDataPlaneClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIoTEvents/IoTEventsClient.swift b/Sources/Services/AWSIoTEvents/IoTEventsClient.swift index ec344eeb7c2..4cd167ca13a 100644 --- a/Sources/Services/AWSIoTEvents/IoTEventsClient.swift +++ b/Sources/Services/AWSIoTEvents/IoTEventsClient.swift @@ -117,7 +117,8 @@ extension IoTEventsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IoTEventsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IoTEventsClient.IoTEventsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IoTEventsClient { /// Performs the `CreateAlarmModel` operation on the `IotColumboService` service. /// diff --git a/Sources/Services/AWSIoTEvents/Plugins.swift b/Sources/Services/AWSIoTEvents/Plugins.swift new file mode 100644 index 00000000000..8f151ee4c5d --- /dev/null +++ b/Sources/Services/AWSIoTEvents/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IoTEventsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTEventsClient.IoTEventsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTEventsClient.IoTEventsClientConfiguration { + config.authSchemeResolver = DefaultIoTEventsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IoTEventsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IoTEventsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTEventsClient.IoTEventsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIoTEventsData/IoTEventsDataClient.swift b/Sources/Services/AWSIoTEventsData/IoTEventsDataClient.swift index 6aadfdf5fb2..75cc3250cb6 100644 --- a/Sources/Services/AWSIoTEventsData/IoTEventsDataClient.swift +++ b/Sources/Services/AWSIoTEventsData/IoTEventsDataClient.swift @@ -117,7 +117,8 @@ extension IoTEventsDataClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IoTEventsDataClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IoTEventsDataClient.IoTEventsDataClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IoTEventsDataClient { /// Performs the `BatchAcknowledgeAlarm` operation on the `IotColumboDataService` service. /// diff --git a/Sources/Services/AWSIoTEventsData/Plugins.swift b/Sources/Services/AWSIoTEventsData/Plugins.swift new file mode 100644 index 00000000000..476589ae654 --- /dev/null +++ b/Sources/Services/AWSIoTEventsData/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IoTEventsDataClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTEventsDataClient.IoTEventsDataClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTEventsDataClient.IoTEventsDataClientConfiguration { + config.authSchemeResolver = DefaultIoTEventsDataAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IoTEventsDataClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IoTEventsDataAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTEventsDataClient.IoTEventsDataClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIoTFleetHub/IoTFleetHubClient.swift b/Sources/Services/AWSIoTFleetHub/IoTFleetHubClient.swift index 42aba7f5eb3..757493049a6 100644 --- a/Sources/Services/AWSIoTFleetHub/IoTFleetHubClient.swift +++ b/Sources/Services/AWSIoTFleetHub/IoTFleetHubClient.swift @@ -117,7 +117,8 @@ extension IoTFleetHubClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IoTFleetHubClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IoTFleetHubClient.IoTFleetHubClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IoTFleetHubClient { /// Performs the `CreateApplication` operation on the `AWSIoTFleetHub` service. /// diff --git a/Sources/Services/AWSIoTFleetHub/Plugins.swift b/Sources/Services/AWSIoTFleetHub/Plugins.swift new file mode 100644 index 00000000000..017f16c9b59 --- /dev/null +++ b/Sources/Services/AWSIoTFleetHub/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IoTFleetHubClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTFleetHubClient.IoTFleetHubClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTFleetHubClient.IoTFleetHubClientConfiguration { + config.authSchemeResolver = DefaultIoTFleetHubAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IoTFleetHubClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IoTFleetHubAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTFleetHubClient.IoTFleetHubClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIoTFleetWise/IoTFleetWiseClient.swift b/Sources/Services/AWSIoTFleetWise/IoTFleetWiseClient.swift index 9bf4b8696a1..ea8dd09c90e 100644 --- a/Sources/Services/AWSIoTFleetWise/IoTFleetWiseClient.swift +++ b/Sources/Services/AWSIoTFleetWise/IoTFleetWiseClient.swift @@ -117,7 +117,8 @@ extension IoTFleetWiseClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IoTFleetWiseClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IoTFleetWiseClient.IoTFleetWiseClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IoTFleetWiseClient { /// Performs the `AssociateVehicleFleet` operation on the `IoTAutobahnControlPlane` service. /// diff --git a/Sources/Services/AWSIoTFleetWise/Plugins.swift b/Sources/Services/AWSIoTFleetWise/Plugins.swift new file mode 100644 index 00000000000..919700aba41 --- /dev/null +++ b/Sources/Services/AWSIoTFleetWise/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IoTFleetWiseClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTFleetWiseClient.IoTFleetWiseClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTFleetWiseClient.IoTFleetWiseClientConfiguration { + config.authSchemeResolver = DefaultIoTFleetWiseAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IoTFleetWiseClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IoTFleetWiseAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTFleetWiseClient.IoTFleetWiseClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIoTJobsDataPlane/IoTJobsDataPlaneClient.swift b/Sources/Services/AWSIoTJobsDataPlane/IoTJobsDataPlaneClient.swift index a8cf85b6562..e01cd2c1a54 100644 --- a/Sources/Services/AWSIoTJobsDataPlane/IoTJobsDataPlaneClient.swift +++ b/Sources/Services/AWSIoTJobsDataPlane/IoTJobsDataPlaneClient.swift @@ -117,7 +117,8 @@ extension IoTJobsDataPlaneClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IoTJobsDataPlaneClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IoTJobsDataPlaneClient.IoTJobsDataPlaneClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IoTJobsDataPlaneClient { /// Performs the `DescribeJobExecution` operation on the `IotLaserThingJobManagerExternalService` service. /// diff --git a/Sources/Services/AWSIoTJobsDataPlane/Plugins.swift b/Sources/Services/AWSIoTJobsDataPlane/Plugins.swift new file mode 100644 index 00000000000..3920f5cf900 --- /dev/null +++ b/Sources/Services/AWSIoTJobsDataPlane/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IoTJobsDataPlaneClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTJobsDataPlaneClient.IoTJobsDataPlaneClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTJobsDataPlaneClient.IoTJobsDataPlaneClientConfiguration { + config.authSchemeResolver = DefaultIoTJobsDataPlaneAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IoTJobsDataPlaneClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IoTJobsDataPlaneAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTJobsDataPlaneClient.IoTJobsDataPlaneClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIoTRoboRunner/IoTRoboRunnerClient.swift b/Sources/Services/AWSIoTRoboRunner/IoTRoboRunnerClient.swift index 1b9c415bdfa..8164da3bec8 100644 --- a/Sources/Services/AWSIoTRoboRunner/IoTRoboRunnerClient.swift +++ b/Sources/Services/AWSIoTRoboRunner/IoTRoboRunnerClient.swift @@ -117,7 +117,8 @@ extension IoTRoboRunnerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IoTRoboRunnerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IoTRoboRunnerClient.IoTRoboRunnerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IoTRoboRunnerClient { /// Performs the `CreateDestination` operation on the `IoTRoboRunner` service. /// diff --git a/Sources/Services/AWSIoTRoboRunner/Plugins.swift b/Sources/Services/AWSIoTRoboRunner/Plugins.swift new file mode 100644 index 00000000000..cda7536b524 --- /dev/null +++ b/Sources/Services/AWSIoTRoboRunner/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IoTRoboRunnerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTRoboRunnerClient.IoTRoboRunnerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTRoboRunnerClient.IoTRoboRunnerClientConfiguration { + config.authSchemeResolver = DefaultIoTRoboRunnerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IoTRoboRunnerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IoTRoboRunnerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTRoboRunnerClient.IoTRoboRunnerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIoTSecureTunneling/IoTSecureTunnelingClient.swift b/Sources/Services/AWSIoTSecureTunneling/IoTSecureTunnelingClient.swift index ed3f1ba05ca..45f37e9580e 100644 --- a/Sources/Services/AWSIoTSecureTunneling/IoTSecureTunnelingClient.swift +++ b/Sources/Services/AWSIoTSecureTunneling/IoTSecureTunnelingClient.swift @@ -117,7 +117,8 @@ extension IoTSecureTunnelingClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IoTSecureTunnelingClientLogHandlerFactory: ClientRuntime.SDKLogHan } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IoTSecureTunnelingClient.IoTSecureTunnelingClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IoTSecureTunnelingClient { /// Performs the `CloseTunnel` operation on the `IoTSecuredTunneling` service. /// diff --git a/Sources/Services/AWSIoTSecureTunneling/Plugins.swift b/Sources/Services/AWSIoTSecureTunneling/Plugins.swift new file mode 100644 index 00000000000..ece782c1e44 --- /dev/null +++ b/Sources/Services/AWSIoTSecureTunneling/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IoTSecureTunnelingClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTSecureTunnelingClient.IoTSecureTunnelingClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTSecureTunnelingClient.IoTSecureTunnelingClientConfiguration { + config.authSchemeResolver = DefaultIoTSecureTunnelingAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IoTSecureTunnelingClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IoTSecureTunnelingAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTSecureTunnelingClient.IoTSecureTunnelingClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIoTSiteWise/IoTSiteWiseClient.swift b/Sources/Services/AWSIoTSiteWise/IoTSiteWiseClient.swift index 7a153d8b3a1..b2e98826402 100644 --- a/Sources/Services/AWSIoTSiteWise/IoTSiteWiseClient.swift +++ b/Sources/Services/AWSIoTSiteWise/IoTSiteWiseClient.swift @@ -117,7 +117,8 @@ extension IoTSiteWiseClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IoTSiteWiseClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IoTSiteWiseClient.IoTSiteWiseClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IoTSiteWiseClient { /// Performs the `AssociateAssets` operation on the `AWSIoTSiteWise` service. /// diff --git a/Sources/Services/AWSIoTSiteWise/Plugins.swift b/Sources/Services/AWSIoTSiteWise/Plugins.swift new file mode 100644 index 00000000000..f3a390cc980 --- /dev/null +++ b/Sources/Services/AWSIoTSiteWise/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IoTSiteWiseClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTSiteWiseClient.IoTSiteWiseClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTSiteWiseClient.IoTSiteWiseClientConfiguration { + config.authSchemeResolver = DefaultIoTSiteWiseAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IoTSiteWiseClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IoTSiteWiseAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTSiteWiseClient.IoTSiteWiseClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIoTThingsGraph/IoTThingsGraphClient.swift b/Sources/Services/AWSIoTThingsGraph/IoTThingsGraphClient.swift index a2806d48f2a..79e767ef719 100644 --- a/Sources/Services/AWSIoTThingsGraph/IoTThingsGraphClient.swift +++ b/Sources/Services/AWSIoTThingsGraph/IoTThingsGraphClient.swift @@ -117,7 +117,8 @@ extension IoTThingsGraphClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IoTThingsGraphClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IoTThingsGraphClient.IoTThingsGraphClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IoTThingsGraphClient { /// Performs the `AssociateEntityToThing` operation on the `IotThingsGraphFrontEndService` service. /// diff --git a/Sources/Services/AWSIoTThingsGraph/Plugins.swift b/Sources/Services/AWSIoTThingsGraph/Plugins.swift new file mode 100644 index 00000000000..381343e884a --- /dev/null +++ b/Sources/Services/AWSIoTThingsGraph/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IoTThingsGraphClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTThingsGraphClient.IoTThingsGraphClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTThingsGraphClient.IoTThingsGraphClientConfiguration { + config.authSchemeResolver = DefaultIoTThingsGraphAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IoTThingsGraphClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IoTThingsGraphAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTThingsGraphClient.IoTThingsGraphClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIoTTwinMaker/IoTTwinMakerClient.swift b/Sources/Services/AWSIoTTwinMaker/IoTTwinMakerClient.swift index 465b10a05f7..38becf833f6 100644 --- a/Sources/Services/AWSIoTTwinMaker/IoTTwinMakerClient.swift +++ b/Sources/Services/AWSIoTTwinMaker/IoTTwinMakerClient.swift @@ -117,7 +117,8 @@ extension IoTTwinMakerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IoTTwinMakerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IoTTwinMakerClient.IoTTwinMakerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IoTTwinMakerClient { /// Performs the `BatchPutPropertyValues` operation on the `AWSIoTTwinMaker` service. /// diff --git a/Sources/Services/AWSIoTTwinMaker/Plugins.swift b/Sources/Services/AWSIoTTwinMaker/Plugins.swift new file mode 100644 index 00000000000..6bb001da55f --- /dev/null +++ b/Sources/Services/AWSIoTTwinMaker/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IoTTwinMakerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTTwinMakerClient.IoTTwinMakerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTTwinMakerClient.IoTTwinMakerClientConfiguration { + config.authSchemeResolver = DefaultIoTTwinMakerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IoTTwinMakerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IoTTwinMakerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTTwinMakerClient.IoTTwinMakerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIoTWireless/IoTWirelessClient.swift b/Sources/Services/AWSIoTWireless/IoTWirelessClient.swift index f5ed40a1798..01611d66642 100644 --- a/Sources/Services/AWSIoTWireless/IoTWirelessClient.swift +++ b/Sources/Services/AWSIoTWireless/IoTWirelessClient.swift @@ -117,7 +117,8 @@ extension IoTWirelessClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IoTWirelessClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IoTWirelessClient.IoTWirelessClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IoTWirelessClient { /// Performs the `AssociateAwsAccountWithPartnerAccount` operation on the `iotwireless` service. /// diff --git a/Sources/Services/AWSIoTWireless/Plugins.swift b/Sources/Services/AWSIoTWireless/Plugins.swift new file mode 100644 index 00000000000..da73fc681a1 --- /dev/null +++ b/Sources/Services/AWSIoTWireless/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IoTWirelessClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTWirelessClient.IoTWirelessClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTWirelessClient.IoTWirelessClientConfiguration { + config.authSchemeResolver = DefaultIoTWirelessAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IoTWirelessClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IoTWirelessAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IoTWirelessClient.IoTWirelessClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIotDeviceAdvisor/IotDeviceAdvisorClient.swift b/Sources/Services/AWSIotDeviceAdvisor/IotDeviceAdvisorClient.swift index ae938120d6e..81c62dd61f7 100644 --- a/Sources/Services/AWSIotDeviceAdvisor/IotDeviceAdvisorClient.swift +++ b/Sources/Services/AWSIotDeviceAdvisor/IotDeviceAdvisorClient.swift @@ -117,7 +117,8 @@ extension IotDeviceAdvisorClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IotDeviceAdvisorClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IotDeviceAdvisorClient.IotDeviceAdvisorClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IotDeviceAdvisorClient { /// Performs the `CreateSuiteDefinition` operation on the `IotSenateService` service. /// diff --git a/Sources/Services/AWSIotDeviceAdvisor/Plugins.swift b/Sources/Services/AWSIotDeviceAdvisor/Plugins.swift new file mode 100644 index 00000000000..7991726d71a --- /dev/null +++ b/Sources/Services/AWSIotDeviceAdvisor/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IotDeviceAdvisorClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IotDeviceAdvisorClient.IotDeviceAdvisorClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IotDeviceAdvisorClient.IotDeviceAdvisorClientConfiguration { + config.authSchemeResolver = DefaultIotDeviceAdvisorAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IotDeviceAdvisorClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IotDeviceAdvisorAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IotDeviceAdvisorClient.IotDeviceAdvisorClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIvs/IvsClient.swift b/Sources/Services/AWSIvs/IvsClient.swift index d83b3c5af39..9dde30c2e59 100644 --- a/Sources/Services/AWSIvs/IvsClient.swift +++ b/Sources/Services/AWSIvs/IvsClient.swift @@ -117,7 +117,8 @@ extension IvsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IvsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IvsClient.IvsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IvsClient { /// Performs the `BatchGetChannel` operation on the `AmazonInteractiveVideoService` service. /// diff --git a/Sources/Services/AWSIvs/Plugins.swift b/Sources/Services/AWSIvs/Plugins.swift new file mode 100644 index 00000000000..f0fc8cbfeef --- /dev/null +++ b/Sources/Services/AWSIvs/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IvsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IvsClient.IvsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IvsClient.IvsClientConfiguration { + config.authSchemeResolver = DefaultIvsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IvsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IvsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IvsClient.IvsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSIvschat/IvschatClient.swift b/Sources/Services/AWSIvschat/IvschatClient.swift index 607fa820bda..ffd0c774442 100644 --- a/Sources/Services/AWSIvschat/IvschatClient.swift +++ b/Sources/Services/AWSIvschat/IvschatClient.swift @@ -117,7 +117,8 @@ extension IvschatClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct IvschatClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? IvschatClient.IvschatClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension IvschatClient { /// Performs the `CreateChatToken` operation on the `AmazonInteractiveVideoServiceChat` service. /// diff --git a/Sources/Services/AWSIvschat/Plugins.swift b/Sources/Services/AWSIvschat/Plugins.swift new file mode 100644 index 00000000000..4864de544c3 --- /dev/null +++ b/Sources/Services/AWSIvschat/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class IvschatClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IvschatClient.IvschatClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IvschatClient.IvschatClientConfiguration { + config.authSchemeResolver = DefaultIvschatAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class IvschatClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: IvschatAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? IvschatClient.IvschatClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSKMS/KMSClient.swift b/Sources/Services/AWSKMS/KMSClient.swift index 6d20725f942..1077359738a 100644 --- a/Sources/Services/AWSKMS/KMSClient.swift +++ b/Sources/Services/AWSKMS/KMSClient.swift @@ -117,7 +117,8 @@ extension KMSClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct KMSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? KMSClient.KMSClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension KMSClient { /// Performs the `CancelKeyDeletion` operation on the `TrentService` service. /// diff --git a/Sources/Services/AWSKMS/Plugins.swift b/Sources/Services/AWSKMS/Plugins.swift new file mode 100644 index 00000000000..ab2831b491a --- /dev/null +++ b/Sources/Services/AWSKMS/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class KMSClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KMSClient.KMSClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KMSClient.KMSClientConfiguration { + config.authSchemeResolver = DefaultKMSAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class KMSClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: KMSAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KMSClient.KMSClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSKafka/KafkaClient.swift b/Sources/Services/AWSKafka/KafkaClient.swift index 55e2e013f3e..b8ce75b700b 100644 --- a/Sources/Services/AWSKafka/KafkaClient.swift +++ b/Sources/Services/AWSKafka/KafkaClient.swift @@ -117,7 +117,8 @@ extension KafkaClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct KafkaClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? KafkaClient.KafkaClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension KafkaClient { /// Performs the `BatchAssociateScramSecret` operation on the `Kafka` service. /// diff --git a/Sources/Services/AWSKafka/Plugins.swift b/Sources/Services/AWSKafka/Plugins.swift new file mode 100644 index 00000000000..5d1e7059ba9 --- /dev/null +++ b/Sources/Services/AWSKafka/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class KafkaClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KafkaClient.KafkaClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KafkaClient.KafkaClientConfiguration { + config.authSchemeResolver = DefaultKafkaAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class KafkaClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: KafkaAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KafkaClient.KafkaClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSKafkaConnect/KafkaConnectClient.swift b/Sources/Services/AWSKafkaConnect/KafkaConnectClient.swift index edec67d9b52..e5f4f13b9b7 100644 --- a/Sources/Services/AWSKafkaConnect/KafkaConnectClient.swift +++ b/Sources/Services/AWSKafkaConnect/KafkaConnectClient.swift @@ -117,7 +117,8 @@ extension KafkaConnectClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct KafkaConnectClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? KafkaConnectClient.KafkaConnectClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension KafkaConnectClient { /// Performs the `CreateConnector` operation on the `KafkaConnect` service. /// diff --git a/Sources/Services/AWSKafkaConnect/Plugins.swift b/Sources/Services/AWSKafkaConnect/Plugins.swift new file mode 100644 index 00000000000..0ea3cc31d43 --- /dev/null +++ b/Sources/Services/AWSKafkaConnect/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class KafkaConnectClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KafkaConnectClient.KafkaConnectClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KafkaConnectClient.KafkaConnectClientConfiguration { + config.authSchemeResolver = DefaultKafkaConnectAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class KafkaConnectClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: KafkaConnectAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KafkaConnectClient.KafkaConnectClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSKendra/KendraClient.swift b/Sources/Services/AWSKendra/KendraClient.swift index f372af38187..2b698ec9968 100644 --- a/Sources/Services/AWSKendra/KendraClient.swift +++ b/Sources/Services/AWSKendra/KendraClient.swift @@ -117,7 +117,8 @@ extension KendraClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct KendraClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? KendraClient.KendraClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension KendraClient { /// Performs the `AssociateEntitiesToExperience` operation on the `AWSKendraFrontendService` service. /// diff --git a/Sources/Services/AWSKendra/Plugins.swift b/Sources/Services/AWSKendra/Plugins.swift new file mode 100644 index 00000000000..be2d080d665 --- /dev/null +++ b/Sources/Services/AWSKendra/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class KendraClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KendraClient.KendraClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KendraClient.KendraClientConfiguration { + config.authSchemeResolver = DefaultKendraAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class KendraClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: KendraAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KendraClient.KendraClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSKendraRanking/KendraRankingClient.swift b/Sources/Services/AWSKendraRanking/KendraRankingClient.swift index f68406cf36c..dd966563e3a 100644 --- a/Sources/Services/AWSKendraRanking/KendraRankingClient.swift +++ b/Sources/Services/AWSKendraRanking/KendraRankingClient.swift @@ -117,7 +117,8 @@ extension KendraRankingClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct KendraRankingClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? KendraRankingClient.KendraRankingClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension KendraRankingClient { /// Performs the `CreateRescoreExecutionPlan` operation on the `AWSKendraRerankingFrontendService` service. /// diff --git a/Sources/Services/AWSKendraRanking/Plugins.swift b/Sources/Services/AWSKendraRanking/Plugins.swift new file mode 100644 index 00000000000..0328715f0af --- /dev/null +++ b/Sources/Services/AWSKendraRanking/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class KendraRankingClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KendraRankingClient.KendraRankingClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KendraRankingClient.KendraRankingClientConfiguration { + config.authSchemeResolver = DefaultKendraRankingAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class KendraRankingClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: KendraRankingAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KendraRankingClient.KendraRankingClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSKeyspaces/KeyspacesClient.swift b/Sources/Services/AWSKeyspaces/KeyspacesClient.swift index 6cd860b8115..49c1bd6c30c 100644 --- a/Sources/Services/AWSKeyspaces/KeyspacesClient.swift +++ b/Sources/Services/AWSKeyspaces/KeyspacesClient.swift @@ -117,7 +117,8 @@ extension KeyspacesClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct KeyspacesClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? KeyspacesClient.KeyspacesClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension KeyspacesClient { /// Performs the `CreateKeyspace` operation on the `KeyspacesService` service. /// diff --git a/Sources/Services/AWSKeyspaces/Plugins.swift b/Sources/Services/AWSKeyspaces/Plugins.swift new file mode 100644 index 00000000000..d2e527c2374 --- /dev/null +++ b/Sources/Services/AWSKeyspaces/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class KeyspacesClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KeyspacesClient.KeyspacesClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KeyspacesClient.KeyspacesClientConfiguration { + config.authSchemeResolver = DefaultKeyspacesAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class KeyspacesClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: KeyspacesAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KeyspacesClient.KeyspacesClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSKinesis/KinesisClient.swift b/Sources/Services/AWSKinesis/KinesisClient.swift index a5aba667b6a..6256c32cfb4 100644 --- a/Sources/Services/AWSKinesis/KinesisClient.swift +++ b/Sources/Services/AWSKinesis/KinesisClient.swift @@ -117,7 +117,8 @@ extension KinesisClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct KinesisClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? KinesisClient.KinesisClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension KinesisClient { /// Performs the `AddTagsToStream` operation on the `Kinesis_20131202` service. /// diff --git a/Sources/Services/AWSKinesis/Plugins.swift b/Sources/Services/AWSKinesis/Plugins.swift new file mode 100644 index 00000000000..baf2c97d556 --- /dev/null +++ b/Sources/Services/AWSKinesis/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class KinesisClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisClient.KinesisClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisClient.KinesisClientConfiguration { + config.authSchemeResolver = DefaultKinesisAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class KinesisClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: KinesisAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisClient.KinesisClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSKinesisAnalytics/KinesisAnalyticsClient.swift b/Sources/Services/AWSKinesisAnalytics/KinesisAnalyticsClient.swift index b9381005a0c..dbcd97f459c 100644 --- a/Sources/Services/AWSKinesisAnalytics/KinesisAnalyticsClient.swift +++ b/Sources/Services/AWSKinesisAnalytics/KinesisAnalyticsClient.swift @@ -117,7 +117,8 @@ extension KinesisAnalyticsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct KinesisAnalyticsClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? KinesisAnalyticsClient.KinesisAnalyticsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension KinesisAnalyticsClient { /// Performs the `AddApplicationCloudWatchLoggingOption` operation on the `KinesisAnalytics_20150814` service. /// diff --git a/Sources/Services/AWSKinesisAnalytics/Plugins.swift b/Sources/Services/AWSKinesisAnalytics/Plugins.swift new file mode 100644 index 00000000000..837ca9d7ced --- /dev/null +++ b/Sources/Services/AWSKinesisAnalytics/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class KinesisAnalyticsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisAnalyticsClient.KinesisAnalyticsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisAnalyticsClient.KinesisAnalyticsClientConfiguration { + config.authSchemeResolver = DefaultKinesisAnalyticsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class KinesisAnalyticsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: KinesisAnalyticsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisAnalyticsClient.KinesisAnalyticsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSKinesisAnalyticsV2/KinesisAnalyticsV2Client.swift b/Sources/Services/AWSKinesisAnalyticsV2/KinesisAnalyticsV2Client.swift index f1a31136d1d..c55d1ef671d 100644 --- a/Sources/Services/AWSKinesisAnalyticsV2/KinesisAnalyticsV2Client.swift +++ b/Sources/Services/AWSKinesisAnalyticsV2/KinesisAnalyticsV2Client.swift @@ -117,7 +117,8 @@ extension KinesisAnalyticsV2Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct KinesisAnalyticsV2ClientLogHandlerFactory: ClientRuntime.SDKLogHan } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? KinesisAnalyticsV2Client.KinesisAnalyticsV2ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension KinesisAnalyticsV2Client { /// Performs the `AddApplicationCloudWatchLoggingOption` operation on the `KinesisAnalytics_20180523` service. /// diff --git a/Sources/Services/AWSKinesisAnalyticsV2/Plugins.swift b/Sources/Services/AWSKinesisAnalyticsV2/Plugins.swift new file mode 100644 index 00000000000..214aab0b853 --- /dev/null +++ b/Sources/Services/AWSKinesisAnalyticsV2/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class KinesisAnalyticsV2ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisAnalyticsV2Client.KinesisAnalyticsV2ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisAnalyticsV2Client.KinesisAnalyticsV2ClientConfiguration { + config.authSchemeResolver = DefaultKinesisAnalyticsV2AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class KinesisAnalyticsV2ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: KinesisAnalyticsV2AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisAnalyticsV2Client.KinesisAnalyticsV2ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSKinesisVideo/KinesisVideoClient.swift b/Sources/Services/AWSKinesisVideo/KinesisVideoClient.swift index 3f8cd19b793..d9002e393dc 100644 --- a/Sources/Services/AWSKinesisVideo/KinesisVideoClient.swift +++ b/Sources/Services/AWSKinesisVideo/KinesisVideoClient.swift @@ -117,7 +117,8 @@ extension KinesisVideoClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct KinesisVideoClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? KinesisVideoClient.KinesisVideoClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension KinesisVideoClient { /// Performs the `CreateSignalingChannel` operation on the `KinesisVideo_20170930` service. /// diff --git a/Sources/Services/AWSKinesisVideo/Plugins.swift b/Sources/Services/AWSKinesisVideo/Plugins.swift new file mode 100644 index 00000000000..c8301beb088 --- /dev/null +++ b/Sources/Services/AWSKinesisVideo/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class KinesisVideoClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisVideoClient.KinesisVideoClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisVideoClient.KinesisVideoClientConfiguration { + config.authSchemeResolver = DefaultKinesisVideoAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class KinesisVideoClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: KinesisVideoAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisVideoClient.KinesisVideoClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClient.swift b/Sources/Services/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClient.swift index 423c80da915..64e896fe684 100644 --- a/Sources/Services/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClient.swift +++ b/Sources/Services/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClient.swift @@ -117,7 +117,8 @@ extension KinesisVideoArchivedMediaClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct KinesisVideoArchivedMediaClientLogHandlerFactory: ClientRuntime.SD } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? KinesisVideoArchivedMediaClient.KinesisVideoArchivedMediaClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension KinesisVideoArchivedMediaClient { /// Performs the `GetClip` operation on the `AWSAcuityReader` service. /// diff --git a/Sources/Services/AWSKinesisVideoArchivedMedia/Plugins.swift b/Sources/Services/AWSKinesisVideoArchivedMedia/Plugins.swift new file mode 100644 index 00000000000..ba516c9e278 --- /dev/null +++ b/Sources/Services/AWSKinesisVideoArchivedMedia/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class KinesisVideoArchivedMediaClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisVideoArchivedMediaClient.KinesisVideoArchivedMediaClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisVideoArchivedMediaClient.KinesisVideoArchivedMediaClientConfiguration { + config.authSchemeResolver = DefaultKinesisVideoArchivedMediaAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class KinesisVideoArchivedMediaClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: KinesisVideoArchivedMediaAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisVideoArchivedMediaClient.KinesisVideoArchivedMediaClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSKinesisVideoMedia/KinesisVideoMediaClient.swift b/Sources/Services/AWSKinesisVideoMedia/KinesisVideoMediaClient.swift index 0883087d4db..f86a126c72f 100644 --- a/Sources/Services/AWSKinesisVideoMedia/KinesisVideoMediaClient.swift +++ b/Sources/Services/AWSKinesisVideoMedia/KinesisVideoMediaClient.swift @@ -117,7 +117,8 @@ extension KinesisVideoMediaClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct KinesisVideoMediaClientLogHandlerFactory: ClientRuntime.SDKLogHand } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? KinesisVideoMediaClient.KinesisVideoMediaClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension KinesisVideoMediaClient { /// Performs the `GetMedia` operation on the `AWSAcuityInletService` service. /// diff --git a/Sources/Services/AWSKinesisVideoMedia/Plugins.swift b/Sources/Services/AWSKinesisVideoMedia/Plugins.swift new file mode 100644 index 00000000000..8fbb3dd991c --- /dev/null +++ b/Sources/Services/AWSKinesisVideoMedia/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class KinesisVideoMediaClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisVideoMediaClient.KinesisVideoMediaClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisVideoMediaClient.KinesisVideoMediaClientConfiguration { + config.authSchemeResolver = DefaultKinesisVideoMediaAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class KinesisVideoMediaClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: KinesisVideoMediaAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisVideoMediaClient.KinesisVideoMediaClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSKinesisVideoSignaling/KinesisVideoSignalingClient.swift b/Sources/Services/AWSKinesisVideoSignaling/KinesisVideoSignalingClient.swift index 1ea5f8b881d..cdc46eb3755 100644 --- a/Sources/Services/AWSKinesisVideoSignaling/KinesisVideoSignalingClient.swift +++ b/Sources/Services/AWSKinesisVideoSignaling/KinesisVideoSignalingClient.swift @@ -117,7 +117,8 @@ extension KinesisVideoSignalingClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct KinesisVideoSignalingClientLogHandlerFactory: ClientRuntime.SDKLog } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? KinesisVideoSignalingClient.KinesisVideoSignalingClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension KinesisVideoSignalingClient { /// Performs the `GetIceServerConfig` operation on the `AWSAcuitySignalingService` service. /// diff --git a/Sources/Services/AWSKinesisVideoSignaling/Plugins.swift b/Sources/Services/AWSKinesisVideoSignaling/Plugins.swift new file mode 100644 index 00000000000..f4adc75c234 --- /dev/null +++ b/Sources/Services/AWSKinesisVideoSignaling/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class KinesisVideoSignalingClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisVideoSignalingClient.KinesisVideoSignalingClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisVideoSignalingClient.KinesisVideoSignalingClientConfiguration { + config.authSchemeResolver = DefaultKinesisVideoSignalingAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class KinesisVideoSignalingClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: KinesisVideoSignalingAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisVideoSignalingClient.KinesisVideoSignalingClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSKinesisVideoWebRTCStorage/KinesisVideoWebRTCStorageClient.swift b/Sources/Services/AWSKinesisVideoWebRTCStorage/KinesisVideoWebRTCStorageClient.swift index 845bf6ee5d4..3e280b6c0d9 100644 --- a/Sources/Services/AWSKinesisVideoWebRTCStorage/KinesisVideoWebRTCStorageClient.swift +++ b/Sources/Services/AWSKinesisVideoWebRTCStorage/KinesisVideoWebRTCStorageClient.swift @@ -117,7 +117,8 @@ extension KinesisVideoWebRTCStorageClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct KinesisVideoWebRTCStorageClientLogHandlerFactory: ClientRuntime.SD } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? KinesisVideoWebRTCStorageClient.KinesisVideoWebRTCStorageClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension KinesisVideoWebRTCStorageClient { /// Performs the `JoinStorageSession` operation on the `AWSAcuityRoutingServiceLambda` service. /// diff --git a/Sources/Services/AWSKinesisVideoWebRTCStorage/Plugins.swift b/Sources/Services/AWSKinesisVideoWebRTCStorage/Plugins.swift new file mode 100644 index 00000000000..1fde399cf60 --- /dev/null +++ b/Sources/Services/AWSKinesisVideoWebRTCStorage/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class KinesisVideoWebRTCStorageClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisVideoWebRTCStorageClient.KinesisVideoWebRTCStorageClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisVideoWebRTCStorageClient.KinesisVideoWebRTCStorageClientConfiguration { + config.authSchemeResolver = DefaultKinesisVideoWebRTCStorageAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class KinesisVideoWebRTCStorageClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: KinesisVideoWebRTCStorageAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? KinesisVideoWebRTCStorageClient.KinesisVideoWebRTCStorageClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSLakeFormation/LakeFormationClient.swift b/Sources/Services/AWSLakeFormation/LakeFormationClient.swift index ed4fe9d0e73..29f75056f70 100644 --- a/Sources/Services/AWSLakeFormation/LakeFormationClient.swift +++ b/Sources/Services/AWSLakeFormation/LakeFormationClient.swift @@ -117,7 +117,8 @@ extension LakeFormationClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct LakeFormationClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? LakeFormationClient.LakeFormationClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension LakeFormationClient { /// Performs the `AddLFTagsToResource` operation on the `AWSLakeFormation` service. /// diff --git a/Sources/Services/AWSLakeFormation/Plugins.swift b/Sources/Services/AWSLakeFormation/Plugins.swift new file mode 100644 index 00000000000..bacb626ebc8 --- /dev/null +++ b/Sources/Services/AWSLakeFormation/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class LakeFormationClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LakeFormationClient.LakeFormationClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LakeFormationClient.LakeFormationClientConfiguration { + config.authSchemeResolver = DefaultLakeFormationAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class LakeFormationClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: LakeFormationAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LakeFormationClient.LakeFormationClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSLambda/LambdaClient.swift b/Sources/Services/AWSLambda/LambdaClient.swift index e6ed61909ca..66db4c3dace 100644 --- a/Sources/Services/AWSLambda/LambdaClient.swift +++ b/Sources/Services/AWSLambda/LambdaClient.swift @@ -117,7 +117,8 @@ extension LambdaClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct LambdaClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? LambdaClient.LambdaClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension LambdaClient { /// Performs the `AddLayerVersionPermission` operation on the `AWSGirApiService` service. /// diff --git a/Sources/Services/AWSLambda/Plugins.swift b/Sources/Services/AWSLambda/Plugins.swift new file mode 100644 index 00000000000..595e8498cd7 --- /dev/null +++ b/Sources/Services/AWSLambda/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class LambdaClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LambdaClient.LambdaClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LambdaClient.LambdaClientConfiguration { + config.authSchemeResolver = DefaultLambdaAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class LambdaClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: LambdaAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LambdaClient.LambdaClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSLaunchWizard/LaunchWizardClient.swift b/Sources/Services/AWSLaunchWizard/LaunchWizardClient.swift index e724fb7d290..0f393f45f85 100644 --- a/Sources/Services/AWSLaunchWizard/LaunchWizardClient.swift +++ b/Sources/Services/AWSLaunchWizard/LaunchWizardClient.swift @@ -117,7 +117,8 @@ extension LaunchWizardClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct LaunchWizardClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? LaunchWizardClient.LaunchWizardClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension LaunchWizardClient { /// Performs the `CreateDeployment` operation on the `LaunchWizard` service. /// diff --git a/Sources/Services/AWSLaunchWizard/Plugins.swift b/Sources/Services/AWSLaunchWizard/Plugins.swift new file mode 100644 index 00000000000..bb78daf3dbc --- /dev/null +++ b/Sources/Services/AWSLaunchWizard/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class LaunchWizardClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LaunchWizardClient.LaunchWizardClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LaunchWizardClient.LaunchWizardClientConfiguration { + config.authSchemeResolver = DefaultLaunchWizardAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class LaunchWizardClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: LaunchWizardAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LaunchWizardClient.LaunchWizardClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSLexModelBuildingService/LexModelBuildingClient.swift b/Sources/Services/AWSLexModelBuildingService/LexModelBuildingClient.swift index 6c4fc31fa8d..df08ad7744c 100644 --- a/Sources/Services/AWSLexModelBuildingService/LexModelBuildingClient.swift +++ b/Sources/Services/AWSLexModelBuildingService/LexModelBuildingClient.swift @@ -117,7 +117,8 @@ extension LexModelBuildingClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct LexModelBuildingClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? LexModelBuildingClient.LexModelBuildingClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension LexModelBuildingClient { /// Performs the `CreateBotVersion` operation on the `AWSDeepSenseModelBuildingService` service. /// diff --git a/Sources/Services/AWSLexModelBuildingService/Plugins.swift b/Sources/Services/AWSLexModelBuildingService/Plugins.swift new file mode 100644 index 00000000000..89fa4b2eeaf --- /dev/null +++ b/Sources/Services/AWSLexModelBuildingService/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class LexModelBuildingClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LexModelBuildingClient.LexModelBuildingClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LexModelBuildingClient.LexModelBuildingClientConfiguration { + config.authSchemeResolver = DefaultLexModelBuildingServiceAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class LexModelBuildingClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: LexModelBuildingServiceAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LexModelBuildingClient.LexModelBuildingClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSLexModelsV2/LexModelsV2Client.swift b/Sources/Services/AWSLexModelsV2/LexModelsV2Client.swift index 7398aa7f4f5..153f01132b1 100644 --- a/Sources/Services/AWSLexModelsV2/LexModelsV2Client.swift +++ b/Sources/Services/AWSLexModelsV2/LexModelsV2Client.swift @@ -117,7 +117,8 @@ extension LexModelsV2Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct LexModelsV2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? LexModelsV2Client.LexModelsV2ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension LexModelsV2Client { /// Performs the `BatchCreateCustomVocabularyItem` operation on the `LexModelBuildingServiceV2` service. /// diff --git a/Sources/Services/AWSLexModelsV2/Plugins.swift b/Sources/Services/AWSLexModelsV2/Plugins.swift new file mode 100644 index 00000000000..955dbde4f57 --- /dev/null +++ b/Sources/Services/AWSLexModelsV2/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class LexModelsV2ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LexModelsV2Client.LexModelsV2ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LexModelsV2Client.LexModelsV2ClientConfiguration { + config.authSchemeResolver = DefaultLexModelsV2AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class LexModelsV2ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: LexModelsV2AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LexModelsV2Client.LexModelsV2ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSLexRuntimeService/LexRuntimeClient.swift b/Sources/Services/AWSLexRuntimeService/LexRuntimeClient.swift index 372006e0ed5..49de0dca948 100644 --- a/Sources/Services/AWSLexRuntimeService/LexRuntimeClient.swift +++ b/Sources/Services/AWSLexRuntimeService/LexRuntimeClient.swift @@ -117,7 +117,8 @@ extension LexRuntimeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct LexRuntimeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? LexRuntimeClient.LexRuntimeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension LexRuntimeClient { /// Performs the `DeleteSession` operation on the `AWSDeepSenseRunTimeService` service. /// diff --git a/Sources/Services/AWSLexRuntimeService/Plugins.swift b/Sources/Services/AWSLexRuntimeService/Plugins.swift new file mode 100644 index 00000000000..be214cb5044 --- /dev/null +++ b/Sources/Services/AWSLexRuntimeService/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class LexRuntimeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LexRuntimeClient.LexRuntimeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LexRuntimeClient.LexRuntimeClientConfiguration { + config.authSchemeResolver = DefaultLexRuntimeServiceAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class LexRuntimeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: LexRuntimeServiceAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LexRuntimeClient.LexRuntimeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSLexRuntimeV2/LexRuntimeV2Client.swift b/Sources/Services/AWSLexRuntimeV2/LexRuntimeV2Client.swift index bfd6fc9b1fc..be85ed9e470 100644 --- a/Sources/Services/AWSLexRuntimeV2/LexRuntimeV2Client.swift +++ b/Sources/Services/AWSLexRuntimeV2/LexRuntimeV2Client.swift @@ -117,7 +117,8 @@ extension LexRuntimeV2Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct LexRuntimeV2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? LexRuntimeV2Client.LexRuntimeV2ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension LexRuntimeV2Client { /// Performs the `DeleteSession` operation on the `AWSDeepSenseRunTimeServiceApi2_0` service. /// diff --git a/Sources/Services/AWSLexRuntimeV2/Plugins.swift b/Sources/Services/AWSLexRuntimeV2/Plugins.swift new file mode 100644 index 00000000000..a6a7a75c299 --- /dev/null +++ b/Sources/Services/AWSLexRuntimeV2/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class LexRuntimeV2ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LexRuntimeV2Client.LexRuntimeV2ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LexRuntimeV2Client.LexRuntimeV2ClientConfiguration { + config.authSchemeResolver = DefaultLexRuntimeV2AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class LexRuntimeV2ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: LexRuntimeV2AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LexRuntimeV2Client.LexRuntimeV2ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSLicenseManager/LicenseManagerClient.swift b/Sources/Services/AWSLicenseManager/LicenseManagerClient.swift index 08c6658348f..bab055434ad 100644 --- a/Sources/Services/AWSLicenseManager/LicenseManagerClient.swift +++ b/Sources/Services/AWSLicenseManager/LicenseManagerClient.swift @@ -117,7 +117,8 @@ extension LicenseManagerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct LicenseManagerClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? LicenseManagerClient.LicenseManagerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension LicenseManagerClient { /// Performs the `AcceptGrant` operation on the `AWSLicenseManager` service. /// diff --git a/Sources/Services/AWSLicenseManager/Plugins.swift b/Sources/Services/AWSLicenseManager/Plugins.swift new file mode 100644 index 00000000000..a0ca89863d9 --- /dev/null +++ b/Sources/Services/AWSLicenseManager/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class LicenseManagerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LicenseManagerClient.LicenseManagerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LicenseManagerClient.LicenseManagerClientConfiguration { + config.authSchemeResolver = DefaultLicenseManagerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class LicenseManagerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: LicenseManagerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LicenseManagerClient.LicenseManagerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSLicenseManagerLinuxSubscriptions/LicenseManagerLinuxSubscriptionsClient.swift b/Sources/Services/AWSLicenseManagerLinuxSubscriptions/LicenseManagerLinuxSubscriptionsClient.swift index 5ebf278784b..a34d45ba73f 100644 --- a/Sources/Services/AWSLicenseManagerLinuxSubscriptions/LicenseManagerLinuxSubscriptionsClient.swift +++ b/Sources/Services/AWSLicenseManagerLinuxSubscriptions/LicenseManagerLinuxSubscriptionsClient.swift @@ -117,7 +117,8 @@ extension LicenseManagerLinuxSubscriptionsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct LicenseManagerLinuxSubscriptionsClientLogHandlerFactory: ClientRun } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? LicenseManagerLinuxSubscriptionsClient.LicenseManagerLinuxSubscriptionsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension LicenseManagerLinuxSubscriptionsClient { /// Performs the `GetServiceSettings` operation on the `LicenseManagerLinuxSubscriptions` service. /// diff --git a/Sources/Services/AWSLicenseManagerLinuxSubscriptions/Plugins.swift b/Sources/Services/AWSLicenseManagerLinuxSubscriptions/Plugins.swift new file mode 100644 index 00000000000..edb0dfec0c5 --- /dev/null +++ b/Sources/Services/AWSLicenseManagerLinuxSubscriptions/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class LicenseManagerLinuxSubscriptionsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LicenseManagerLinuxSubscriptionsClient.LicenseManagerLinuxSubscriptionsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LicenseManagerLinuxSubscriptionsClient.LicenseManagerLinuxSubscriptionsClientConfiguration { + config.authSchemeResolver = DefaultLicenseManagerLinuxSubscriptionsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class LicenseManagerLinuxSubscriptionsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: LicenseManagerLinuxSubscriptionsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LicenseManagerLinuxSubscriptionsClient.LicenseManagerLinuxSubscriptionsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSLicenseManagerUserSubscriptions/LicenseManagerUserSubscriptionsClient.swift b/Sources/Services/AWSLicenseManagerUserSubscriptions/LicenseManagerUserSubscriptionsClient.swift index cc89776eea1..428be74d388 100644 --- a/Sources/Services/AWSLicenseManagerUserSubscriptions/LicenseManagerUserSubscriptionsClient.swift +++ b/Sources/Services/AWSLicenseManagerUserSubscriptions/LicenseManagerUserSubscriptionsClient.swift @@ -117,7 +117,8 @@ extension LicenseManagerUserSubscriptionsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct LicenseManagerUserSubscriptionsClientLogHandlerFactory: ClientRunt } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? LicenseManagerUserSubscriptionsClient.LicenseManagerUserSubscriptionsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension LicenseManagerUserSubscriptionsClient { /// Performs the `AssociateUser` operation on the `LicenseManagerUserSubscriptions` service. /// diff --git a/Sources/Services/AWSLicenseManagerUserSubscriptions/Plugins.swift b/Sources/Services/AWSLicenseManagerUserSubscriptions/Plugins.swift new file mode 100644 index 00000000000..99a2b67ec2b --- /dev/null +++ b/Sources/Services/AWSLicenseManagerUserSubscriptions/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class LicenseManagerUserSubscriptionsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LicenseManagerUserSubscriptionsClient.LicenseManagerUserSubscriptionsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LicenseManagerUserSubscriptionsClient.LicenseManagerUserSubscriptionsClientConfiguration { + config.authSchemeResolver = DefaultLicenseManagerUserSubscriptionsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class LicenseManagerUserSubscriptionsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: LicenseManagerUserSubscriptionsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LicenseManagerUserSubscriptionsClient.LicenseManagerUserSubscriptionsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSLightsail/LightsailClient.swift b/Sources/Services/AWSLightsail/LightsailClient.swift index 03af7e50025..0b413adf896 100644 --- a/Sources/Services/AWSLightsail/LightsailClient.swift +++ b/Sources/Services/AWSLightsail/LightsailClient.swift @@ -117,7 +117,8 @@ extension LightsailClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct LightsailClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? LightsailClient.LightsailClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension LightsailClient { /// Performs the `AllocateStaticIp` operation on the `Lightsail_20161128` service. /// diff --git a/Sources/Services/AWSLightsail/Plugins.swift b/Sources/Services/AWSLightsail/Plugins.swift new file mode 100644 index 00000000000..14d0d7132bd --- /dev/null +++ b/Sources/Services/AWSLightsail/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class LightsailClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LightsailClient.LightsailClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LightsailClient.LightsailClientConfiguration { + config.authSchemeResolver = DefaultLightsailAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class LightsailClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: LightsailAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LightsailClient.LightsailClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSLocation/LocationClient.swift b/Sources/Services/AWSLocation/LocationClient.swift index a5024642935..501852b41d9 100644 --- a/Sources/Services/AWSLocation/LocationClient.swift +++ b/Sources/Services/AWSLocation/LocationClient.swift @@ -117,7 +117,8 @@ extension LocationClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct LocationClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? LocationClient.LocationClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension LocationClient { /// Performs the `AssociateTrackerConsumer` operation on the `LocationService` service. /// diff --git a/Sources/Services/AWSLocation/Plugins.swift b/Sources/Services/AWSLocation/Plugins.swift new file mode 100644 index 00000000000..c9e58d75ec9 --- /dev/null +++ b/Sources/Services/AWSLocation/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class LocationClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LocationClient.LocationClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LocationClient.LocationClientConfiguration { + config.authSchemeResolver = DefaultLocationAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class LocationClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: LocationAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LocationClient.LocationClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSLookoutEquipment/LookoutEquipmentClient.swift b/Sources/Services/AWSLookoutEquipment/LookoutEquipmentClient.swift index e2722ad66c9..01876fa95e8 100644 --- a/Sources/Services/AWSLookoutEquipment/LookoutEquipmentClient.swift +++ b/Sources/Services/AWSLookoutEquipment/LookoutEquipmentClient.swift @@ -117,7 +117,8 @@ extension LookoutEquipmentClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct LookoutEquipmentClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? LookoutEquipmentClient.LookoutEquipmentClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension LookoutEquipmentClient { /// Performs the `CreateDataset` operation on the `AWSLookoutEquipmentFrontendService` service. /// diff --git a/Sources/Services/AWSLookoutEquipment/Plugins.swift b/Sources/Services/AWSLookoutEquipment/Plugins.swift new file mode 100644 index 00000000000..568110dbb9d --- /dev/null +++ b/Sources/Services/AWSLookoutEquipment/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class LookoutEquipmentClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LookoutEquipmentClient.LookoutEquipmentClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LookoutEquipmentClient.LookoutEquipmentClientConfiguration { + config.authSchemeResolver = DefaultLookoutEquipmentAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class LookoutEquipmentClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: LookoutEquipmentAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LookoutEquipmentClient.LookoutEquipmentClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSLookoutMetrics/LookoutMetricsClient.swift b/Sources/Services/AWSLookoutMetrics/LookoutMetricsClient.swift index 48a8cb1b5e6..7bf987f5274 100644 --- a/Sources/Services/AWSLookoutMetrics/LookoutMetricsClient.swift +++ b/Sources/Services/AWSLookoutMetrics/LookoutMetricsClient.swift @@ -117,7 +117,8 @@ extension LookoutMetricsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct LookoutMetricsClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? LookoutMetricsClient.LookoutMetricsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension LookoutMetricsClient { /// Performs the `ActivateAnomalyDetector` operation on the `LookoutMetrics` service. /// diff --git a/Sources/Services/AWSLookoutMetrics/Plugins.swift b/Sources/Services/AWSLookoutMetrics/Plugins.swift new file mode 100644 index 00000000000..f5f5629d62f --- /dev/null +++ b/Sources/Services/AWSLookoutMetrics/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class LookoutMetricsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LookoutMetricsClient.LookoutMetricsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LookoutMetricsClient.LookoutMetricsClientConfiguration { + config.authSchemeResolver = DefaultLookoutMetricsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class LookoutMetricsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: LookoutMetricsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LookoutMetricsClient.LookoutMetricsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSLookoutVision/LookoutVisionClient.swift b/Sources/Services/AWSLookoutVision/LookoutVisionClient.swift index ce0c899c3b6..f94ced03422 100644 --- a/Sources/Services/AWSLookoutVision/LookoutVisionClient.swift +++ b/Sources/Services/AWSLookoutVision/LookoutVisionClient.swift @@ -117,7 +117,8 @@ extension LookoutVisionClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct LookoutVisionClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? LookoutVisionClient.LookoutVisionClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension LookoutVisionClient { /// Performs the `CreateDataset` operation on the `LookoutVisionService` service. /// diff --git a/Sources/Services/AWSLookoutVision/Plugins.swift b/Sources/Services/AWSLookoutVision/Plugins.swift new file mode 100644 index 00000000000..dfec03793b0 --- /dev/null +++ b/Sources/Services/AWSLookoutVision/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class LookoutVisionClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LookoutVisionClient.LookoutVisionClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LookoutVisionClient.LookoutVisionClientConfiguration { + config.authSchemeResolver = DefaultLookoutVisionAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class LookoutVisionClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: LookoutVisionAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? LookoutVisionClient.LookoutVisionClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSM2/M2Client.swift b/Sources/Services/AWSM2/M2Client.swift index 72cc2d34a03..b81daabd6c8 100644 --- a/Sources/Services/AWSM2/M2Client.swift +++ b/Sources/Services/AWSM2/M2Client.swift @@ -117,7 +117,8 @@ extension M2Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct M2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? M2Client.M2ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension M2Client { /// Performs the `CancelBatchJobExecution` operation on the `AwsSupernovaControlPlaneService` service. /// diff --git a/Sources/Services/AWSM2/Plugins.swift b/Sources/Services/AWSM2/Plugins.swift new file mode 100644 index 00000000000..779307be802 --- /dev/null +++ b/Sources/Services/AWSM2/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class M2ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? M2Client.M2ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? M2Client.M2ClientConfiguration { + config.authSchemeResolver = DefaultM2AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class M2ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: M2AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? M2Client.M2ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMTurk/MTurkClient.swift b/Sources/Services/AWSMTurk/MTurkClient.swift index 555b269ff82..b4dd8450822 100644 --- a/Sources/Services/AWSMTurk/MTurkClient.swift +++ b/Sources/Services/AWSMTurk/MTurkClient.swift @@ -117,7 +117,8 @@ extension MTurkClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MTurkClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MTurkClient.MTurkClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MTurkClient { /// Performs the `AcceptQualificationRequest` operation on the `MTurkRequesterServiceV20170117` service. /// diff --git a/Sources/Services/AWSMTurk/Plugins.swift b/Sources/Services/AWSMTurk/Plugins.swift new file mode 100644 index 00000000000..3c699c36e64 --- /dev/null +++ b/Sources/Services/AWSMTurk/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MTurkClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MTurkClient.MTurkClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MTurkClient.MTurkClientConfiguration { + config.authSchemeResolver = DefaultMTurkAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MTurkClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MTurkAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MTurkClient.MTurkClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMWAA/MWAAClient.swift b/Sources/Services/AWSMWAA/MWAAClient.swift index 6b6ebf6e806..18f79c0ac11 100644 --- a/Sources/Services/AWSMWAA/MWAAClient.swift +++ b/Sources/Services/AWSMWAA/MWAAClient.swift @@ -117,7 +117,8 @@ extension MWAAClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MWAAClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MWAAClient.MWAAClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MWAAClient { /// Performs the `CreateCliToken` operation on the `AmazonMWAA` service. /// diff --git a/Sources/Services/AWSMWAA/Plugins.swift b/Sources/Services/AWSMWAA/Plugins.swift new file mode 100644 index 00000000000..6077268152f --- /dev/null +++ b/Sources/Services/AWSMWAA/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MWAAClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MWAAClient.MWAAClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MWAAClient.MWAAClientConfiguration { + config.authSchemeResolver = DefaultMWAAAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MWAAClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MWAAAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MWAAClient.MWAAClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMachineLearning/MachineLearningClient.swift b/Sources/Services/AWSMachineLearning/MachineLearningClient.swift index 526c2cba6ef..2c43c02eeb6 100644 --- a/Sources/Services/AWSMachineLearning/MachineLearningClient.swift +++ b/Sources/Services/AWSMachineLearning/MachineLearningClient.swift @@ -117,7 +117,8 @@ extension MachineLearningClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MachineLearningClientLogHandlerFactory: ClientRuntime.SDKLogHandle } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MachineLearningClient.MachineLearningClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MachineLearningClient { /// Performs the `AddTags` operation on the `AmazonML_20141212` service. /// diff --git a/Sources/Services/AWSMachineLearning/Plugins.swift b/Sources/Services/AWSMachineLearning/Plugins.swift new file mode 100644 index 00000000000..6129078c5c5 --- /dev/null +++ b/Sources/Services/AWSMachineLearning/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MachineLearningClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MachineLearningClient.MachineLearningClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MachineLearningClient.MachineLearningClientConfiguration { + config.authSchemeResolver = DefaultMachineLearningAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MachineLearningClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MachineLearningAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MachineLearningClient.MachineLearningClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMacie2/Macie2Client.swift b/Sources/Services/AWSMacie2/Macie2Client.swift index 1e3669e205f..31804644c12 100644 --- a/Sources/Services/AWSMacie2/Macie2Client.swift +++ b/Sources/Services/AWSMacie2/Macie2Client.swift @@ -117,7 +117,8 @@ extension Macie2Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct Macie2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? Macie2Client.Macie2ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension Macie2Client { /// Performs the `AcceptInvitation` operation on the `Macie2` service. /// diff --git a/Sources/Services/AWSMacie2/Plugins.swift b/Sources/Services/AWSMacie2/Plugins.swift new file mode 100644 index 00000000000..fd7a2f66f14 --- /dev/null +++ b/Sources/Services/AWSMacie2/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class Macie2ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Macie2Client.Macie2ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Macie2Client.Macie2ClientConfiguration { + config.authSchemeResolver = DefaultMacie2AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class Macie2ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: Macie2AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Macie2Client.Macie2ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSManagedBlockchain/ManagedBlockchainClient.swift b/Sources/Services/AWSManagedBlockchain/ManagedBlockchainClient.swift index 75a2c5312c1..60ea64865c9 100644 --- a/Sources/Services/AWSManagedBlockchain/ManagedBlockchainClient.swift +++ b/Sources/Services/AWSManagedBlockchain/ManagedBlockchainClient.swift @@ -117,7 +117,8 @@ extension ManagedBlockchainClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ManagedBlockchainClientLogHandlerFactory: ClientRuntime.SDKLogHand } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ManagedBlockchainClient.ManagedBlockchainClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ManagedBlockchainClient { /// Performs the `CreateAccessor` operation on the `TaigaWebService` service. /// diff --git a/Sources/Services/AWSManagedBlockchain/Plugins.swift b/Sources/Services/AWSManagedBlockchain/Plugins.swift new file mode 100644 index 00000000000..5ea6b37b173 --- /dev/null +++ b/Sources/Services/AWSManagedBlockchain/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ManagedBlockchainClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ManagedBlockchainClient.ManagedBlockchainClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ManagedBlockchainClient.ManagedBlockchainClientConfiguration { + config.authSchemeResolver = DefaultManagedBlockchainAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ManagedBlockchainClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ManagedBlockchainAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ManagedBlockchainClient.ManagedBlockchainClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSManagedBlockchainQuery/ManagedBlockchainQueryClient.swift b/Sources/Services/AWSManagedBlockchainQuery/ManagedBlockchainQueryClient.swift index 8fea01f1807..7b899c06f69 100644 --- a/Sources/Services/AWSManagedBlockchainQuery/ManagedBlockchainQueryClient.swift +++ b/Sources/Services/AWSManagedBlockchainQuery/ManagedBlockchainQueryClient.swift @@ -117,7 +117,8 @@ extension ManagedBlockchainQueryClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ManagedBlockchainQueryClientLogHandlerFactory: ClientRuntime.SDKLo } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ManagedBlockchainQueryClient.ManagedBlockchainQueryClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ManagedBlockchainQueryClient { /// Performs the `BatchGetTokenBalance` operation on the `TietonChainQueryService` service. /// diff --git a/Sources/Services/AWSManagedBlockchainQuery/Plugins.swift b/Sources/Services/AWSManagedBlockchainQuery/Plugins.swift new file mode 100644 index 00000000000..dee6c1f4ab1 --- /dev/null +++ b/Sources/Services/AWSManagedBlockchainQuery/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ManagedBlockchainQueryClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ManagedBlockchainQueryClient.ManagedBlockchainQueryClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ManagedBlockchainQueryClient.ManagedBlockchainQueryClientConfiguration { + config.authSchemeResolver = DefaultManagedBlockchainQueryAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ManagedBlockchainQueryClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ManagedBlockchainQueryAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ManagedBlockchainQueryClient.ManagedBlockchainQueryClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMarketplaceAgreement/MarketplaceAgreementClient.swift b/Sources/Services/AWSMarketplaceAgreement/MarketplaceAgreementClient.swift index bfc31a23583..ae5d9308bbe 100644 --- a/Sources/Services/AWSMarketplaceAgreement/MarketplaceAgreementClient.swift +++ b/Sources/Services/AWSMarketplaceAgreement/MarketplaceAgreementClient.swift @@ -117,7 +117,8 @@ extension MarketplaceAgreementClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MarketplaceAgreementClientLogHandlerFactory: ClientRuntime.SDKLogH } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MarketplaceAgreementClient.MarketplaceAgreementClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MarketplaceAgreementClient { /// Performs the `DescribeAgreement` operation on the `AWSMPCommerceService_v20200301` service. /// diff --git a/Sources/Services/AWSMarketplaceAgreement/Plugins.swift b/Sources/Services/AWSMarketplaceAgreement/Plugins.swift new file mode 100644 index 00000000000..3729e531d53 --- /dev/null +++ b/Sources/Services/AWSMarketplaceAgreement/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MarketplaceAgreementClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceAgreementClient.MarketplaceAgreementClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceAgreementClient.MarketplaceAgreementClientConfiguration { + config.authSchemeResolver = DefaultMarketplaceAgreementAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MarketplaceAgreementClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MarketplaceAgreementAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceAgreementClient.MarketplaceAgreementClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMarketplaceCatalog/MarketplaceCatalogClient.swift b/Sources/Services/AWSMarketplaceCatalog/MarketplaceCatalogClient.swift index cd27f2eb7ce..0a7367e1994 100644 --- a/Sources/Services/AWSMarketplaceCatalog/MarketplaceCatalogClient.swift +++ b/Sources/Services/AWSMarketplaceCatalog/MarketplaceCatalogClient.swift @@ -117,7 +117,8 @@ extension MarketplaceCatalogClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MarketplaceCatalogClientLogHandlerFactory: ClientRuntime.SDKLogHan } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MarketplaceCatalogClient.MarketplaceCatalogClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MarketplaceCatalogClient { /// Performs the `BatchDescribeEntities` operation on the `AWSMPSeymour` service. /// diff --git a/Sources/Services/AWSMarketplaceCatalog/Plugins.swift b/Sources/Services/AWSMarketplaceCatalog/Plugins.swift new file mode 100644 index 00000000000..795cd667354 --- /dev/null +++ b/Sources/Services/AWSMarketplaceCatalog/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MarketplaceCatalogClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceCatalogClient.MarketplaceCatalogClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceCatalogClient.MarketplaceCatalogClientConfiguration { + config.authSchemeResolver = DefaultMarketplaceCatalogAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MarketplaceCatalogClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MarketplaceCatalogAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceCatalogClient.MarketplaceCatalogClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMarketplaceCommerceAnalytics/MarketplaceCommerceAnalyticsClient.swift b/Sources/Services/AWSMarketplaceCommerceAnalytics/MarketplaceCommerceAnalyticsClient.swift index da918b2a0ed..0c5234bbb40 100644 --- a/Sources/Services/AWSMarketplaceCommerceAnalytics/MarketplaceCommerceAnalyticsClient.swift +++ b/Sources/Services/AWSMarketplaceCommerceAnalytics/MarketplaceCommerceAnalyticsClient.swift @@ -117,7 +117,8 @@ extension MarketplaceCommerceAnalyticsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MarketplaceCommerceAnalyticsClientLogHandlerFactory: ClientRuntime } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MarketplaceCommerceAnalyticsClient.MarketplaceCommerceAnalyticsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MarketplaceCommerceAnalyticsClient { /// Performs the `GenerateDataSet` operation on the `MarketplaceCommerceAnalytics20150701` service. /// diff --git a/Sources/Services/AWSMarketplaceCommerceAnalytics/Plugins.swift b/Sources/Services/AWSMarketplaceCommerceAnalytics/Plugins.swift new file mode 100644 index 00000000000..e8d38e2c311 --- /dev/null +++ b/Sources/Services/AWSMarketplaceCommerceAnalytics/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MarketplaceCommerceAnalyticsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceCommerceAnalyticsClient.MarketplaceCommerceAnalyticsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceCommerceAnalyticsClient.MarketplaceCommerceAnalyticsClientConfiguration { + config.authSchemeResolver = DefaultMarketplaceCommerceAnalyticsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MarketplaceCommerceAnalyticsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MarketplaceCommerceAnalyticsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceCommerceAnalyticsClient.MarketplaceCommerceAnalyticsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMarketplaceDeployment/MarketplaceDeploymentClient.swift b/Sources/Services/AWSMarketplaceDeployment/MarketplaceDeploymentClient.swift index 48c4afe3894..a50eb027311 100644 --- a/Sources/Services/AWSMarketplaceDeployment/MarketplaceDeploymentClient.swift +++ b/Sources/Services/AWSMarketplaceDeployment/MarketplaceDeploymentClient.swift @@ -117,7 +117,8 @@ extension MarketplaceDeploymentClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MarketplaceDeploymentClientLogHandlerFactory: ClientRuntime.SDKLog } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MarketplaceDeploymentClient.MarketplaceDeploymentClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MarketplaceDeploymentClient { /// Performs the `ListTagsForResource` operation on the `AWSMPDeploymentParametersService` service. /// diff --git a/Sources/Services/AWSMarketplaceDeployment/Plugins.swift b/Sources/Services/AWSMarketplaceDeployment/Plugins.swift new file mode 100644 index 00000000000..4268275f849 --- /dev/null +++ b/Sources/Services/AWSMarketplaceDeployment/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MarketplaceDeploymentClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceDeploymentClient.MarketplaceDeploymentClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceDeploymentClient.MarketplaceDeploymentClientConfiguration { + config.authSchemeResolver = DefaultMarketplaceDeploymentAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MarketplaceDeploymentClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MarketplaceDeploymentAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceDeploymentClient.MarketplaceDeploymentClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMarketplaceEntitlementService/MarketplaceEntitlementClient.swift b/Sources/Services/AWSMarketplaceEntitlementService/MarketplaceEntitlementClient.swift index 6aa2d5a8529..61b9f0f8a7d 100644 --- a/Sources/Services/AWSMarketplaceEntitlementService/MarketplaceEntitlementClient.swift +++ b/Sources/Services/AWSMarketplaceEntitlementService/MarketplaceEntitlementClient.swift @@ -117,7 +117,8 @@ extension MarketplaceEntitlementClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MarketplaceEntitlementClientLogHandlerFactory: ClientRuntime.SDKLo } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MarketplaceEntitlementClient.MarketplaceEntitlementClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MarketplaceEntitlementClient { /// Performs the `GetEntitlements` operation on the `AWSMPEntitlementService` service. /// diff --git a/Sources/Services/AWSMarketplaceEntitlementService/Plugins.swift b/Sources/Services/AWSMarketplaceEntitlementService/Plugins.swift new file mode 100644 index 00000000000..808bd3f0ada --- /dev/null +++ b/Sources/Services/AWSMarketplaceEntitlementService/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MarketplaceEntitlementClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceEntitlementClient.MarketplaceEntitlementClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceEntitlementClient.MarketplaceEntitlementClientConfiguration { + config.authSchemeResolver = DefaultMarketplaceEntitlementServiceAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MarketplaceEntitlementClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MarketplaceEntitlementServiceAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceEntitlementClient.MarketplaceEntitlementClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMarketplaceMetering/MarketplaceMeteringClient.swift b/Sources/Services/AWSMarketplaceMetering/MarketplaceMeteringClient.swift index d400791d48d..03ea05c6101 100644 --- a/Sources/Services/AWSMarketplaceMetering/MarketplaceMeteringClient.swift +++ b/Sources/Services/AWSMarketplaceMetering/MarketplaceMeteringClient.swift @@ -117,7 +117,8 @@ extension MarketplaceMeteringClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MarketplaceMeteringClientLogHandlerFactory: ClientRuntime.SDKLogHa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MarketplaceMeteringClient.MarketplaceMeteringClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MarketplaceMeteringClient { /// Performs the `BatchMeterUsage` operation on the `AWSMPMeteringService` service. /// diff --git a/Sources/Services/AWSMarketplaceMetering/Plugins.swift b/Sources/Services/AWSMarketplaceMetering/Plugins.swift new file mode 100644 index 00000000000..d77366d029d --- /dev/null +++ b/Sources/Services/AWSMarketplaceMetering/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MarketplaceMeteringClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceMeteringClient.MarketplaceMeteringClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceMeteringClient.MarketplaceMeteringClientConfiguration { + config.authSchemeResolver = DefaultMarketplaceMeteringAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MarketplaceMeteringClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MarketplaceMeteringAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MarketplaceMeteringClient.MarketplaceMeteringClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMediaConnect/MediaConnectClient.swift b/Sources/Services/AWSMediaConnect/MediaConnectClient.swift index 38cb90687d3..83a4d172239 100644 --- a/Sources/Services/AWSMediaConnect/MediaConnectClient.swift +++ b/Sources/Services/AWSMediaConnect/MediaConnectClient.swift @@ -117,7 +117,8 @@ extension MediaConnectClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MediaConnectClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MediaConnectClient.MediaConnectClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MediaConnectClient { /// Performs the `AddBridgeOutputs` operation on the `MediaConnect` service. /// diff --git a/Sources/Services/AWSMediaConnect/Plugins.swift b/Sources/Services/AWSMediaConnect/Plugins.swift new file mode 100644 index 00000000000..409397dfe8c --- /dev/null +++ b/Sources/Services/AWSMediaConnect/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MediaConnectClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaConnectClient.MediaConnectClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaConnectClient.MediaConnectClientConfiguration { + config.authSchemeResolver = DefaultMediaConnectAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MediaConnectClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MediaConnectAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaConnectClient.MediaConnectClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMediaConvert/MediaConvertClient.swift b/Sources/Services/AWSMediaConvert/MediaConvertClient.swift index 03aa23ca2d0..3fde9926036 100644 --- a/Sources/Services/AWSMediaConvert/MediaConvertClient.swift +++ b/Sources/Services/AWSMediaConvert/MediaConvertClient.swift @@ -117,7 +117,8 @@ extension MediaConvertClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MediaConvertClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MediaConvertClient.MediaConvertClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MediaConvertClient { /// Performs the `AssociateCertificate` operation on the `MediaConvert` service. /// diff --git a/Sources/Services/AWSMediaConvert/Plugins.swift b/Sources/Services/AWSMediaConvert/Plugins.swift new file mode 100644 index 00000000000..be905829223 --- /dev/null +++ b/Sources/Services/AWSMediaConvert/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MediaConvertClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaConvertClient.MediaConvertClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaConvertClient.MediaConvertClientConfiguration { + config.authSchemeResolver = DefaultMediaConvertAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MediaConvertClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MediaConvertAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaConvertClient.MediaConvertClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMediaLive/MediaLiveClient.swift b/Sources/Services/AWSMediaLive/MediaLiveClient.swift index 9113ea84a65..beceb4404ce 100644 --- a/Sources/Services/AWSMediaLive/MediaLiveClient.swift +++ b/Sources/Services/AWSMediaLive/MediaLiveClient.swift @@ -117,7 +117,8 @@ extension MediaLiveClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MediaLiveClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MediaLiveClient.MediaLiveClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MediaLiveClient { /// Performs the `AcceptInputDeviceTransfer` operation on the `MediaLive` service. /// diff --git a/Sources/Services/AWSMediaLive/Plugins.swift b/Sources/Services/AWSMediaLive/Plugins.swift new file mode 100644 index 00000000000..bc5d2f5af69 --- /dev/null +++ b/Sources/Services/AWSMediaLive/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MediaLiveClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaLiveClient.MediaLiveClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaLiveClient.MediaLiveClientConfiguration { + config.authSchemeResolver = DefaultMediaLiveAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MediaLiveClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MediaLiveAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaLiveClient.MediaLiveClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMediaPackage/MediaPackageClient.swift b/Sources/Services/AWSMediaPackage/MediaPackageClient.swift index 3f69377c332..2a751d26a42 100644 --- a/Sources/Services/AWSMediaPackage/MediaPackageClient.swift +++ b/Sources/Services/AWSMediaPackage/MediaPackageClient.swift @@ -117,7 +117,8 @@ extension MediaPackageClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MediaPackageClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MediaPackageClient.MediaPackageClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MediaPackageClient { /// Performs the `ConfigureLogs` operation on the `MediaPackage` service. /// diff --git a/Sources/Services/AWSMediaPackage/Plugins.swift b/Sources/Services/AWSMediaPackage/Plugins.swift new file mode 100644 index 00000000000..1b2b46bb98b --- /dev/null +++ b/Sources/Services/AWSMediaPackage/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MediaPackageClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaPackageClient.MediaPackageClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaPackageClient.MediaPackageClientConfiguration { + config.authSchemeResolver = DefaultMediaPackageAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MediaPackageClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MediaPackageAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaPackageClient.MediaPackageClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMediaPackageV2/MediaPackageV2Client.swift b/Sources/Services/AWSMediaPackageV2/MediaPackageV2Client.swift index a585545ac98..ef9d9840d36 100644 --- a/Sources/Services/AWSMediaPackageV2/MediaPackageV2Client.swift +++ b/Sources/Services/AWSMediaPackageV2/MediaPackageV2Client.swift @@ -117,7 +117,8 @@ extension MediaPackageV2Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MediaPackageV2ClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MediaPackageV2Client.MediaPackageV2ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MediaPackageV2Client { /// Performs the `CreateChannel` operation on the `mediapackagev2` service. /// diff --git a/Sources/Services/AWSMediaPackageV2/Plugins.swift b/Sources/Services/AWSMediaPackageV2/Plugins.swift new file mode 100644 index 00000000000..1c21cd8a543 --- /dev/null +++ b/Sources/Services/AWSMediaPackageV2/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MediaPackageV2ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaPackageV2Client.MediaPackageV2ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaPackageV2Client.MediaPackageV2ClientConfiguration { + config.authSchemeResolver = DefaultMediaPackageV2AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MediaPackageV2ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MediaPackageV2AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaPackageV2Client.MediaPackageV2ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMediaPackageVod/MediaPackageVodClient.swift b/Sources/Services/AWSMediaPackageVod/MediaPackageVodClient.swift index a1f51f2c9a3..2c9cb9c44c1 100644 --- a/Sources/Services/AWSMediaPackageVod/MediaPackageVodClient.swift +++ b/Sources/Services/AWSMediaPackageVod/MediaPackageVodClient.swift @@ -117,7 +117,8 @@ extension MediaPackageVodClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MediaPackageVodClientLogHandlerFactory: ClientRuntime.SDKLogHandle } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MediaPackageVodClient.MediaPackageVodClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MediaPackageVodClient { /// Performs the `ConfigureLogs` operation on the `MediaPackageVod` service. /// diff --git a/Sources/Services/AWSMediaPackageVod/Plugins.swift b/Sources/Services/AWSMediaPackageVod/Plugins.swift new file mode 100644 index 00000000000..0acc9ea5c6e --- /dev/null +++ b/Sources/Services/AWSMediaPackageVod/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MediaPackageVodClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaPackageVodClient.MediaPackageVodClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaPackageVodClient.MediaPackageVodClientConfiguration { + config.authSchemeResolver = DefaultMediaPackageVodAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MediaPackageVodClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MediaPackageVodAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaPackageVodClient.MediaPackageVodClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMediaStore/MediaStoreClient.swift b/Sources/Services/AWSMediaStore/MediaStoreClient.swift index 1e180c1655d..d5a043fd1a3 100644 --- a/Sources/Services/AWSMediaStore/MediaStoreClient.swift +++ b/Sources/Services/AWSMediaStore/MediaStoreClient.swift @@ -117,7 +117,8 @@ extension MediaStoreClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MediaStoreClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MediaStoreClient.MediaStoreClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MediaStoreClient { /// Performs the `CreateContainer` operation on the `MediaStore_20170901` service. /// diff --git a/Sources/Services/AWSMediaStore/Plugins.swift b/Sources/Services/AWSMediaStore/Plugins.swift new file mode 100644 index 00000000000..1e90709dd20 --- /dev/null +++ b/Sources/Services/AWSMediaStore/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MediaStoreClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaStoreClient.MediaStoreClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaStoreClient.MediaStoreClientConfiguration { + config.authSchemeResolver = DefaultMediaStoreAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MediaStoreClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MediaStoreAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaStoreClient.MediaStoreClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMediaStoreData/MediaStoreDataClient.swift b/Sources/Services/AWSMediaStoreData/MediaStoreDataClient.swift index 98dbc4ac257..9b849aa4708 100644 --- a/Sources/Services/AWSMediaStoreData/MediaStoreDataClient.swift +++ b/Sources/Services/AWSMediaStoreData/MediaStoreDataClient.swift @@ -117,7 +117,8 @@ extension MediaStoreDataClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MediaStoreDataClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MediaStoreDataClient.MediaStoreDataClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MediaStoreDataClient { /// Performs the `DeleteObject` operation on the `MediaStoreObject_20170901` service. /// diff --git a/Sources/Services/AWSMediaStoreData/Plugins.swift b/Sources/Services/AWSMediaStoreData/Plugins.swift new file mode 100644 index 00000000000..5bc4b3c1a2a --- /dev/null +++ b/Sources/Services/AWSMediaStoreData/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MediaStoreDataClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaStoreDataClient.MediaStoreDataClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaStoreDataClient.MediaStoreDataClientConfiguration { + config.authSchemeResolver = DefaultMediaStoreDataAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MediaStoreDataClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MediaStoreDataAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaStoreDataClient.MediaStoreDataClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMediaTailor/MediaTailorClient.swift b/Sources/Services/AWSMediaTailor/MediaTailorClient.swift index 0cb07de84ab..66569302d99 100644 --- a/Sources/Services/AWSMediaTailor/MediaTailorClient.swift +++ b/Sources/Services/AWSMediaTailor/MediaTailorClient.swift @@ -117,7 +117,8 @@ extension MediaTailorClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MediaTailorClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MediaTailorClient.MediaTailorClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MediaTailorClient { /// Performs the `ConfigureLogsForChannel` operation on the `MediaTailor` service. /// diff --git a/Sources/Services/AWSMediaTailor/Plugins.swift b/Sources/Services/AWSMediaTailor/Plugins.swift new file mode 100644 index 00000000000..dbe3efd01b4 --- /dev/null +++ b/Sources/Services/AWSMediaTailor/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MediaTailorClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaTailorClient.MediaTailorClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaTailorClient.MediaTailorClientConfiguration { + config.authSchemeResolver = DefaultMediaTailorAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MediaTailorClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MediaTailorAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MediaTailorClient.MediaTailorClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMedicalImaging/MedicalImagingClient.swift b/Sources/Services/AWSMedicalImaging/MedicalImagingClient.swift index 819ea0fb2c3..3dda301de85 100644 --- a/Sources/Services/AWSMedicalImaging/MedicalImagingClient.swift +++ b/Sources/Services/AWSMedicalImaging/MedicalImagingClient.swift @@ -117,7 +117,8 @@ extension MedicalImagingClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MedicalImagingClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MedicalImagingClient.MedicalImagingClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MedicalImagingClient { /// Performs the `CopyImageSet` operation on the `AHIGatewayService` service. /// diff --git a/Sources/Services/AWSMedicalImaging/Plugins.swift b/Sources/Services/AWSMedicalImaging/Plugins.swift new file mode 100644 index 00000000000..11a5954e473 --- /dev/null +++ b/Sources/Services/AWSMedicalImaging/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MedicalImagingClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MedicalImagingClient.MedicalImagingClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MedicalImagingClient.MedicalImagingClientConfiguration { + config.authSchemeResolver = DefaultMedicalImagingAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MedicalImagingClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MedicalImagingAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MedicalImagingClient.MedicalImagingClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMemoryDB/MemoryDBClient.swift b/Sources/Services/AWSMemoryDB/MemoryDBClient.swift index d638f8959d1..29da9353229 100644 --- a/Sources/Services/AWSMemoryDB/MemoryDBClient.swift +++ b/Sources/Services/AWSMemoryDB/MemoryDBClient.swift @@ -117,7 +117,8 @@ extension MemoryDBClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MemoryDBClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MemoryDBClient.MemoryDBClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MemoryDBClient { /// Performs the `BatchUpdateCluster` operation on the `AmazonMemoryDB` service. /// diff --git a/Sources/Services/AWSMemoryDB/Plugins.swift b/Sources/Services/AWSMemoryDB/Plugins.swift new file mode 100644 index 00000000000..192959c4380 --- /dev/null +++ b/Sources/Services/AWSMemoryDB/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MemoryDBClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MemoryDBClient.MemoryDBClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MemoryDBClient.MemoryDBClientConfiguration { + config.authSchemeResolver = DefaultMemoryDBAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MemoryDBClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MemoryDBAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MemoryDBClient.MemoryDBClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMgn/MgnClient.swift b/Sources/Services/AWSMgn/MgnClient.swift index 4d602cbc73c..014972f2221 100644 --- a/Sources/Services/AWSMgn/MgnClient.swift +++ b/Sources/Services/AWSMgn/MgnClient.swift @@ -117,7 +117,8 @@ extension MgnClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MgnClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MgnClient.MgnClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MgnClient { /// Performs the `ArchiveApplication` operation on the `ApplicationMigrationService` service. /// diff --git a/Sources/Services/AWSMgn/Plugins.swift b/Sources/Services/AWSMgn/Plugins.swift new file mode 100644 index 00000000000..e0d74a84afb --- /dev/null +++ b/Sources/Services/AWSMgn/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MgnClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MgnClient.MgnClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MgnClient.MgnClientConfiguration { + config.authSchemeResolver = DefaultMgnAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MgnClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MgnAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MgnClient.MgnClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMigrationHub/MigrationHubClient.swift b/Sources/Services/AWSMigrationHub/MigrationHubClient.swift index 89c2f203d47..6771b5c5189 100644 --- a/Sources/Services/AWSMigrationHub/MigrationHubClient.swift +++ b/Sources/Services/AWSMigrationHub/MigrationHubClient.swift @@ -117,7 +117,8 @@ extension MigrationHubClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MigrationHubClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MigrationHubClient.MigrationHubClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MigrationHubClient { /// Performs the `AssociateCreatedArtifact` operation on the `AWSMigrationHub` service. /// diff --git a/Sources/Services/AWSMigrationHub/Plugins.swift b/Sources/Services/AWSMigrationHub/Plugins.swift new file mode 100644 index 00000000000..763600bd5b7 --- /dev/null +++ b/Sources/Services/AWSMigrationHub/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MigrationHubClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MigrationHubClient.MigrationHubClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MigrationHubClient.MigrationHubClientConfiguration { + config.authSchemeResolver = DefaultMigrationHubAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MigrationHubClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MigrationHubAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MigrationHubClient.MigrationHubClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMigrationHubConfig/MigrationHubConfigClient.swift b/Sources/Services/AWSMigrationHubConfig/MigrationHubConfigClient.swift index befcd2ef00a..db3918c590a 100644 --- a/Sources/Services/AWSMigrationHubConfig/MigrationHubConfigClient.swift +++ b/Sources/Services/AWSMigrationHubConfig/MigrationHubConfigClient.swift @@ -117,7 +117,8 @@ extension MigrationHubConfigClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MigrationHubConfigClientLogHandlerFactory: ClientRuntime.SDKLogHan } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MigrationHubConfigClient.MigrationHubConfigClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MigrationHubConfigClient { /// Performs the `CreateHomeRegionControl` operation on the `AWSMigrationHubMultiAccountService` service. /// diff --git a/Sources/Services/AWSMigrationHubConfig/Plugins.swift b/Sources/Services/AWSMigrationHubConfig/Plugins.swift new file mode 100644 index 00000000000..9333f3b4af2 --- /dev/null +++ b/Sources/Services/AWSMigrationHubConfig/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MigrationHubConfigClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MigrationHubConfigClient.MigrationHubConfigClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MigrationHubConfigClient.MigrationHubConfigClientConfiguration { + config.authSchemeResolver = DefaultMigrationHubConfigAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MigrationHubConfigClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MigrationHubConfigAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MigrationHubConfigClient.MigrationHubConfigClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMigrationHubOrchestrator/MigrationHubOrchestratorClient.swift b/Sources/Services/AWSMigrationHubOrchestrator/MigrationHubOrchestratorClient.swift index 8383d93d726..ebc2a265d4f 100644 --- a/Sources/Services/AWSMigrationHubOrchestrator/MigrationHubOrchestratorClient.swift +++ b/Sources/Services/AWSMigrationHubOrchestrator/MigrationHubOrchestratorClient.swift @@ -117,7 +117,8 @@ extension MigrationHubOrchestratorClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MigrationHubOrchestratorClientLogHandlerFactory: ClientRuntime.SDK } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MigrationHubOrchestratorClient.MigrationHubOrchestratorClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MigrationHubOrchestratorClient { /// Performs the `CreateWorkflow` operation on the `AWSMigrationHubOrchestrator` service. /// diff --git a/Sources/Services/AWSMigrationHubOrchestrator/Plugins.swift b/Sources/Services/AWSMigrationHubOrchestrator/Plugins.swift new file mode 100644 index 00000000000..b2af5f06064 --- /dev/null +++ b/Sources/Services/AWSMigrationHubOrchestrator/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MigrationHubOrchestratorClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MigrationHubOrchestratorClient.MigrationHubOrchestratorClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MigrationHubOrchestratorClient.MigrationHubOrchestratorClientConfiguration { + config.authSchemeResolver = DefaultMigrationHubOrchestratorAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MigrationHubOrchestratorClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MigrationHubOrchestratorAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MigrationHubOrchestratorClient.MigrationHubOrchestratorClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMigrationHubRefactorSpaces/MigrationHubRefactorSpacesClient.swift b/Sources/Services/AWSMigrationHubRefactorSpaces/MigrationHubRefactorSpacesClient.swift index 618443bb624..b22d10ae91d 100644 --- a/Sources/Services/AWSMigrationHubRefactorSpaces/MigrationHubRefactorSpacesClient.swift +++ b/Sources/Services/AWSMigrationHubRefactorSpaces/MigrationHubRefactorSpacesClient.swift @@ -117,7 +117,8 @@ extension MigrationHubRefactorSpacesClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MigrationHubRefactorSpacesClientLogHandlerFactory: ClientRuntime.S } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MigrationHubRefactorSpacesClient.MigrationHubRefactorSpacesClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MigrationHubRefactorSpacesClient { /// Performs the `CreateApplication` operation on the `RefactorSpaces` service. /// diff --git a/Sources/Services/AWSMigrationHubRefactorSpaces/Plugins.swift b/Sources/Services/AWSMigrationHubRefactorSpaces/Plugins.swift new file mode 100644 index 00000000000..4ad3e81660d --- /dev/null +++ b/Sources/Services/AWSMigrationHubRefactorSpaces/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MigrationHubRefactorSpacesClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MigrationHubRefactorSpacesClient.MigrationHubRefactorSpacesClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MigrationHubRefactorSpacesClient.MigrationHubRefactorSpacesClientConfiguration { + config.authSchemeResolver = DefaultMigrationHubRefactorSpacesAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MigrationHubRefactorSpacesClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MigrationHubRefactorSpacesAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MigrationHubRefactorSpacesClient.MigrationHubRefactorSpacesClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMigrationHubStrategy/MigrationHubStrategyClient.swift b/Sources/Services/AWSMigrationHubStrategy/MigrationHubStrategyClient.swift index ecc0c6fe2ae..fd1ab1ec881 100644 --- a/Sources/Services/AWSMigrationHubStrategy/MigrationHubStrategyClient.swift +++ b/Sources/Services/AWSMigrationHubStrategy/MigrationHubStrategyClient.swift @@ -117,7 +117,8 @@ extension MigrationHubStrategyClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MigrationHubStrategyClientLogHandlerFactory: ClientRuntime.SDKLogH } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MigrationHubStrategyClient.MigrationHubStrategyClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MigrationHubStrategyClient { /// Performs the `GetApplicationComponentDetails` operation on the `AWSMigrationHubStrategyRecommendation` service. /// diff --git a/Sources/Services/AWSMigrationHubStrategy/Plugins.swift b/Sources/Services/AWSMigrationHubStrategy/Plugins.swift new file mode 100644 index 00000000000..4e6e00a72d3 --- /dev/null +++ b/Sources/Services/AWSMigrationHubStrategy/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MigrationHubStrategyClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MigrationHubStrategyClient.MigrationHubStrategyClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MigrationHubStrategyClient.MigrationHubStrategyClientConfiguration { + config.authSchemeResolver = DefaultMigrationHubStrategyAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MigrationHubStrategyClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MigrationHubStrategyAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MigrationHubStrategyClient.MigrationHubStrategyClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMobile/MobileClient.swift b/Sources/Services/AWSMobile/MobileClient.swift index 296f7b8859d..c15467badcb 100644 --- a/Sources/Services/AWSMobile/MobileClient.swift +++ b/Sources/Services/AWSMobile/MobileClient.swift @@ -117,7 +117,8 @@ extension MobileClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MobileClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MobileClient.MobileClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MobileClient { /// Performs the `CreateProject` operation on the `AWSMobileService` service. /// diff --git a/Sources/Services/AWSMobile/Plugins.swift b/Sources/Services/AWSMobile/Plugins.swift new file mode 100644 index 00000000000..e53d0419cff --- /dev/null +++ b/Sources/Services/AWSMobile/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MobileClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MobileClient.MobileClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MobileClient.MobileClientConfiguration { + config.authSchemeResolver = DefaultMobileAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MobileClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MobileAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MobileClient.MobileClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSMq/MqClient.swift b/Sources/Services/AWSMq/MqClient.swift index aba4d1d8366..b948bed03f9 100644 --- a/Sources/Services/AWSMq/MqClient.swift +++ b/Sources/Services/AWSMq/MqClient.swift @@ -117,7 +117,8 @@ extension MqClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct MqClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? MqClient.MqClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension MqClient { /// Performs the `CreateBroker` operation on the `mq` service. /// diff --git a/Sources/Services/AWSMq/Plugins.swift b/Sources/Services/AWSMq/Plugins.swift new file mode 100644 index 00000000000..3f01d502bc1 --- /dev/null +++ b/Sources/Services/AWSMq/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class MqClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MqClient.MqClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MqClient.MqClientConfiguration { + config.authSchemeResolver = DefaultMqAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class MqClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: MqAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? MqClient.MqClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSNeptune/NeptuneClient.swift b/Sources/Services/AWSNeptune/NeptuneClient.swift index 3fae200fb5b..724efcf1635 100644 --- a/Sources/Services/AWSNeptune/NeptuneClient.swift +++ b/Sources/Services/AWSNeptune/NeptuneClient.swift @@ -110,7 +110,8 @@ extension NeptuneClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -128,21 +129,6 @@ public struct NeptuneClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? NeptuneClient.NeptuneClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension NeptuneClient { /// Performs the `AddRoleToDBCluster` operation on the `AmazonRDSv19` service. /// diff --git a/Sources/Services/AWSNeptune/Plugins.swift b/Sources/Services/AWSNeptune/Plugins.swift new file mode 100644 index 00000000000..9f55ba820c5 --- /dev/null +++ b/Sources/Services/AWSNeptune/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class NeptuneClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NeptuneClient.NeptuneClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NeptuneClient.NeptuneClientConfiguration { + config.authSchemeResolver = DefaultNeptuneAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class NeptuneClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: NeptuneAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NeptuneClient.NeptuneClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSNeptuneGraph/NeptuneGraphClient.swift b/Sources/Services/AWSNeptuneGraph/NeptuneGraphClient.swift index 0de36ea2aff..ed6b8f39aff 100644 --- a/Sources/Services/AWSNeptuneGraph/NeptuneGraphClient.swift +++ b/Sources/Services/AWSNeptuneGraph/NeptuneGraphClient.swift @@ -117,7 +117,8 @@ extension NeptuneGraphClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct NeptuneGraphClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? NeptuneGraphClient.NeptuneGraphClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension NeptuneGraphClient { /// Performs the `CancelImportTask` operation on the `AmazonNeptuneGraph` service. /// diff --git a/Sources/Services/AWSNeptuneGraph/Plugins.swift b/Sources/Services/AWSNeptuneGraph/Plugins.swift new file mode 100644 index 00000000000..f6755be264a --- /dev/null +++ b/Sources/Services/AWSNeptuneGraph/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class NeptuneGraphClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NeptuneGraphClient.NeptuneGraphClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NeptuneGraphClient.NeptuneGraphClientConfiguration { + config.authSchemeResolver = DefaultNeptuneGraphAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class NeptuneGraphClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: NeptuneGraphAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NeptuneGraphClient.NeptuneGraphClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSNeptunedata/NeptunedataClient.swift b/Sources/Services/AWSNeptunedata/NeptunedataClient.swift index 3a847edaa83..1ddfe7ad942 100644 --- a/Sources/Services/AWSNeptunedata/NeptunedataClient.swift +++ b/Sources/Services/AWSNeptunedata/NeptunedataClient.swift @@ -117,7 +117,8 @@ extension NeptunedataClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct NeptunedataClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? NeptunedataClient.NeptunedataClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension NeptunedataClient { /// Performs the `CancelGremlinQuery` operation on the `AmazonNeptuneDataplane` service. /// diff --git a/Sources/Services/AWSNeptunedata/Plugins.swift b/Sources/Services/AWSNeptunedata/Plugins.swift new file mode 100644 index 00000000000..f86e47343a6 --- /dev/null +++ b/Sources/Services/AWSNeptunedata/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class NeptunedataClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NeptunedataClient.NeptunedataClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NeptunedataClient.NeptunedataClientConfiguration { + config.authSchemeResolver = DefaultNeptunedataAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class NeptunedataClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: NeptunedataAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NeptunedataClient.NeptunedataClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSNetworkFirewall/NetworkFirewallClient.swift b/Sources/Services/AWSNetworkFirewall/NetworkFirewallClient.swift index d9f3aa272e2..7a4e69dd863 100644 --- a/Sources/Services/AWSNetworkFirewall/NetworkFirewallClient.swift +++ b/Sources/Services/AWSNetworkFirewall/NetworkFirewallClient.swift @@ -117,7 +117,8 @@ extension NetworkFirewallClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct NetworkFirewallClientLogHandlerFactory: ClientRuntime.SDKLogHandle } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? NetworkFirewallClient.NetworkFirewallClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension NetworkFirewallClient { /// Performs the `AssociateFirewallPolicy` operation on the `NetworkFirewall_20201112` service. /// diff --git a/Sources/Services/AWSNetworkFirewall/Plugins.swift b/Sources/Services/AWSNetworkFirewall/Plugins.swift new file mode 100644 index 00000000000..8720a1d8bf9 --- /dev/null +++ b/Sources/Services/AWSNetworkFirewall/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class NetworkFirewallClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NetworkFirewallClient.NetworkFirewallClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NetworkFirewallClient.NetworkFirewallClientConfiguration { + config.authSchemeResolver = DefaultNetworkFirewallAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class NetworkFirewallClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: NetworkFirewallAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NetworkFirewallClient.NetworkFirewallClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSNetworkManager/NetworkManagerClient.swift b/Sources/Services/AWSNetworkManager/NetworkManagerClient.swift index 6e76610d617..78952667a9b 100644 --- a/Sources/Services/AWSNetworkManager/NetworkManagerClient.swift +++ b/Sources/Services/AWSNetworkManager/NetworkManagerClient.swift @@ -117,7 +117,8 @@ extension NetworkManagerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct NetworkManagerClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? NetworkManagerClient.NetworkManagerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension NetworkManagerClient { /// Performs the `AcceptAttachment` operation on the `NetworkManager` service. /// diff --git a/Sources/Services/AWSNetworkManager/Plugins.swift b/Sources/Services/AWSNetworkManager/Plugins.swift new file mode 100644 index 00000000000..acc4c89cb57 --- /dev/null +++ b/Sources/Services/AWSNetworkManager/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class NetworkManagerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NetworkManagerClient.NetworkManagerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NetworkManagerClient.NetworkManagerClientConfiguration { + config.authSchemeResolver = DefaultNetworkManagerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class NetworkManagerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: NetworkManagerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NetworkManagerClient.NetworkManagerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSNetworkMonitor/NetworkMonitorClient.swift b/Sources/Services/AWSNetworkMonitor/NetworkMonitorClient.swift index e39ba287a91..6799ac79e02 100644 --- a/Sources/Services/AWSNetworkMonitor/NetworkMonitorClient.swift +++ b/Sources/Services/AWSNetworkMonitor/NetworkMonitorClient.swift @@ -117,7 +117,8 @@ extension NetworkMonitorClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct NetworkMonitorClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? NetworkMonitorClient.NetworkMonitorClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension NetworkMonitorClient { /// Performs the `CreateMonitor` operation on the `NetworkMonitor` service. /// diff --git a/Sources/Services/AWSNetworkMonitor/Plugins.swift b/Sources/Services/AWSNetworkMonitor/Plugins.swift new file mode 100644 index 00000000000..c909c92ddc2 --- /dev/null +++ b/Sources/Services/AWSNetworkMonitor/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class NetworkMonitorClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NetworkMonitorClient.NetworkMonitorClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NetworkMonitorClient.NetworkMonitorClientConfiguration { + config.authSchemeResolver = DefaultNetworkMonitorAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class NetworkMonitorClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: NetworkMonitorAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NetworkMonitorClient.NetworkMonitorClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSNimble/NimbleClient.swift b/Sources/Services/AWSNimble/NimbleClient.swift index 8600fcf16b5..9bf7050ba4c 100644 --- a/Sources/Services/AWSNimble/NimbleClient.swift +++ b/Sources/Services/AWSNimble/NimbleClient.swift @@ -117,7 +117,8 @@ extension NimbleClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct NimbleClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? NimbleClient.NimbleClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension NimbleClient { /// Performs the `AcceptEulas` operation on the `nimble` service. /// diff --git a/Sources/Services/AWSNimble/Plugins.swift b/Sources/Services/AWSNimble/Plugins.swift new file mode 100644 index 00000000000..ce0f43777e3 --- /dev/null +++ b/Sources/Services/AWSNimble/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class NimbleClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NimbleClient.NimbleClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NimbleClient.NimbleClientConfiguration { + config.authSchemeResolver = DefaultNimbleAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class NimbleClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: NimbleAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? NimbleClient.NimbleClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSOAM/OAMClient.swift b/Sources/Services/AWSOAM/OAMClient.swift index 8e5eee2fa51..04568a844a5 100644 --- a/Sources/Services/AWSOAM/OAMClient.swift +++ b/Sources/Services/AWSOAM/OAMClient.swift @@ -117,7 +117,8 @@ extension OAMClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct OAMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? OAMClient.OAMClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension OAMClient { /// Performs the `CreateLink` operation on the `oamservice` service. /// diff --git a/Sources/Services/AWSOAM/Plugins.swift b/Sources/Services/AWSOAM/Plugins.swift new file mode 100644 index 00000000000..863ec6f5ed3 --- /dev/null +++ b/Sources/Services/AWSOAM/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class OAMClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OAMClient.OAMClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OAMClient.OAMClientConfiguration { + config.authSchemeResolver = DefaultOAMAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class OAMClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: OAMAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OAMClient.OAMClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSOSIS/OSISClient.swift b/Sources/Services/AWSOSIS/OSISClient.swift index 7a77121e880..9a845004912 100644 --- a/Sources/Services/AWSOSIS/OSISClient.swift +++ b/Sources/Services/AWSOSIS/OSISClient.swift @@ -117,7 +117,8 @@ extension OSISClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct OSISClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? OSISClient.OSISClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension OSISClient { /// Performs the `CreatePipeline` operation on the `AmazonOpenSearchIngestionService` service. /// diff --git a/Sources/Services/AWSOSIS/Plugins.swift b/Sources/Services/AWSOSIS/Plugins.swift new file mode 100644 index 00000000000..4dc26f90fda --- /dev/null +++ b/Sources/Services/AWSOSIS/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class OSISClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OSISClient.OSISClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OSISClient.OSISClientConfiguration { + config.authSchemeResolver = DefaultOSISAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class OSISClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: OSISAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OSISClient.OSISClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSOmics/OmicsClient.swift b/Sources/Services/AWSOmics/OmicsClient.swift index 903e21fc9e2..af77ee39a27 100644 --- a/Sources/Services/AWSOmics/OmicsClient.swift +++ b/Sources/Services/AWSOmics/OmicsClient.swift @@ -117,7 +117,8 @@ extension OmicsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct OmicsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? OmicsClient.OmicsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension OmicsClient { /// Performs the `AbortMultipartReadSetUpload` operation on the `Omics` service. /// diff --git a/Sources/Services/AWSOmics/Plugins.swift b/Sources/Services/AWSOmics/Plugins.swift new file mode 100644 index 00000000000..04ea4bf8123 --- /dev/null +++ b/Sources/Services/AWSOmics/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class OmicsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OmicsClient.OmicsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OmicsClient.OmicsClientConfiguration { + config.authSchemeResolver = DefaultOmicsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class OmicsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: OmicsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OmicsClient.OmicsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSOpenSearch/OpenSearchClient.swift b/Sources/Services/AWSOpenSearch/OpenSearchClient.swift index 8d47cbcb486..9107bdb7c68 100644 --- a/Sources/Services/AWSOpenSearch/OpenSearchClient.swift +++ b/Sources/Services/AWSOpenSearch/OpenSearchClient.swift @@ -117,7 +117,8 @@ extension OpenSearchClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct OpenSearchClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? OpenSearchClient.OpenSearchClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension OpenSearchClient { /// Performs the `AcceptInboundConnection` operation on the `AmazonOpenSearchService` service. /// diff --git a/Sources/Services/AWSOpenSearch/Plugins.swift b/Sources/Services/AWSOpenSearch/Plugins.swift new file mode 100644 index 00000000000..ef72caa254a --- /dev/null +++ b/Sources/Services/AWSOpenSearch/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class OpenSearchClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OpenSearchClient.OpenSearchClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OpenSearchClient.OpenSearchClientConfiguration { + config.authSchemeResolver = DefaultOpenSearchAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class OpenSearchClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: OpenSearchAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OpenSearchClient.OpenSearchClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSOpenSearchServerless/OpenSearchServerlessClient.swift b/Sources/Services/AWSOpenSearchServerless/OpenSearchServerlessClient.swift index ef57790df20..b5f959e7786 100644 --- a/Sources/Services/AWSOpenSearchServerless/OpenSearchServerlessClient.swift +++ b/Sources/Services/AWSOpenSearchServerless/OpenSearchServerlessClient.swift @@ -117,7 +117,8 @@ extension OpenSearchServerlessClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct OpenSearchServerlessClientLogHandlerFactory: ClientRuntime.SDKLogH } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? OpenSearchServerlessClient.OpenSearchServerlessClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension OpenSearchServerlessClient { /// Performs the `BatchGetCollection` operation on the `OpenSearchServerless` service. /// diff --git a/Sources/Services/AWSOpenSearchServerless/Plugins.swift b/Sources/Services/AWSOpenSearchServerless/Plugins.swift new file mode 100644 index 00000000000..9ea6726d78c --- /dev/null +++ b/Sources/Services/AWSOpenSearchServerless/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class OpenSearchServerlessClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OpenSearchServerlessClient.OpenSearchServerlessClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OpenSearchServerlessClient.OpenSearchServerlessClientConfiguration { + config.authSchemeResolver = DefaultOpenSearchServerlessAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class OpenSearchServerlessClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: OpenSearchServerlessAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OpenSearchServerlessClient.OpenSearchServerlessClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSOpsWorks/OpsWorksClient.swift b/Sources/Services/AWSOpsWorks/OpsWorksClient.swift index bb48a303a44..aa0a60ff647 100644 --- a/Sources/Services/AWSOpsWorks/OpsWorksClient.swift +++ b/Sources/Services/AWSOpsWorks/OpsWorksClient.swift @@ -117,7 +117,8 @@ extension OpsWorksClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct OpsWorksClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? OpsWorksClient.OpsWorksClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension OpsWorksClient { /// Performs the `AssignInstance` operation on the `OpsWorks_20130218` service. /// diff --git a/Sources/Services/AWSOpsWorks/Plugins.swift b/Sources/Services/AWSOpsWorks/Plugins.swift new file mode 100644 index 00000000000..8f4af48cdce --- /dev/null +++ b/Sources/Services/AWSOpsWorks/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class OpsWorksClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OpsWorksClient.OpsWorksClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OpsWorksClient.OpsWorksClientConfiguration { + config.authSchemeResolver = DefaultOpsWorksAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class OpsWorksClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: OpsWorksAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OpsWorksClient.OpsWorksClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSOpsWorksCM/OpsWorksCMClient.swift b/Sources/Services/AWSOpsWorksCM/OpsWorksCMClient.swift index 45aa85905f5..8565e8d195d 100644 --- a/Sources/Services/AWSOpsWorksCM/OpsWorksCMClient.swift +++ b/Sources/Services/AWSOpsWorksCM/OpsWorksCMClient.swift @@ -117,7 +117,8 @@ extension OpsWorksCMClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct OpsWorksCMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? OpsWorksCMClient.OpsWorksCMClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension OpsWorksCMClient { /// Performs the `AssociateNode` operation on the `OpsWorksCM_V2016_11_01` service. /// diff --git a/Sources/Services/AWSOpsWorksCM/Plugins.swift b/Sources/Services/AWSOpsWorksCM/Plugins.swift new file mode 100644 index 00000000000..cfd7747bc66 --- /dev/null +++ b/Sources/Services/AWSOpsWorksCM/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class OpsWorksCMClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OpsWorksCMClient.OpsWorksCMClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OpsWorksCMClient.OpsWorksCMClientConfiguration { + config.authSchemeResolver = DefaultOpsWorksCMAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class OpsWorksCMClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: OpsWorksCMAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OpsWorksCMClient.OpsWorksCMClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSOrganizations/OrganizationsClient.swift b/Sources/Services/AWSOrganizations/OrganizationsClient.swift index 7707fcc10cc..9a6463b0c80 100644 --- a/Sources/Services/AWSOrganizations/OrganizationsClient.swift +++ b/Sources/Services/AWSOrganizations/OrganizationsClient.swift @@ -117,7 +117,8 @@ extension OrganizationsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct OrganizationsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? OrganizationsClient.OrganizationsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension OrganizationsClient { /// Performs the `AcceptHandshake` operation on the `AWSOrganizationsV20161128` service. /// diff --git a/Sources/Services/AWSOrganizations/Plugins.swift b/Sources/Services/AWSOrganizations/Plugins.swift new file mode 100644 index 00000000000..a23d84f02a7 --- /dev/null +++ b/Sources/Services/AWSOrganizations/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class OrganizationsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OrganizationsClient.OrganizationsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OrganizationsClient.OrganizationsClientConfiguration { + config.authSchemeResolver = DefaultOrganizationsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class OrganizationsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: OrganizationsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OrganizationsClient.OrganizationsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSOutposts/OutpostsClient.swift b/Sources/Services/AWSOutposts/OutpostsClient.swift index 06d84a085f3..fe36a5c9afc 100644 --- a/Sources/Services/AWSOutposts/OutpostsClient.swift +++ b/Sources/Services/AWSOutposts/OutpostsClient.swift @@ -117,7 +117,8 @@ extension OutpostsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct OutpostsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? OutpostsClient.OutpostsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension OutpostsClient { /// Performs the `CancelOrder` operation on the `OutpostsOlafService` service. /// diff --git a/Sources/Services/AWSOutposts/Plugins.swift b/Sources/Services/AWSOutposts/Plugins.swift new file mode 100644 index 00000000000..993b24c3bd2 --- /dev/null +++ b/Sources/Services/AWSOutposts/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class OutpostsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OutpostsClient.OutpostsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OutpostsClient.OutpostsClientConfiguration { + config.authSchemeResolver = DefaultOutpostsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class OutpostsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: OutpostsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? OutpostsClient.OutpostsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSPI/PIClient.swift b/Sources/Services/AWSPI/PIClient.swift index eeee7430848..eb61763d105 100644 --- a/Sources/Services/AWSPI/PIClient.swift +++ b/Sources/Services/AWSPI/PIClient.swift @@ -117,7 +117,8 @@ extension PIClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct PIClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? PIClient.PIClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension PIClient { /// Performs the `CreatePerformanceAnalysisReport` operation on the `PerformanceInsightsv20180227` service. /// diff --git a/Sources/Services/AWSPI/Plugins.swift b/Sources/Services/AWSPI/Plugins.swift new file mode 100644 index 00000000000..100a80f0399 --- /dev/null +++ b/Sources/Services/AWSPI/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class PIClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PIClient.PIClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PIClient.PIClientConfiguration { + config.authSchemeResolver = DefaultPIAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class PIClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: PIAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PIClient.PIClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSPanorama/PanoramaClient.swift b/Sources/Services/AWSPanorama/PanoramaClient.swift index a7f799f0d4f..4c7e67e512a 100644 --- a/Sources/Services/AWSPanorama/PanoramaClient.swift +++ b/Sources/Services/AWSPanorama/PanoramaClient.swift @@ -117,7 +117,8 @@ extension PanoramaClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct PanoramaClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? PanoramaClient.PanoramaClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension PanoramaClient { /// Performs the `CreateApplicationInstance` operation on the `OmniCloudServiceLambda` service. /// diff --git a/Sources/Services/AWSPanorama/Plugins.swift b/Sources/Services/AWSPanorama/Plugins.swift new file mode 100644 index 00000000000..3e7962e76d0 --- /dev/null +++ b/Sources/Services/AWSPanorama/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class PanoramaClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PanoramaClient.PanoramaClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PanoramaClient.PanoramaClientConfiguration { + config.authSchemeResolver = DefaultPanoramaAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class PanoramaClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: PanoramaAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PanoramaClient.PanoramaClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSPaymentCryptography/PaymentCryptographyClient.swift b/Sources/Services/AWSPaymentCryptography/PaymentCryptographyClient.swift index 76cfffb6889..1e22e0a961e 100644 --- a/Sources/Services/AWSPaymentCryptography/PaymentCryptographyClient.swift +++ b/Sources/Services/AWSPaymentCryptography/PaymentCryptographyClient.swift @@ -117,7 +117,8 @@ extension PaymentCryptographyClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct PaymentCryptographyClientLogHandlerFactory: ClientRuntime.SDKLogHa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? PaymentCryptographyClient.PaymentCryptographyClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension PaymentCryptographyClient { /// Performs the `CreateAlias` operation on the `PaymentCryptographyControlPlane` service. /// diff --git a/Sources/Services/AWSPaymentCryptography/Plugins.swift b/Sources/Services/AWSPaymentCryptography/Plugins.swift new file mode 100644 index 00000000000..bd27bca9f8b --- /dev/null +++ b/Sources/Services/AWSPaymentCryptography/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class PaymentCryptographyClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PaymentCryptographyClient.PaymentCryptographyClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PaymentCryptographyClient.PaymentCryptographyClientConfiguration { + config.authSchemeResolver = DefaultPaymentCryptographyAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class PaymentCryptographyClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: PaymentCryptographyAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PaymentCryptographyClient.PaymentCryptographyClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSPaymentCryptographyData/PaymentCryptographyDataClient.swift b/Sources/Services/AWSPaymentCryptographyData/PaymentCryptographyDataClient.swift index 09a9dde8a83..4c869b95ff9 100644 --- a/Sources/Services/AWSPaymentCryptographyData/PaymentCryptographyDataClient.swift +++ b/Sources/Services/AWSPaymentCryptographyData/PaymentCryptographyDataClient.swift @@ -117,7 +117,8 @@ extension PaymentCryptographyDataClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct PaymentCryptographyDataClientLogHandlerFactory: ClientRuntime.SDKL } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? PaymentCryptographyDataClient.PaymentCryptographyDataClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension PaymentCryptographyDataClient { /// Performs the `DecryptData` operation on the `PaymentCryptographyDataPlane` service. /// diff --git a/Sources/Services/AWSPaymentCryptographyData/Plugins.swift b/Sources/Services/AWSPaymentCryptographyData/Plugins.swift new file mode 100644 index 00000000000..4abe04218c8 --- /dev/null +++ b/Sources/Services/AWSPaymentCryptographyData/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class PaymentCryptographyDataClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PaymentCryptographyDataClient.PaymentCryptographyDataClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PaymentCryptographyDataClient.PaymentCryptographyDataClientConfiguration { + config.authSchemeResolver = DefaultPaymentCryptographyDataAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class PaymentCryptographyDataClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: PaymentCryptographyDataAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PaymentCryptographyDataClient.PaymentCryptographyDataClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSPcaConnectorAd/PcaConnectorAdClient.swift b/Sources/Services/AWSPcaConnectorAd/PcaConnectorAdClient.swift index df0d5207294..61199151140 100644 --- a/Sources/Services/AWSPcaConnectorAd/PcaConnectorAdClient.swift +++ b/Sources/Services/AWSPcaConnectorAd/PcaConnectorAdClient.swift @@ -117,7 +117,8 @@ extension PcaConnectorAdClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct PcaConnectorAdClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? PcaConnectorAdClient.PcaConnectorAdClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension PcaConnectorAdClient { /// Performs the `CreateConnector` operation on the `PcaConnectorAd` service. /// diff --git a/Sources/Services/AWSPcaConnectorAd/Plugins.swift b/Sources/Services/AWSPcaConnectorAd/Plugins.swift new file mode 100644 index 00000000000..1c2e3c95a9d --- /dev/null +++ b/Sources/Services/AWSPcaConnectorAd/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class PcaConnectorAdClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PcaConnectorAdClient.PcaConnectorAdClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PcaConnectorAdClient.PcaConnectorAdClientConfiguration { + config.authSchemeResolver = DefaultPcaConnectorAdAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class PcaConnectorAdClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: PcaConnectorAdAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PcaConnectorAdClient.PcaConnectorAdClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSPersonalize/PersonalizeClient.swift b/Sources/Services/AWSPersonalize/PersonalizeClient.swift index f1fac8d1a52..9bad62018c1 100644 --- a/Sources/Services/AWSPersonalize/PersonalizeClient.swift +++ b/Sources/Services/AWSPersonalize/PersonalizeClient.swift @@ -117,7 +117,8 @@ extension PersonalizeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct PersonalizeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? PersonalizeClient.PersonalizeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension PersonalizeClient { /// Performs the `CreateBatchInferenceJob` operation on the `AmazonPersonalize` service. /// diff --git a/Sources/Services/AWSPersonalize/Plugins.swift b/Sources/Services/AWSPersonalize/Plugins.swift new file mode 100644 index 00000000000..07efac00690 --- /dev/null +++ b/Sources/Services/AWSPersonalize/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class PersonalizeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PersonalizeClient.PersonalizeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PersonalizeClient.PersonalizeClientConfiguration { + config.authSchemeResolver = DefaultPersonalizeAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class PersonalizeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: PersonalizeAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PersonalizeClient.PersonalizeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSPersonalizeEvents/PersonalizeEventsClient.swift b/Sources/Services/AWSPersonalizeEvents/PersonalizeEventsClient.swift index 58b03c7bddf..1a7021af31a 100644 --- a/Sources/Services/AWSPersonalizeEvents/PersonalizeEventsClient.swift +++ b/Sources/Services/AWSPersonalizeEvents/PersonalizeEventsClient.swift @@ -117,7 +117,8 @@ extension PersonalizeEventsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct PersonalizeEventsClientLogHandlerFactory: ClientRuntime.SDKLogHand } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? PersonalizeEventsClient.PersonalizeEventsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension PersonalizeEventsClient { /// Performs the `PutActionInteractions` operation on the `AmazonPersonalizeEvents` service. /// diff --git a/Sources/Services/AWSPersonalizeEvents/Plugins.swift b/Sources/Services/AWSPersonalizeEvents/Plugins.swift new file mode 100644 index 00000000000..1d14ab06093 --- /dev/null +++ b/Sources/Services/AWSPersonalizeEvents/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class PersonalizeEventsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PersonalizeEventsClient.PersonalizeEventsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PersonalizeEventsClient.PersonalizeEventsClientConfiguration { + config.authSchemeResolver = DefaultPersonalizeEventsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class PersonalizeEventsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: PersonalizeEventsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PersonalizeEventsClient.PersonalizeEventsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSPersonalizeRuntime/PersonalizeRuntimeClient.swift b/Sources/Services/AWSPersonalizeRuntime/PersonalizeRuntimeClient.swift index 33506db840c..4a7a4d0c48a 100644 --- a/Sources/Services/AWSPersonalizeRuntime/PersonalizeRuntimeClient.swift +++ b/Sources/Services/AWSPersonalizeRuntime/PersonalizeRuntimeClient.swift @@ -117,7 +117,8 @@ extension PersonalizeRuntimeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct PersonalizeRuntimeClientLogHandlerFactory: ClientRuntime.SDKLogHan } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? PersonalizeRuntimeClient.PersonalizeRuntimeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension PersonalizeRuntimeClient { /// Performs the `GetActionRecommendations` operation on the `AmazonPersonalizeRuntime` service. /// diff --git a/Sources/Services/AWSPersonalizeRuntime/Plugins.swift b/Sources/Services/AWSPersonalizeRuntime/Plugins.swift new file mode 100644 index 00000000000..58e931fd91b --- /dev/null +++ b/Sources/Services/AWSPersonalizeRuntime/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class PersonalizeRuntimeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PersonalizeRuntimeClient.PersonalizeRuntimeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PersonalizeRuntimeClient.PersonalizeRuntimeClientConfiguration { + config.authSchemeResolver = DefaultPersonalizeRuntimeAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class PersonalizeRuntimeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: PersonalizeRuntimeAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PersonalizeRuntimeClient.PersonalizeRuntimeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSPinpoint/PinpointClient.swift b/Sources/Services/AWSPinpoint/PinpointClient.swift index 0253f689401..304fe714273 100644 --- a/Sources/Services/AWSPinpoint/PinpointClient.swift +++ b/Sources/Services/AWSPinpoint/PinpointClient.swift @@ -117,7 +117,8 @@ extension PinpointClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct PinpointClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? PinpointClient.PinpointClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension PinpointClient { /// Performs the `CreateApp` operation on the `Pinpoint` service. /// diff --git a/Sources/Services/AWSPinpoint/Plugins.swift b/Sources/Services/AWSPinpoint/Plugins.swift new file mode 100644 index 00000000000..8119f14bdb7 --- /dev/null +++ b/Sources/Services/AWSPinpoint/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class PinpointClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PinpointClient.PinpointClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PinpointClient.PinpointClientConfiguration { + config.authSchemeResolver = DefaultPinpointAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class PinpointClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: PinpointAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PinpointClient.PinpointClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSPinpointEmail/PinpointEmailClient.swift b/Sources/Services/AWSPinpointEmail/PinpointEmailClient.swift index a9fafb527c4..768d0e04040 100644 --- a/Sources/Services/AWSPinpointEmail/PinpointEmailClient.swift +++ b/Sources/Services/AWSPinpointEmail/PinpointEmailClient.swift @@ -117,7 +117,8 @@ extension PinpointEmailClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct PinpointEmailClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? PinpointEmailClient.PinpointEmailClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension PinpointEmailClient { /// Performs the `CreateConfigurationSet` operation on the `AmazonPinpointEmailService` service. /// diff --git a/Sources/Services/AWSPinpointEmail/Plugins.swift b/Sources/Services/AWSPinpointEmail/Plugins.swift new file mode 100644 index 00000000000..fb41402e42b --- /dev/null +++ b/Sources/Services/AWSPinpointEmail/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class PinpointEmailClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PinpointEmailClient.PinpointEmailClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PinpointEmailClient.PinpointEmailClientConfiguration { + config.authSchemeResolver = DefaultPinpointEmailAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class PinpointEmailClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: PinpointEmailAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PinpointEmailClient.PinpointEmailClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSPinpointSMSVoice/PinpointSMSVoiceClient.swift b/Sources/Services/AWSPinpointSMSVoice/PinpointSMSVoiceClient.swift index 4460a130b68..e2ee5fb74e6 100644 --- a/Sources/Services/AWSPinpointSMSVoice/PinpointSMSVoiceClient.swift +++ b/Sources/Services/AWSPinpointSMSVoice/PinpointSMSVoiceClient.swift @@ -117,7 +117,8 @@ extension PinpointSMSVoiceClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct PinpointSMSVoiceClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? PinpointSMSVoiceClient.PinpointSMSVoiceClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension PinpointSMSVoiceClient { /// Performs the `CreateConfigurationSet` operation on the `PinpointSMSVoice` service. /// diff --git a/Sources/Services/AWSPinpointSMSVoice/Plugins.swift b/Sources/Services/AWSPinpointSMSVoice/Plugins.swift new file mode 100644 index 00000000000..6a415cbd456 --- /dev/null +++ b/Sources/Services/AWSPinpointSMSVoice/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class PinpointSMSVoiceClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PinpointSMSVoiceClient.PinpointSMSVoiceClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PinpointSMSVoiceClient.PinpointSMSVoiceClientConfiguration { + config.authSchemeResolver = DefaultPinpointSMSVoiceAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class PinpointSMSVoiceClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: PinpointSMSVoiceAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PinpointSMSVoiceClient.PinpointSMSVoiceClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSPinpointSMSVoiceV2/PinpointSMSVoiceV2Client.swift b/Sources/Services/AWSPinpointSMSVoiceV2/PinpointSMSVoiceV2Client.swift index 89116299099..7b1df70add4 100644 --- a/Sources/Services/AWSPinpointSMSVoiceV2/PinpointSMSVoiceV2Client.swift +++ b/Sources/Services/AWSPinpointSMSVoiceV2/PinpointSMSVoiceV2Client.swift @@ -117,7 +117,8 @@ extension PinpointSMSVoiceV2Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct PinpointSMSVoiceV2ClientLogHandlerFactory: ClientRuntime.SDKLogHan } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? PinpointSMSVoiceV2Client.PinpointSMSVoiceV2ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension PinpointSMSVoiceV2Client { /// Performs the `AssociateOriginationIdentity` operation on the `PinpointSMSVoiceV2` service. /// diff --git a/Sources/Services/AWSPinpointSMSVoiceV2/Plugins.swift b/Sources/Services/AWSPinpointSMSVoiceV2/Plugins.swift new file mode 100644 index 00000000000..e9589deba7a --- /dev/null +++ b/Sources/Services/AWSPinpointSMSVoiceV2/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class PinpointSMSVoiceV2ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PinpointSMSVoiceV2Client.PinpointSMSVoiceV2ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PinpointSMSVoiceV2Client.PinpointSMSVoiceV2ClientConfiguration { + config.authSchemeResolver = DefaultPinpointSMSVoiceV2AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class PinpointSMSVoiceV2ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: PinpointSMSVoiceV2AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PinpointSMSVoiceV2Client.PinpointSMSVoiceV2ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSPipes/PipesClient.swift b/Sources/Services/AWSPipes/PipesClient.swift index 2ff31757d5f..8006e4114bf 100644 --- a/Sources/Services/AWSPipes/PipesClient.swift +++ b/Sources/Services/AWSPipes/PipesClient.swift @@ -117,7 +117,8 @@ extension PipesClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct PipesClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? PipesClient.PipesClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension PipesClient { /// Performs the `CreatePipe` operation on the `Pipes` service. /// diff --git a/Sources/Services/AWSPipes/Plugins.swift b/Sources/Services/AWSPipes/Plugins.swift new file mode 100644 index 00000000000..48595ba9e99 --- /dev/null +++ b/Sources/Services/AWSPipes/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class PipesClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PipesClient.PipesClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PipesClient.PipesClientConfiguration { + config.authSchemeResolver = DefaultPipesAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class PipesClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: PipesAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PipesClient.PipesClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSPolly/Plugins.swift b/Sources/Services/AWSPolly/Plugins.swift new file mode 100644 index 00000000000..07c8db89acb --- /dev/null +++ b/Sources/Services/AWSPolly/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class PollyClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PollyClient.PollyClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PollyClient.PollyClientConfiguration { + config.authSchemeResolver = DefaultPollyAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class PollyClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: PollyAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PollyClient.PollyClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSPolly/PollyClient.swift b/Sources/Services/AWSPolly/PollyClient.swift index 0ce7cfca10c..ca68128d188 100644 --- a/Sources/Services/AWSPolly/PollyClient.swift +++ b/Sources/Services/AWSPolly/PollyClient.swift @@ -120,7 +120,8 @@ extension PollyClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -138,21 +139,6 @@ public struct PollyClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? PollyClient.PollyClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension PollyClient { /// Performs the `DeleteLexicon` operation on the `Parrot_v1` service. /// diff --git a/Sources/Services/AWSPricing/Plugins.swift b/Sources/Services/AWSPricing/Plugins.swift new file mode 100644 index 00000000000..4786c56157f --- /dev/null +++ b/Sources/Services/AWSPricing/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class PricingClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PricingClient.PricingClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PricingClient.PricingClientConfiguration { + config.authSchemeResolver = DefaultPricingAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class PricingClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: PricingAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PricingClient.PricingClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSPricing/PricingClient.swift b/Sources/Services/AWSPricing/PricingClient.swift index 0fedc675c8b..e1ace7af869 100644 --- a/Sources/Services/AWSPricing/PricingClient.swift +++ b/Sources/Services/AWSPricing/PricingClient.swift @@ -117,7 +117,8 @@ extension PricingClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct PricingClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? PricingClient.PricingClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension PricingClient { /// Performs the `DescribeServices` operation on the `AWSPriceListService` service. /// diff --git a/Sources/Services/AWSPrivateNetworks/Plugins.swift b/Sources/Services/AWSPrivateNetworks/Plugins.swift new file mode 100644 index 00000000000..d80e1fb68f1 --- /dev/null +++ b/Sources/Services/AWSPrivateNetworks/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class PrivateNetworksClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PrivateNetworksClient.PrivateNetworksClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PrivateNetworksClient.PrivateNetworksClientConfiguration { + config.authSchemeResolver = DefaultPrivateNetworksAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class PrivateNetworksClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: PrivateNetworksAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? PrivateNetworksClient.PrivateNetworksClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSPrivateNetworks/PrivateNetworksClient.swift b/Sources/Services/AWSPrivateNetworks/PrivateNetworksClient.swift index a8efbf3783f..d3ed573cc58 100644 --- a/Sources/Services/AWSPrivateNetworks/PrivateNetworksClient.swift +++ b/Sources/Services/AWSPrivateNetworks/PrivateNetworksClient.swift @@ -117,7 +117,8 @@ extension PrivateNetworksClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct PrivateNetworksClientLogHandlerFactory: ClientRuntime.SDKLogHandle } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? PrivateNetworksClient.PrivateNetworksClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension PrivateNetworksClient { /// Performs the `AcknowledgeOrderReceipt` operation on the `E5GNetworkControllerLambda` service. /// diff --git a/Sources/Services/AWSProton/Plugins.swift b/Sources/Services/AWSProton/Plugins.swift new file mode 100644 index 00000000000..89d1d3aa17a --- /dev/null +++ b/Sources/Services/AWSProton/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ProtonClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ProtonClient.ProtonClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ProtonClient.ProtonClientConfiguration { + config.authSchemeResolver = DefaultProtonAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ProtonClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ProtonAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ProtonClient.ProtonClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSProton/ProtonClient.swift b/Sources/Services/AWSProton/ProtonClient.swift index af64795f6bd..496f0aae903 100644 --- a/Sources/Services/AWSProton/ProtonClient.swift +++ b/Sources/Services/AWSProton/ProtonClient.swift @@ -117,7 +117,8 @@ extension ProtonClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ProtonClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ProtonClient.ProtonClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ProtonClient { /// Performs the `AcceptEnvironmentAccountConnection` operation on the `AwsProton20200720` service. /// diff --git a/Sources/Services/AWSQBusiness/Plugins.swift b/Sources/Services/AWSQBusiness/Plugins.swift new file mode 100644 index 00000000000..a6f5cb731f2 --- /dev/null +++ b/Sources/Services/AWSQBusiness/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class QBusinessClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? QBusinessClient.QBusinessClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? QBusinessClient.QBusinessClientConfiguration { + config.authSchemeResolver = DefaultQBusinessAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class QBusinessClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: QBusinessAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? QBusinessClient.QBusinessClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSQBusiness/QBusinessClient.swift b/Sources/Services/AWSQBusiness/QBusinessClient.swift index 86552e925fe..8d9cf8f5c97 100644 --- a/Sources/Services/AWSQBusiness/QBusinessClient.swift +++ b/Sources/Services/AWSQBusiness/QBusinessClient.swift @@ -117,7 +117,8 @@ extension QBusinessClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct QBusinessClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? QBusinessClient.QBusinessClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension QBusinessClient { /// Performs the `BatchDeleteDocument` operation on the `ExpertQ` service. /// diff --git a/Sources/Services/AWSQConnect/Plugins.swift b/Sources/Services/AWSQConnect/Plugins.swift new file mode 100644 index 00000000000..c9673d27b2f --- /dev/null +++ b/Sources/Services/AWSQConnect/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class QConnectClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? QConnectClient.QConnectClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? QConnectClient.QConnectClientConfiguration { + config.authSchemeResolver = DefaultQConnectAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class QConnectClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: QConnectAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? QConnectClient.QConnectClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSQConnect/QConnectClient.swift b/Sources/Services/AWSQConnect/QConnectClient.swift index 56506516cd1..618eb03dd0b 100644 --- a/Sources/Services/AWSQConnect/QConnectClient.swift +++ b/Sources/Services/AWSQConnect/QConnectClient.swift @@ -117,7 +117,8 @@ extension QConnectClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct QConnectClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? QConnectClient.QConnectClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension QConnectClient { /// Performs the `CreateAssistant` operation on the `WisdomService` service. /// diff --git a/Sources/Services/AWSQLDB/Plugins.swift b/Sources/Services/AWSQLDB/Plugins.swift new file mode 100644 index 00000000000..ecaba80db92 --- /dev/null +++ b/Sources/Services/AWSQLDB/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class QLDBClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? QLDBClient.QLDBClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? QLDBClient.QLDBClientConfiguration { + config.authSchemeResolver = DefaultQLDBAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class QLDBClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: QLDBAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? QLDBClient.QLDBClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSQLDB/QLDBClient.swift b/Sources/Services/AWSQLDB/QLDBClient.swift index c3d8e9582a0..6faa1968a18 100644 --- a/Sources/Services/AWSQLDB/QLDBClient.swift +++ b/Sources/Services/AWSQLDB/QLDBClient.swift @@ -117,7 +117,8 @@ extension QLDBClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct QLDBClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? QLDBClient.QLDBClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension QLDBClient { /// Performs the `CancelJournalKinesisStream` operation on the `AmazonQLDB` service. /// diff --git a/Sources/Services/AWSQLDBSession/Plugins.swift b/Sources/Services/AWSQLDBSession/Plugins.swift new file mode 100644 index 00000000000..c533f0b903b --- /dev/null +++ b/Sources/Services/AWSQLDBSession/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class QLDBSessionClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? QLDBSessionClient.QLDBSessionClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? QLDBSessionClient.QLDBSessionClientConfiguration { + config.authSchemeResolver = DefaultQLDBSessionAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class QLDBSessionClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: QLDBSessionAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? QLDBSessionClient.QLDBSessionClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSQLDBSession/QLDBSessionClient.swift b/Sources/Services/AWSQLDBSession/QLDBSessionClient.swift index 17d1284d0e4..4ed21f47c8b 100644 --- a/Sources/Services/AWSQLDBSession/QLDBSessionClient.swift +++ b/Sources/Services/AWSQLDBSession/QLDBSessionClient.swift @@ -117,7 +117,8 @@ extension QLDBSessionClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct QLDBSessionClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? QLDBSessionClient.QLDBSessionClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension QLDBSessionClient { /// Performs the `SendCommand` operation on the `QLDBSession` service. /// diff --git a/Sources/Services/AWSQuickSight/Plugins.swift b/Sources/Services/AWSQuickSight/Plugins.swift new file mode 100644 index 00000000000..3b9b497f618 --- /dev/null +++ b/Sources/Services/AWSQuickSight/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class QuickSightClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? QuickSightClient.QuickSightClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? QuickSightClient.QuickSightClientConfiguration { + config.authSchemeResolver = DefaultQuickSightAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class QuickSightClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: QuickSightAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? QuickSightClient.QuickSightClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSQuickSight/QuickSightClient.swift b/Sources/Services/AWSQuickSight/QuickSightClient.swift index e176a0fa8e4..bf67c17ef0a 100644 --- a/Sources/Services/AWSQuickSight/QuickSightClient.swift +++ b/Sources/Services/AWSQuickSight/QuickSightClient.swift @@ -117,7 +117,8 @@ extension QuickSightClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct QuickSightClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? QuickSightClient.QuickSightClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension QuickSightClient { /// Performs the `CancelIngestion` operation on the `QuickSight_20180401` service. /// diff --git a/Sources/Services/AWSRAM/Plugins.swift b/Sources/Services/AWSRAM/Plugins.swift new file mode 100644 index 00000000000..1a74da5045d --- /dev/null +++ b/Sources/Services/AWSRAM/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class RAMClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RAMClient.RAMClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RAMClient.RAMClientConfiguration { + config.authSchemeResolver = DefaultRAMAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class RAMClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: RAMAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RAMClient.RAMClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRAM/RAMClient.swift b/Sources/Services/AWSRAM/RAMClient.swift index f5e80e6d2c3..50716573327 100644 --- a/Sources/Services/AWSRAM/RAMClient.swift +++ b/Sources/Services/AWSRAM/RAMClient.swift @@ -117,7 +117,8 @@ extension RAMClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct RAMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? RAMClient.RAMClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension RAMClient { /// Performs the `AcceptResourceShareInvitation` operation on the `AmazonResourceSharing` service. /// diff --git a/Sources/Services/AWSRDS/Plugins.swift b/Sources/Services/AWSRDS/Plugins.swift new file mode 100644 index 00000000000..d85ca7bda32 --- /dev/null +++ b/Sources/Services/AWSRDS/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class RDSClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RDSClient.RDSClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RDSClient.RDSClientConfiguration { + config.authSchemeResolver = DefaultRDSAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class RDSClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: RDSAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RDSClient.RDSClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRDS/RDSClient.swift b/Sources/Services/AWSRDS/RDSClient.swift index f4054921c0e..ce2a80970ab 100644 --- a/Sources/Services/AWSRDS/RDSClient.swift +++ b/Sources/Services/AWSRDS/RDSClient.swift @@ -110,7 +110,8 @@ extension RDSClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -128,21 +129,6 @@ public struct RDSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? RDSClient.RDSClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension RDSClient { /// Performs the `AddRoleToDBCluster` operation on the `AmazonRDSv19` service. /// diff --git a/Sources/Services/AWSRDSData/Plugins.swift b/Sources/Services/AWSRDSData/Plugins.swift new file mode 100644 index 00000000000..082470cf391 --- /dev/null +++ b/Sources/Services/AWSRDSData/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class RDSDataClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RDSDataClient.RDSDataClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RDSDataClient.RDSDataClientConfiguration { + config.authSchemeResolver = DefaultRDSDataAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class RDSDataClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: RDSDataAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RDSDataClient.RDSDataClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRDSData/RDSDataClient.swift b/Sources/Services/AWSRDSData/RDSDataClient.swift index d0a3a54962b..4410928d53a 100644 --- a/Sources/Services/AWSRDSData/RDSDataClient.swift +++ b/Sources/Services/AWSRDSData/RDSDataClient.swift @@ -117,7 +117,8 @@ extension RDSDataClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct RDSDataClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? RDSDataClient.RDSDataClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension RDSDataClient { /// Performs the `BatchExecuteStatement` operation on the `RdsDataService` service. /// diff --git a/Sources/Services/AWSRUM/Plugins.swift b/Sources/Services/AWSRUM/Plugins.swift new file mode 100644 index 00000000000..fc2d5951bb6 --- /dev/null +++ b/Sources/Services/AWSRUM/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class RUMClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RUMClient.RUMClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RUMClient.RUMClientConfiguration { + config.authSchemeResolver = DefaultRUMAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class RUMClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: RUMAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RUMClient.RUMClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRUM/RUMClient.swift b/Sources/Services/AWSRUM/RUMClient.swift index 978850e0402..d06416e6714 100644 --- a/Sources/Services/AWSRUM/RUMClient.swift +++ b/Sources/Services/AWSRUM/RUMClient.swift @@ -117,7 +117,8 @@ extension RUMClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct RUMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? RUMClient.RUMClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension RUMClient { /// Performs the `BatchCreateRumMetricDefinitions` operation on the `RUM` service. /// diff --git a/Sources/Services/AWSRbin/Plugins.swift b/Sources/Services/AWSRbin/Plugins.swift new file mode 100644 index 00000000000..f006a9cfbf3 --- /dev/null +++ b/Sources/Services/AWSRbin/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class RbinClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RbinClient.RbinClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RbinClient.RbinClientConfiguration { + config.authSchemeResolver = DefaultRbinAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class RbinClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: RbinAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RbinClient.RbinClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRbin/RbinClient.swift b/Sources/Services/AWSRbin/RbinClient.swift index b373cf1ac82..8ae8a0a2b40 100644 --- a/Sources/Services/AWSRbin/RbinClient.swift +++ b/Sources/Services/AWSRbin/RbinClient.swift @@ -117,7 +117,8 @@ extension RbinClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct RbinClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? RbinClient.RbinClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension RbinClient { /// Performs the `CreateRule` operation on the `AmazonRecycleBin` service. /// diff --git a/Sources/Services/AWSRedshift/Plugins.swift b/Sources/Services/AWSRedshift/Plugins.swift new file mode 100644 index 00000000000..efb76a8df57 --- /dev/null +++ b/Sources/Services/AWSRedshift/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class RedshiftClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RedshiftClient.RedshiftClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RedshiftClient.RedshiftClientConfiguration { + config.authSchemeResolver = DefaultRedshiftAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class RedshiftClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: RedshiftAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RedshiftClient.RedshiftClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRedshift/RedshiftClient.swift b/Sources/Services/AWSRedshift/RedshiftClient.swift index 94d3b6654e6..cd8049a8495 100644 --- a/Sources/Services/AWSRedshift/RedshiftClient.swift +++ b/Sources/Services/AWSRedshift/RedshiftClient.swift @@ -110,7 +110,8 @@ extension RedshiftClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -128,21 +129,6 @@ public struct RedshiftClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? RedshiftClient.RedshiftClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension RedshiftClient { /// Performs the `AcceptReservedNodeExchange` operation on the `RedshiftServiceVersion20121201` service. /// diff --git a/Sources/Services/AWSRedshiftData/Plugins.swift b/Sources/Services/AWSRedshiftData/Plugins.swift new file mode 100644 index 00000000000..f3b4a65c4b7 --- /dev/null +++ b/Sources/Services/AWSRedshiftData/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class RedshiftDataClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RedshiftDataClient.RedshiftDataClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RedshiftDataClient.RedshiftDataClientConfiguration { + config.authSchemeResolver = DefaultRedshiftDataAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class RedshiftDataClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: RedshiftDataAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RedshiftDataClient.RedshiftDataClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRedshiftData/RedshiftDataClient.swift b/Sources/Services/AWSRedshiftData/RedshiftDataClient.swift index 934a2baab67..089c0c12ccb 100644 --- a/Sources/Services/AWSRedshiftData/RedshiftDataClient.swift +++ b/Sources/Services/AWSRedshiftData/RedshiftDataClient.swift @@ -117,7 +117,8 @@ extension RedshiftDataClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct RedshiftDataClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? RedshiftDataClient.RedshiftDataClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension RedshiftDataClient { /// Performs the `BatchExecuteStatement` operation on the `RedshiftData` service. /// diff --git a/Sources/Services/AWSRedshiftServerless/Plugins.swift b/Sources/Services/AWSRedshiftServerless/Plugins.swift new file mode 100644 index 00000000000..741850fa371 --- /dev/null +++ b/Sources/Services/AWSRedshiftServerless/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class RedshiftServerlessClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RedshiftServerlessClient.RedshiftServerlessClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RedshiftServerlessClient.RedshiftServerlessClientConfiguration { + config.authSchemeResolver = DefaultRedshiftServerlessAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class RedshiftServerlessClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: RedshiftServerlessAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RedshiftServerlessClient.RedshiftServerlessClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRedshiftServerless/RedshiftServerlessClient.swift b/Sources/Services/AWSRedshiftServerless/RedshiftServerlessClient.swift index b47f082df84..0aea76dd46f 100644 --- a/Sources/Services/AWSRedshiftServerless/RedshiftServerlessClient.swift +++ b/Sources/Services/AWSRedshiftServerless/RedshiftServerlessClient.swift @@ -117,7 +117,8 @@ extension RedshiftServerlessClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct RedshiftServerlessClientLogHandlerFactory: ClientRuntime.SDKLogHan } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? RedshiftServerlessClient.RedshiftServerlessClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension RedshiftServerlessClient { /// Performs the `ConvertRecoveryPointToSnapshot` operation on the `RedshiftServerless` service. /// diff --git a/Sources/Services/AWSRekognition/Plugins.swift b/Sources/Services/AWSRekognition/Plugins.swift new file mode 100644 index 00000000000..94e58bf702b --- /dev/null +++ b/Sources/Services/AWSRekognition/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class RekognitionClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RekognitionClient.RekognitionClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RekognitionClient.RekognitionClientConfiguration { + config.authSchemeResolver = DefaultRekognitionAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class RekognitionClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: RekognitionAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RekognitionClient.RekognitionClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRekognition/RekognitionClient.swift b/Sources/Services/AWSRekognition/RekognitionClient.swift index d6e6ad73281..e611ff1b41e 100644 --- a/Sources/Services/AWSRekognition/RekognitionClient.swift +++ b/Sources/Services/AWSRekognition/RekognitionClient.swift @@ -117,7 +117,8 @@ extension RekognitionClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct RekognitionClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? RekognitionClient.RekognitionClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension RekognitionClient { /// Performs the `AssociateFaces` operation on the `RekognitionService` service. /// diff --git a/Sources/Services/AWSRepostspace/Plugins.swift b/Sources/Services/AWSRepostspace/Plugins.swift new file mode 100644 index 00000000000..87689592dc5 --- /dev/null +++ b/Sources/Services/AWSRepostspace/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class RepostspaceClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RepostspaceClient.RepostspaceClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RepostspaceClient.RepostspaceClientConfiguration { + config.authSchemeResolver = DefaultRepostspaceAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class RepostspaceClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: RepostspaceAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RepostspaceClient.RepostspaceClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRepostspace/RepostspaceClient.swift b/Sources/Services/AWSRepostspace/RepostspaceClient.swift index eea6201fd61..e2cbc8a1b83 100644 --- a/Sources/Services/AWSRepostspace/RepostspaceClient.swift +++ b/Sources/Services/AWSRepostspace/RepostspaceClient.swift @@ -117,7 +117,8 @@ extension RepostspaceClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct RepostspaceClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? RepostspaceClient.RepostspaceClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension RepostspaceClient { /// Performs the `CreateSpace` operation on the `RepostSpace` service. /// diff --git a/Sources/Services/AWSResiliencehub/Plugins.swift b/Sources/Services/AWSResiliencehub/Plugins.swift new file mode 100644 index 00000000000..22c49cd831e --- /dev/null +++ b/Sources/Services/AWSResiliencehub/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ResiliencehubClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ResiliencehubClient.ResiliencehubClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ResiliencehubClient.ResiliencehubClientConfiguration { + config.authSchemeResolver = DefaultResiliencehubAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ResiliencehubClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ResiliencehubAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ResiliencehubClient.ResiliencehubClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSResiliencehub/ResiliencehubClient.swift b/Sources/Services/AWSResiliencehub/ResiliencehubClient.swift index 59235bb8ccc..d833b4869ca 100644 --- a/Sources/Services/AWSResiliencehub/ResiliencehubClient.swift +++ b/Sources/Services/AWSResiliencehub/ResiliencehubClient.swift @@ -117,7 +117,8 @@ extension ResiliencehubClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ResiliencehubClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ResiliencehubClient.ResiliencehubClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ResiliencehubClient { /// Performs the `AddDraftAppVersionResourceMappings` operation on the `AwsResilienceHub` service. /// diff --git a/Sources/Services/AWSResourceExplorer2/Plugins.swift b/Sources/Services/AWSResourceExplorer2/Plugins.swift new file mode 100644 index 00000000000..07d5e324f93 --- /dev/null +++ b/Sources/Services/AWSResourceExplorer2/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ResourceExplorer2ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ResourceExplorer2Client.ResourceExplorer2ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ResourceExplorer2Client.ResourceExplorer2ClientConfiguration { + config.authSchemeResolver = DefaultResourceExplorer2AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ResourceExplorer2ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ResourceExplorer2AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ResourceExplorer2Client.ResourceExplorer2ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSResourceExplorer2/ResourceExplorer2Client.swift b/Sources/Services/AWSResourceExplorer2/ResourceExplorer2Client.swift index 60707a03720..7a3b059865d 100644 --- a/Sources/Services/AWSResourceExplorer2/ResourceExplorer2Client.swift +++ b/Sources/Services/AWSResourceExplorer2/ResourceExplorer2Client.swift @@ -117,7 +117,8 @@ extension ResourceExplorer2Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ResourceExplorer2ClientLogHandlerFactory: ClientRuntime.SDKLogHand } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ResourceExplorer2Client.ResourceExplorer2ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ResourceExplorer2Client { /// Performs the `AssociateDefaultView` operation on the `ResourceExplorer` service. /// diff --git a/Sources/Services/AWSResourceGroups/Plugins.swift b/Sources/Services/AWSResourceGroups/Plugins.swift new file mode 100644 index 00000000000..4024084f294 --- /dev/null +++ b/Sources/Services/AWSResourceGroups/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ResourceGroupsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ResourceGroupsClient.ResourceGroupsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ResourceGroupsClient.ResourceGroupsClientConfiguration { + config.authSchemeResolver = DefaultResourceGroupsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ResourceGroupsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ResourceGroupsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ResourceGroupsClient.ResourceGroupsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSResourceGroups/ResourceGroupsClient.swift b/Sources/Services/AWSResourceGroups/ResourceGroupsClient.swift index 483cc459994..a6be4279578 100644 --- a/Sources/Services/AWSResourceGroups/ResourceGroupsClient.swift +++ b/Sources/Services/AWSResourceGroups/ResourceGroupsClient.swift @@ -117,7 +117,8 @@ extension ResourceGroupsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ResourceGroupsClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ResourceGroupsClient.ResourceGroupsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ResourceGroupsClient { /// Performs the `CreateGroup` operation on the `Ardi` service. /// diff --git a/Sources/Services/AWSResourceGroupsTaggingAPI/Plugins.swift b/Sources/Services/AWSResourceGroupsTaggingAPI/Plugins.swift new file mode 100644 index 00000000000..8ec291358ed --- /dev/null +++ b/Sources/Services/AWSResourceGroupsTaggingAPI/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ResourceGroupsTaggingAPIClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ResourceGroupsTaggingAPIClient.ResourceGroupsTaggingAPIClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ResourceGroupsTaggingAPIClient.ResourceGroupsTaggingAPIClientConfiguration { + config.authSchemeResolver = DefaultResourceGroupsTaggingAPIAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ResourceGroupsTaggingAPIClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ResourceGroupsTaggingAPIAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ResourceGroupsTaggingAPIClient.ResourceGroupsTaggingAPIClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSResourceGroupsTaggingAPI/ResourceGroupsTaggingAPIClient.swift b/Sources/Services/AWSResourceGroupsTaggingAPI/ResourceGroupsTaggingAPIClient.swift index 670bc66c1c2..a702ed7ef3c 100644 --- a/Sources/Services/AWSResourceGroupsTaggingAPI/ResourceGroupsTaggingAPIClient.swift +++ b/Sources/Services/AWSResourceGroupsTaggingAPI/ResourceGroupsTaggingAPIClient.swift @@ -117,7 +117,8 @@ extension ResourceGroupsTaggingAPIClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ResourceGroupsTaggingAPIClientLogHandlerFactory: ClientRuntime.SDK } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ResourceGroupsTaggingAPIClient.ResourceGroupsTaggingAPIClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ResourceGroupsTaggingAPIClient { /// Performs the `DescribeReportCreation` operation on the `ResourceGroupsTaggingAPI_20170126` service. /// diff --git a/Sources/Services/AWSRoboMaker/Plugins.swift b/Sources/Services/AWSRoboMaker/Plugins.swift new file mode 100644 index 00000000000..2b3ffa3502a --- /dev/null +++ b/Sources/Services/AWSRoboMaker/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class RoboMakerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RoboMakerClient.RoboMakerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RoboMakerClient.RoboMakerClientConfiguration { + config.authSchemeResolver = DefaultRoboMakerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class RoboMakerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: RoboMakerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RoboMakerClient.RoboMakerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRoboMaker/RoboMakerClient.swift b/Sources/Services/AWSRoboMaker/RoboMakerClient.swift index 945a2064f5c..d0cb14405cf 100644 --- a/Sources/Services/AWSRoboMaker/RoboMakerClient.swift +++ b/Sources/Services/AWSRoboMaker/RoboMakerClient.swift @@ -117,7 +117,8 @@ extension RoboMakerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct RoboMakerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? RoboMakerClient.RoboMakerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension RoboMakerClient { /// Performs the `BatchDeleteWorlds` operation on the `robomaker` service. /// diff --git a/Sources/Services/AWSRolesAnywhere/Plugins.swift b/Sources/Services/AWSRolesAnywhere/Plugins.swift new file mode 100644 index 00000000000..7e2fb714133 --- /dev/null +++ b/Sources/Services/AWSRolesAnywhere/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class RolesAnywhereClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RolesAnywhereClient.RolesAnywhereClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RolesAnywhereClient.RolesAnywhereClientConfiguration { + config.authSchemeResolver = DefaultRolesAnywhereAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class RolesAnywhereClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: RolesAnywhereAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? RolesAnywhereClient.RolesAnywhereClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRolesAnywhere/RolesAnywhereClient.swift b/Sources/Services/AWSRolesAnywhere/RolesAnywhereClient.swift index 66532c1910f..441af309d39 100644 --- a/Sources/Services/AWSRolesAnywhere/RolesAnywhereClient.swift +++ b/Sources/Services/AWSRolesAnywhere/RolesAnywhereClient.swift @@ -117,7 +117,8 @@ extension RolesAnywhereClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct RolesAnywhereClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? RolesAnywhereClient.RolesAnywhereClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension RolesAnywhereClient { /// Performs the `CreateProfile` operation on the `RolesAnywhere` service. /// diff --git a/Sources/Services/AWSRoute53/Plugins.swift b/Sources/Services/AWSRoute53/Plugins.swift new file mode 100644 index 00000000000..c0ee483d474 --- /dev/null +++ b/Sources/Services/AWSRoute53/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class Route53ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53Client.Route53ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53Client.Route53ClientConfiguration { + config.authSchemeResolver = DefaultRoute53AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class Route53ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: Route53AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53Client.Route53ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRoute53/Route53Client.swift b/Sources/Services/AWSRoute53/Route53Client.swift index cde7c07c0af..83c91fa0e27 100644 --- a/Sources/Services/AWSRoute53/Route53Client.swift +++ b/Sources/Services/AWSRoute53/Route53Client.swift @@ -108,7 +108,8 @@ extension Route53Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -126,21 +127,6 @@ public struct Route53ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? Route53Client.Route53ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension Route53Client { /// Performs the `ActivateKeySigningKey` operation on the `AWSDnsV20130401` service. /// diff --git a/Sources/Services/AWSRoute53Domains/Plugins.swift b/Sources/Services/AWSRoute53Domains/Plugins.swift new file mode 100644 index 00000000000..2f93d510c55 --- /dev/null +++ b/Sources/Services/AWSRoute53Domains/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class Route53DomainsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53DomainsClient.Route53DomainsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53DomainsClient.Route53DomainsClientConfiguration { + config.authSchemeResolver = DefaultRoute53DomainsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class Route53DomainsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: Route53DomainsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53DomainsClient.Route53DomainsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRoute53Domains/Route53DomainsClient.swift b/Sources/Services/AWSRoute53Domains/Route53DomainsClient.swift index 033ca0a9925..dd6c9bf9093 100644 --- a/Sources/Services/AWSRoute53Domains/Route53DomainsClient.swift +++ b/Sources/Services/AWSRoute53Domains/Route53DomainsClient.swift @@ -117,7 +117,8 @@ extension Route53DomainsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct Route53DomainsClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? Route53DomainsClient.Route53DomainsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension Route53DomainsClient { /// Performs the `AcceptDomainTransferFromAnotherAwsAccount` operation on the `Route53Domains_v20140515` service. /// diff --git a/Sources/Services/AWSRoute53RecoveryCluster/Plugins.swift b/Sources/Services/AWSRoute53RecoveryCluster/Plugins.swift new file mode 100644 index 00000000000..6470f34b60a --- /dev/null +++ b/Sources/Services/AWSRoute53RecoveryCluster/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class Route53RecoveryClusterClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53RecoveryClusterClient.Route53RecoveryClusterClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53RecoveryClusterClient.Route53RecoveryClusterClientConfiguration { + config.authSchemeResolver = DefaultRoute53RecoveryClusterAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class Route53RecoveryClusterClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: Route53RecoveryClusterAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53RecoveryClusterClient.Route53RecoveryClusterClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRoute53RecoveryCluster/Route53RecoveryClusterClient.swift b/Sources/Services/AWSRoute53RecoveryCluster/Route53RecoveryClusterClient.swift index a822742f6ec..eba329cffc9 100644 --- a/Sources/Services/AWSRoute53RecoveryCluster/Route53RecoveryClusterClient.swift +++ b/Sources/Services/AWSRoute53RecoveryCluster/Route53RecoveryClusterClient.swift @@ -117,7 +117,8 @@ extension Route53RecoveryClusterClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct Route53RecoveryClusterClientLogHandlerFactory: ClientRuntime.SDKLo } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? Route53RecoveryClusterClient.Route53RecoveryClusterClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension Route53RecoveryClusterClient { /// Performs the `GetRoutingControlState` operation on the `ToggleCustomerAPI` service. /// diff --git a/Sources/Services/AWSRoute53RecoveryControlConfig/Plugins.swift b/Sources/Services/AWSRoute53RecoveryControlConfig/Plugins.swift new file mode 100644 index 00000000000..e054c6e3be1 --- /dev/null +++ b/Sources/Services/AWSRoute53RecoveryControlConfig/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class Route53RecoveryControlConfigClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53RecoveryControlConfigClient.Route53RecoveryControlConfigClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53RecoveryControlConfigClient.Route53RecoveryControlConfigClientConfiguration { + config.authSchemeResolver = DefaultRoute53RecoveryControlConfigAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class Route53RecoveryControlConfigClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: Route53RecoveryControlConfigAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53RecoveryControlConfigClient.Route53RecoveryControlConfigClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRoute53RecoveryControlConfig/Route53RecoveryControlConfigClient.swift b/Sources/Services/AWSRoute53RecoveryControlConfig/Route53RecoveryControlConfigClient.swift index 8e33678928c..18694e73da1 100644 --- a/Sources/Services/AWSRoute53RecoveryControlConfig/Route53RecoveryControlConfigClient.swift +++ b/Sources/Services/AWSRoute53RecoveryControlConfig/Route53RecoveryControlConfigClient.swift @@ -117,7 +117,8 @@ extension Route53RecoveryControlConfigClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct Route53RecoveryControlConfigClientLogHandlerFactory: ClientRuntime } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? Route53RecoveryControlConfigClient.Route53RecoveryControlConfigClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension Route53RecoveryControlConfigClient { /// Performs the `CreateCluster` operation on the `Route53RecoveryControlConfig` service. /// diff --git a/Sources/Services/AWSRoute53RecoveryReadiness/Plugins.swift b/Sources/Services/AWSRoute53RecoveryReadiness/Plugins.swift new file mode 100644 index 00000000000..9a88d967ee3 --- /dev/null +++ b/Sources/Services/AWSRoute53RecoveryReadiness/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class Route53RecoveryReadinessClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53RecoveryReadinessClient.Route53RecoveryReadinessClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53RecoveryReadinessClient.Route53RecoveryReadinessClientConfiguration { + config.authSchemeResolver = DefaultRoute53RecoveryReadinessAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class Route53RecoveryReadinessClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: Route53RecoveryReadinessAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53RecoveryReadinessClient.Route53RecoveryReadinessClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRoute53RecoveryReadiness/Route53RecoveryReadinessClient.swift b/Sources/Services/AWSRoute53RecoveryReadiness/Route53RecoveryReadinessClient.swift index 2bda1400d3f..f71f82dbc19 100644 --- a/Sources/Services/AWSRoute53RecoveryReadiness/Route53RecoveryReadinessClient.swift +++ b/Sources/Services/AWSRoute53RecoveryReadiness/Route53RecoveryReadinessClient.swift @@ -117,7 +117,8 @@ extension Route53RecoveryReadinessClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct Route53RecoveryReadinessClientLogHandlerFactory: ClientRuntime.SDK } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? Route53RecoveryReadinessClient.Route53RecoveryReadinessClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension Route53RecoveryReadinessClient { /// Performs the `CreateCell` operation on the `Route53RecoveryReadiness` service. /// diff --git a/Sources/Services/AWSRoute53Resolver/Plugins.swift b/Sources/Services/AWSRoute53Resolver/Plugins.swift new file mode 100644 index 00000000000..63e6ff46ea8 --- /dev/null +++ b/Sources/Services/AWSRoute53Resolver/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class Route53ResolverClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53ResolverClient.Route53ResolverClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53ResolverClient.Route53ResolverClientConfiguration { + config.authSchemeResolver = DefaultRoute53ResolverAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class Route53ResolverClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: Route53ResolverAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? Route53ResolverClient.Route53ResolverClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSRoute53Resolver/Route53ResolverClient.swift b/Sources/Services/AWSRoute53Resolver/Route53ResolverClient.swift index 8b53cf4f20d..8beac283572 100644 --- a/Sources/Services/AWSRoute53Resolver/Route53ResolverClient.swift +++ b/Sources/Services/AWSRoute53Resolver/Route53ResolverClient.swift @@ -117,7 +117,8 @@ extension Route53ResolverClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct Route53ResolverClientLogHandlerFactory: ClientRuntime.SDKLogHandle } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? Route53ResolverClient.Route53ResolverClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension Route53ResolverClient { /// Performs the `AssociateFirewallRuleGroup` operation on the `Route53Resolver` service. /// diff --git a/Sources/Services/AWSS3/Plugins.swift b/Sources/Services/AWSS3/Plugins.swift new file mode 100644 index 00000000000..d2c9a22488e --- /dev/null +++ b/Sources/Services/AWSS3/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class S3ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? S3Client.S3ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? S3Client.S3ClientConfiguration { + config.authSchemeResolver = DefaultS3AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme(), SigV4AAuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class S3ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: S3AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? S3Client.S3ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSS3/S3Client.swift b/Sources/Services/AWSS3/S3Client.swift index 2be35079bd7..23ceaa78e25 100644 --- a/Sources/Services/AWSS3/S3Client.swift +++ b/Sources/Services/AWSS3/S3Client.swift @@ -129,7 +129,8 @@ extension S3Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -147,21 +148,6 @@ public struct S3ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? S3Client.S3ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension S3Client { /// Performs the `AbortMultipartUpload` operation on the `AmazonS3` service. /// diff --git a/Sources/Services/AWSS3Control/Plugins.swift b/Sources/Services/AWSS3Control/Plugins.swift new file mode 100644 index 00000000000..1b50b60fd7a --- /dev/null +++ b/Sources/Services/AWSS3Control/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class S3ControlClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? S3ControlClient.S3ControlClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? S3ControlClient.S3ControlClientConfiguration { + config.authSchemeResolver = DefaultS3ControlAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class S3ControlClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: S3ControlAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? S3ControlClient.S3ControlClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSS3Control/S3ControlClient.swift b/Sources/Services/AWSS3Control/S3ControlClient.swift index 8b065213fa8..e9cec9a073f 100644 --- a/Sources/Services/AWSS3Control/S3ControlClient.swift +++ b/Sources/Services/AWSS3Control/S3ControlClient.swift @@ -111,7 +111,8 @@ extension S3ControlClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -129,21 +130,6 @@ public struct S3ControlClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? S3ControlClient.S3ControlClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension S3ControlClient { /// Performs the `AssociateAccessGrantsIdentityCenter` operation on the `AWSS3ControlServiceV20180820` service. /// diff --git a/Sources/Services/AWSS3Outposts/Plugins.swift b/Sources/Services/AWSS3Outposts/Plugins.swift new file mode 100644 index 00000000000..a9d28b3ae91 --- /dev/null +++ b/Sources/Services/AWSS3Outposts/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class S3OutpostsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? S3OutpostsClient.S3OutpostsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? S3OutpostsClient.S3OutpostsClientConfiguration { + config.authSchemeResolver = DefaultS3OutpostsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class S3OutpostsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: S3OutpostsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? S3OutpostsClient.S3OutpostsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSS3Outposts/S3OutpostsClient.swift b/Sources/Services/AWSS3Outposts/S3OutpostsClient.swift index 21bc50edfa6..16dd8474e47 100644 --- a/Sources/Services/AWSS3Outposts/S3OutpostsClient.swift +++ b/Sources/Services/AWSS3Outposts/S3OutpostsClient.swift @@ -117,7 +117,8 @@ extension S3OutpostsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct S3OutpostsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? S3OutpostsClient.S3OutpostsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension S3OutpostsClient { /// Performs the `CreateEndpoint` operation on the `S3Outposts` service. /// diff --git a/Sources/Services/AWSSES/Plugins.swift b/Sources/Services/AWSSES/Plugins.swift new file mode 100644 index 00000000000..a7fac795e35 --- /dev/null +++ b/Sources/Services/AWSSES/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SESClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SESClient.SESClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SESClient.SESClientConfiguration { + config.authSchemeResolver = DefaultSESAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SESClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SESAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SESClient.SESClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSES/SESClient.swift b/Sources/Services/AWSSES/SESClient.swift index 59b350c7a20..b6ce4b99f60 100644 --- a/Sources/Services/AWSSES/SESClient.swift +++ b/Sources/Services/AWSSES/SESClient.swift @@ -110,7 +110,8 @@ extension SESClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -128,21 +129,6 @@ public struct SESClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SESClient.SESClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SESClient { /// Performs the `CloneReceiptRuleSet` operation on the `SimpleEmailService` service. /// diff --git a/Sources/Services/AWSSESv2/Plugins.swift b/Sources/Services/AWSSESv2/Plugins.swift new file mode 100644 index 00000000000..78ff0cc893e --- /dev/null +++ b/Sources/Services/AWSSESv2/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SESv2ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SESv2Client.SESv2ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SESv2Client.SESv2ClientConfiguration { + config.authSchemeResolver = DefaultSESv2AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SESv2ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SESv2AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SESv2Client.SESv2ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSESv2/SESv2Client.swift b/Sources/Services/AWSSESv2/SESv2Client.swift index 70a3fd7fc10..e218e8487e0 100644 --- a/Sources/Services/AWSSESv2/SESv2Client.swift +++ b/Sources/Services/AWSSESv2/SESv2Client.swift @@ -117,7 +117,8 @@ extension SESv2Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SESv2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SESv2Client.SESv2ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SESv2Client { /// Performs the `BatchGetMetricData` operation on the `SimpleEmailService_v2` service. /// diff --git a/Sources/Services/AWSSFN/Plugins.swift b/Sources/Services/AWSSFN/Plugins.swift new file mode 100644 index 00000000000..b00bc678908 --- /dev/null +++ b/Sources/Services/AWSSFN/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SFNClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SFNClient.SFNClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SFNClient.SFNClientConfiguration { + config.authSchemeResolver = DefaultSFNAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SFNClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SFNAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SFNClient.SFNClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSFN/SFNClient.swift b/Sources/Services/AWSSFN/SFNClient.swift index a27c051bab3..d9a752422e6 100644 --- a/Sources/Services/AWSSFN/SFNClient.swift +++ b/Sources/Services/AWSSFN/SFNClient.swift @@ -117,7 +117,8 @@ extension SFNClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SFNClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SFNClient.SFNClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SFNClient { /// Performs the `CreateActivity` operation on the `AWSStepFunctions` service. /// diff --git a/Sources/Services/AWSSMS/Plugins.swift b/Sources/Services/AWSSMS/Plugins.swift new file mode 100644 index 00000000000..a734988e212 --- /dev/null +++ b/Sources/Services/AWSSMS/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SMSClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SMSClient.SMSClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SMSClient.SMSClientConfiguration { + config.authSchemeResolver = DefaultSMSAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SMSClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SMSAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SMSClient.SMSClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSMS/SMSClient.swift b/Sources/Services/AWSSMS/SMSClient.swift index 0bc7693310d..be15eec535f 100644 --- a/Sources/Services/AWSSMS/SMSClient.swift +++ b/Sources/Services/AWSSMS/SMSClient.swift @@ -117,7 +117,8 @@ extension SMSClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SMSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SMSClient.SMSClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SMSClient { /// Performs the `CreateApp` operation on the `AWSServerMigrationService_V2016_10_24` service. /// diff --git a/Sources/Services/AWSSNS/Plugins.swift b/Sources/Services/AWSSNS/Plugins.swift new file mode 100644 index 00000000000..cbef073bd37 --- /dev/null +++ b/Sources/Services/AWSSNS/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SNSClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SNSClient.SNSClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SNSClient.SNSClientConfiguration { + config.authSchemeResolver = DefaultSNSAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SNSClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SNSAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SNSClient.SNSClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSNS/SNSClient.swift b/Sources/Services/AWSSNS/SNSClient.swift index 6fe620f562e..a6ac13a5ff7 100644 --- a/Sources/Services/AWSSNS/SNSClient.swift +++ b/Sources/Services/AWSSNS/SNSClient.swift @@ -110,7 +110,8 @@ extension SNSClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -128,21 +129,6 @@ public struct SNSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SNSClient.SNSClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SNSClient { /// Performs the `AddPermission` operation on the `AmazonSimpleNotificationService` service. /// diff --git a/Sources/Services/AWSSQS/Plugins.swift b/Sources/Services/AWSSQS/Plugins.swift new file mode 100644 index 00000000000..0cea618ed37 --- /dev/null +++ b/Sources/Services/AWSSQS/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SQSClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SQSClient.SQSClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SQSClient.SQSClientConfiguration { + config.authSchemeResolver = DefaultSQSAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SQSClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SQSAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SQSClient.SQSClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSQS/SQSClient.swift b/Sources/Services/AWSSQS/SQSClient.swift index 42a7f1eb354..d16a4945cad 100644 --- a/Sources/Services/AWSSQS/SQSClient.swift +++ b/Sources/Services/AWSSQS/SQSClient.swift @@ -117,7 +117,8 @@ extension SQSClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SQSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SQSClient.SQSClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SQSClient { /// Performs the `AddPermission` operation on the `AmazonSQS` service. /// diff --git a/Sources/Services/AWSSSM/Plugins.swift b/Sources/Services/AWSSSM/Plugins.swift new file mode 100644 index 00000000000..53d7a04a3c2 --- /dev/null +++ b/Sources/Services/AWSSSM/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SSMClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSMClient.SSMClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSMClient.SSMClientConfiguration { + config.authSchemeResolver = DefaultSSMAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SSMClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SSMAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSMClient.SSMClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSSM/SSMClient.swift b/Sources/Services/AWSSSM/SSMClient.swift index 11bcb3e9e02..910e3b3fa15 100644 --- a/Sources/Services/AWSSSM/SSMClient.swift +++ b/Sources/Services/AWSSSM/SSMClient.swift @@ -117,7 +117,8 @@ extension SSMClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SSMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SSMClient.SSMClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SSMClient { /// Performs the `AddTagsToResource` operation on the `AmazonSSM` service. /// diff --git a/Sources/Services/AWSSSMContacts/Plugins.swift b/Sources/Services/AWSSSMContacts/Plugins.swift new file mode 100644 index 00000000000..aea28ad3c0c --- /dev/null +++ b/Sources/Services/AWSSSMContacts/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SSMContactsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSMContactsClient.SSMContactsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSMContactsClient.SSMContactsClientConfiguration { + config.authSchemeResolver = DefaultSSMContactsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SSMContactsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SSMContactsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSMContactsClient.SSMContactsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSSMContacts/SSMContactsClient.swift b/Sources/Services/AWSSSMContacts/SSMContactsClient.swift index e355624c5e5..449a4b48c7f 100644 --- a/Sources/Services/AWSSSMContacts/SSMContactsClient.swift +++ b/Sources/Services/AWSSSMContacts/SSMContactsClient.swift @@ -117,7 +117,8 @@ extension SSMContactsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SSMContactsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SSMContactsClient.SSMContactsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SSMContactsClient { /// Performs the `AcceptPage` operation on the `SSMContacts` service. /// diff --git a/Sources/Services/AWSSSMIncidents/Plugins.swift b/Sources/Services/AWSSSMIncidents/Plugins.swift new file mode 100644 index 00000000000..6dd9155622d --- /dev/null +++ b/Sources/Services/AWSSSMIncidents/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SSMIncidentsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSMIncidentsClient.SSMIncidentsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSMIncidentsClient.SSMIncidentsClientConfiguration { + config.authSchemeResolver = DefaultSSMIncidentsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SSMIncidentsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SSMIncidentsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSMIncidentsClient.SSMIncidentsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSSMIncidents/SSMIncidentsClient.swift b/Sources/Services/AWSSSMIncidents/SSMIncidentsClient.swift index c6bc93370ae..b036621bb3e 100644 --- a/Sources/Services/AWSSSMIncidents/SSMIncidentsClient.swift +++ b/Sources/Services/AWSSSMIncidents/SSMIncidentsClient.swift @@ -117,7 +117,8 @@ extension SSMIncidentsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SSMIncidentsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SSMIncidentsClient.SSMIncidentsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SSMIncidentsClient { /// Performs the `BatchGetIncidentFindings` operation on the `SSMIncidents` service. /// diff --git a/Sources/Services/AWSSSO/Plugins.swift b/Sources/Services/AWSSSO/Plugins.swift new file mode 100644 index 00000000000..ed7117f7988 --- /dev/null +++ b/Sources/Services/AWSSSO/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SSOClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSOClient.SSOClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSOClient.SSOClientConfiguration { + config.authSchemeResolver = DefaultSSOAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SSOClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SSOAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSOClient.SSOClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSSO/SSOClient.swift b/Sources/Services/AWSSSO/SSOClient.swift index 7359e50aba8..c079b9db736 100644 --- a/Sources/Services/AWSSSO/SSOClient.swift +++ b/Sources/Services/AWSSSO/SSOClient.swift @@ -117,7 +117,8 @@ extension SSOClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SSOClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SSOClient.SSOClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SSOClient { /// Performs the `GetRoleCredentials` operation on the `SWBPortalService` service. /// diff --git a/Sources/Services/AWSSSOAdmin/Plugins.swift b/Sources/Services/AWSSSOAdmin/Plugins.swift new file mode 100644 index 00000000000..6590cc891e3 --- /dev/null +++ b/Sources/Services/AWSSSOAdmin/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SSOAdminClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSOAdminClient.SSOAdminClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSOAdminClient.SSOAdminClientConfiguration { + config.authSchemeResolver = DefaultSSOAdminAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SSOAdminClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SSOAdminAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSOAdminClient.SSOAdminClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSSOAdmin/SSOAdminClient.swift b/Sources/Services/AWSSSOAdmin/SSOAdminClient.swift index 6eabb235753..fca38929418 100644 --- a/Sources/Services/AWSSSOAdmin/SSOAdminClient.swift +++ b/Sources/Services/AWSSSOAdmin/SSOAdminClient.swift @@ -117,7 +117,8 @@ extension SSOAdminClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SSOAdminClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SSOAdminClient.SSOAdminClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SSOAdminClient { /// Performs the `AttachCustomerManagedPolicyReferenceToPermissionSet` operation on the `SWBExternalService` service. /// diff --git a/Sources/Services/AWSSSOOIDC/Plugins.swift b/Sources/Services/AWSSSOOIDC/Plugins.swift new file mode 100644 index 00000000000..ad84cbc8cfe --- /dev/null +++ b/Sources/Services/AWSSSOOIDC/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SSOOIDCClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSOOIDCClient.SSOOIDCClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSOOIDCClient.SSOOIDCClientConfiguration { + config.authSchemeResolver = DefaultSSOOIDCAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SSOOIDCClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SSOOIDCAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SSOOIDCClient.SSOOIDCClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSSOOIDC/SSOOIDCClient.swift b/Sources/Services/AWSSSOOIDC/SSOOIDCClient.swift index 990d75e5486..20aabca40a4 100644 --- a/Sources/Services/AWSSSOOIDC/SSOOIDCClient.swift +++ b/Sources/Services/AWSSSOOIDC/SSOOIDCClient.swift @@ -117,7 +117,8 @@ extension SSOOIDCClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SSOOIDCClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SSOOIDCClient.SSOOIDCClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SSOOIDCClient { /// Performs the `CreateToken` operation on the `AWSSSOOIDCService` service. /// diff --git a/Sources/Services/AWSSTS/Plugins.swift b/Sources/Services/AWSSTS/Plugins.swift new file mode 100644 index 00000000000..db56e5acb95 --- /dev/null +++ b/Sources/Services/AWSSTS/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class STSClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? STSClient.STSClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? STSClient.STSClientConfiguration { + config.authSchemeResolver = DefaultSTSAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class STSClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: STSAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? STSClient.STSClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSTS/STSClient.swift b/Sources/Services/AWSSTS/STSClient.swift index 9c510bb9cdc..c6748acaa05 100644 --- a/Sources/Services/AWSSTS/STSClient.swift +++ b/Sources/Services/AWSSTS/STSClient.swift @@ -116,7 +116,8 @@ extension STSClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -134,21 +135,6 @@ public struct STSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? STSClient.STSClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension STSClient { /// Performs the `AssumeRole` operation on the `AWSSecurityTokenServiceV20110615` service. /// diff --git a/Sources/Services/AWSSWF/Plugins.swift b/Sources/Services/AWSSWF/Plugins.swift new file mode 100644 index 00000000000..5ed3149437b --- /dev/null +++ b/Sources/Services/AWSSWF/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SWFClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SWFClient.SWFClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SWFClient.SWFClientConfiguration { + config.authSchemeResolver = DefaultSWFAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SWFClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SWFAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SWFClient.SWFClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSWF/SWFClient.swift b/Sources/Services/AWSSWF/SWFClient.swift index 3fb3b09c5cc..2cfdab405fe 100644 --- a/Sources/Services/AWSSWF/SWFClient.swift +++ b/Sources/Services/AWSSWF/SWFClient.swift @@ -117,7 +117,8 @@ extension SWFClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SWFClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SWFClient.SWFClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SWFClient { /// Performs the `CountClosedWorkflowExecutions` operation on the `SimpleWorkflowService` service. /// diff --git a/Sources/Services/AWSSageMaker/Plugins.swift b/Sources/Services/AWSSageMaker/Plugins.swift new file mode 100644 index 00000000000..ca3eed46630 --- /dev/null +++ b/Sources/Services/AWSSageMaker/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SageMakerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerClient.SageMakerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerClient.SageMakerClientConfiguration { + config.authSchemeResolver = DefaultSageMakerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SageMakerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SageMakerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerClient.SageMakerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSageMaker/SageMakerClient.swift b/Sources/Services/AWSSageMaker/SageMakerClient.swift index 2b81ce9df08..7cd26742584 100644 --- a/Sources/Services/AWSSageMaker/SageMakerClient.swift +++ b/Sources/Services/AWSSageMaker/SageMakerClient.swift @@ -117,7 +117,8 @@ extension SageMakerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SageMakerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SageMakerClient.SageMakerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SageMakerClient { /// Performs the `AddAssociation` operation on the `SageMaker` service. /// diff --git a/Sources/Services/AWSSageMakerA2IRuntime/Plugins.swift b/Sources/Services/AWSSageMakerA2IRuntime/Plugins.swift new file mode 100644 index 00000000000..fd7a510bed1 --- /dev/null +++ b/Sources/Services/AWSSageMakerA2IRuntime/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SageMakerA2IRuntimeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerA2IRuntimeClient.SageMakerA2IRuntimeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerA2IRuntimeClient.SageMakerA2IRuntimeClientConfiguration { + config.authSchemeResolver = DefaultSageMakerA2IRuntimeAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SageMakerA2IRuntimeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SageMakerA2IRuntimeAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerA2IRuntimeClient.SageMakerA2IRuntimeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSageMakerA2IRuntime/SageMakerA2IRuntimeClient.swift b/Sources/Services/AWSSageMakerA2IRuntime/SageMakerA2IRuntimeClient.swift index c0022944ba9..377ce18f8a0 100644 --- a/Sources/Services/AWSSageMakerA2IRuntime/SageMakerA2IRuntimeClient.swift +++ b/Sources/Services/AWSSageMakerA2IRuntime/SageMakerA2IRuntimeClient.swift @@ -117,7 +117,8 @@ extension SageMakerA2IRuntimeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SageMakerA2IRuntimeClientLogHandlerFactory: ClientRuntime.SDKLogHa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SageMakerA2IRuntimeClient.SageMakerA2IRuntimeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SageMakerA2IRuntimeClient { /// Performs the `DeleteHumanLoop` operation on the `AmazonSageMakerA2IRuntime` service. /// diff --git a/Sources/Services/AWSSageMakerFeatureStoreRuntime/Plugins.swift b/Sources/Services/AWSSageMakerFeatureStoreRuntime/Plugins.swift new file mode 100644 index 00000000000..31e588a82af --- /dev/null +++ b/Sources/Services/AWSSageMakerFeatureStoreRuntime/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SageMakerFeatureStoreRuntimeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerFeatureStoreRuntimeClient.SageMakerFeatureStoreRuntimeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerFeatureStoreRuntimeClient.SageMakerFeatureStoreRuntimeClientConfiguration { + config.authSchemeResolver = DefaultSageMakerFeatureStoreRuntimeAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SageMakerFeatureStoreRuntimeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SageMakerFeatureStoreRuntimeAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerFeatureStoreRuntimeClient.SageMakerFeatureStoreRuntimeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSageMakerFeatureStoreRuntime/SageMakerFeatureStoreRuntimeClient.swift b/Sources/Services/AWSSageMakerFeatureStoreRuntime/SageMakerFeatureStoreRuntimeClient.swift index c8e45d1c142..d74f4d22918 100644 --- a/Sources/Services/AWSSageMakerFeatureStoreRuntime/SageMakerFeatureStoreRuntimeClient.swift +++ b/Sources/Services/AWSSageMakerFeatureStoreRuntime/SageMakerFeatureStoreRuntimeClient.swift @@ -117,7 +117,8 @@ extension SageMakerFeatureStoreRuntimeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SageMakerFeatureStoreRuntimeClientLogHandlerFactory: ClientRuntime } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SageMakerFeatureStoreRuntimeClient.SageMakerFeatureStoreRuntimeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SageMakerFeatureStoreRuntimeClient { /// Performs the `BatchGetRecord` operation on the `AmazonSageMakerFeatureStoreRuntime` service. /// diff --git a/Sources/Services/AWSSageMakerGeospatial/Plugins.swift b/Sources/Services/AWSSageMakerGeospatial/Plugins.swift new file mode 100644 index 00000000000..b87db4e6926 --- /dev/null +++ b/Sources/Services/AWSSageMakerGeospatial/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SageMakerGeospatialClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerGeospatialClient.SageMakerGeospatialClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerGeospatialClient.SageMakerGeospatialClientConfiguration { + config.authSchemeResolver = DefaultSageMakerGeospatialAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SageMakerGeospatialClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SageMakerGeospatialAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerGeospatialClient.SageMakerGeospatialClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSageMakerGeospatial/SageMakerGeospatialClient.swift b/Sources/Services/AWSSageMakerGeospatial/SageMakerGeospatialClient.swift index 40cc765d56d..da604263bb7 100644 --- a/Sources/Services/AWSSageMakerGeospatial/SageMakerGeospatialClient.swift +++ b/Sources/Services/AWSSageMakerGeospatial/SageMakerGeospatialClient.swift @@ -117,7 +117,8 @@ extension SageMakerGeospatialClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SageMakerGeospatialClientLogHandlerFactory: ClientRuntime.SDKLogHa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SageMakerGeospatialClient.SageMakerGeospatialClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SageMakerGeospatialClient { /// Performs the `DeleteEarthObservationJob` operation on the `SageMakerGeospatial` service. /// diff --git a/Sources/Services/AWSSageMakerMetrics/Plugins.swift b/Sources/Services/AWSSageMakerMetrics/Plugins.swift new file mode 100644 index 00000000000..de10d2ccef6 --- /dev/null +++ b/Sources/Services/AWSSageMakerMetrics/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SageMakerMetricsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerMetricsClient.SageMakerMetricsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerMetricsClient.SageMakerMetricsClientConfiguration { + config.authSchemeResolver = DefaultSageMakerMetricsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SageMakerMetricsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SageMakerMetricsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerMetricsClient.SageMakerMetricsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSageMakerMetrics/SageMakerMetricsClient.swift b/Sources/Services/AWSSageMakerMetrics/SageMakerMetricsClient.swift index 3c5a3c2ab9d..a2c80b06517 100644 --- a/Sources/Services/AWSSageMakerMetrics/SageMakerMetricsClient.swift +++ b/Sources/Services/AWSSageMakerMetrics/SageMakerMetricsClient.swift @@ -117,7 +117,8 @@ extension SageMakerMetricsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SageMakerMetricsClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SageMakerMetricsClient.SageMakerMetricsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SageMakerMetricsClient { /// Performs the `BatchPutMetrics` operation on the `SageMakerMetricsService` service. /// diff --git a/Sources/Services/AWSSageMakerRuntime/Plugins.swift b/Sources/Services/AWSSageMakerRuntime/Plugins.swift new file mode 100644 index 00000000000..e3612c76453 --- /dev/null +++ b/Sources/Services/AWSSageMakerRuntime/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SageMakerRuntimeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerRuntimeClient.SageMakerRuntimeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerRuntimeClient.SageMakerRuntimeClientConfiguration { + config.authSchemeResolver = DefaultSageMakerRuntimeAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SageMakerRuntimeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SageMakerRuntimeAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SageMakerRuntimeClient.SageMakerRuntimeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSageMakerRuntime/SageMakerRuntimeClient.swift b/Sources/Services/AWSSageMakerRuntime/SageMakerRuntimeClient.swift index 20d0c2b631b..6c84795fbdf 100644 --- a/Sources/Services/AWSSageMakerRuntime/SageMakerRuntimeClient.swift +++ b/Sources/Services/AWSSageMakerRuntime/SageMakerRuntimeClient.swift @@ -117,7 +117,8 @@ extension SageMakerRuntimeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SageMakerRuntimeClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SageMakerRuntimeClient.SageMakerRuntimeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SageMakerRuntimeClient { /// Performs the `InvokeEndpoint` operation on the `AmazonSageMakerRuntime` service. /// diff --git a/Sources/Services/AWSSagemakerEdge/Plugins.swift b/Sources/Services/AWSSagemakerEdge/Plugins.swift new file mode 100644 index 00000000000..abd34cf8454 --- /dev/null +++ b/Sources/Services/AWSSagemakerEdge/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SagemakerEdgeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SagemakerEdgeClient.SagemakerEdgeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SagemakerEdgeClient.SagemakerEdgeClientConfiguration { + config.authSchemeResolver = DefaultSagemakerEdgeAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SagemakerEdgeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SagemakerEdgeAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SagemakerEdgeClient.SagemakerEdgeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSagemakerEdge/SagemakerEdgeClient.swift b/Sources/Services/AWSSagemakerEdge/SagemakerEdgeClient.swift index e849c59b396..5cc738c92e2 100644 --- a/Sources/Services/AWSSagemakerEdge/SagemakerEdgeClient.swift +++ b/Sources/Services/AWSSagemakerEdge/SagemakerEdgeClient.swift @@ -117,7 +117,8 @@ extension SagemakerEdgeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SagemakerEdgeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SagemakerEdgeClient.SagemakerEdgeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SagemakerEdgeClient { /// Performs the `GetDeployments` operation on the `AmazonSageMakerEdge` service. /// diff --git a/Sources/Services/AWSSavingsplans/Plugins.swift b/Sources/Services/AWSSavingsplans/Plugins.swift new file mode 100644 index 00000000000..b10f4445459 --- /dev/null +++ b/Sources/Services/AWSSavingsplans/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SavingsplansClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SavingsplansClient.SavingsplansClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SavingsplansClient.SavingsplansClientConfiguration { + config.authSchemeResolver = DefaultSavingsplansAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SavingsplansClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SavingsplansAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SavingsplansClient.SavingsplansClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSavingsplans/SavingsplansClient.swift b/Sources/Services/AWSSavingsplans/SavingsplansClient.swift index 01a59098355..4d74df9b6ca 100644 --- a/Sources/Services/AWSSavingsplans/SavingsplansClient.swift +++ b/Sources/Services/AWSSavingsplans/SavingsplansClient.swift @@ -117,7 +117,8 @@ extension SavingsplansClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SavingsplansClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SavingsplansClient.SavingsplansClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SavingsplansClient { /// Performs the `CreateSavingsPlan` operation on the `AWSSavingsPlan` service. /// diff --git a/Sources/Services/AWSScheduler/Plugins.swift b/Sources/Services/AWSScheduler/Plugins.swift new file mode 100644 index 00000000000..ace24292925 --- /dev/null +++ b/Sources/Services/AWSScheduler/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SchedulerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SchedulerClient.SchedulerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SchedulerClient.SchedulerClientConfiguration { + config.authSchemeResolver = DefaultSchedulerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SchedulerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SchedulerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SchedulerClient.SchedulerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSScheduler/SchedulerClient.swift b/Sources/Services/AWSScheduler/SchedulerClient.swift index fa060fffb1f..716854c1f30 100644 --- a/Sources/Services/AWSScheduler/SchedulerClient.swift +++ b/Sources/Services/AWSScheduler/SchedulerClient.swift @@ -117,7 +117,8 @@ extension SchedulerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SchedulerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SchedulerClient.SchedulerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SchedulerClient { /// Performs the `CreateSchedule` operation on the `AWSChronosService` service. /// diff --git a/Sources/Services/AWSSchemas/Plugins.swift b/Sources/Services/AWSSchemas/Plugins.swift new file mode 100644 index 00000000000..1e6a948ac3a --- /dev/null +++ b/Sources/Services/AWSSchemas/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SchemasClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SchemasClient.SchemasClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SchemasClient.SchemasClientConfiguration { + config.authSchemeResolver = DefaultSchemasAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SchemasClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SchemasAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SchemasClient.SchemasClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSchemas/SchemasClient.swift b/Sources/Services/AWSSchemas/SchemasClient.swift index c46abdfdfcb..0e3fefcb99b 100644 --- a/Sources/Services/AWSSchemas/SchemasClient.swift +++ b/Sources/Services/AWSSchemas/SchemasClient.swift @@ -117,7 +117,8 @@ extension SchemasClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SchemasClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SchemasClient.SchemasClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SchemasClient { /// Performs the `CreateDiscoverer` operation on the `schemas` service. /// diff --git a/Sources/Services/AWSSecretsManager/Plugins.swift b/Sources/Services/AWSSecretsManager/Plugins.swift new file mode 100644 index 00000000000..c5014a9f235 --- /dev/null +++ b/Sources/Services/AWSSecretsManager/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SecretsManagerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SecretsManagerClient.SecretsManagerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SecretsManagerClient.SecretsManagerClientConfiguration { + config.authSchemeResolver = DefaultSecretsManagerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SecretsManagerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SecretsManagerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SecretsManagerClient.SecretsManagerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSecretsManager/SecretsManagerClient.swift b/Sources/Services/AWSSecretsManager/SecretsManagerClient.swift index 81e8526e455..ee675301d12 100644 --- a/Sources/Services/AWSSecretsManager/SecretsManagerClient.swift +++ b/Sources/Services/AWSSecretsManager/SecretsManagerClient.swift @@ -117,7 +117,8 @@ extension SecretsManagerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SecretsManagerClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SecretsManagerClient.SecretsManagerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SecretsManagerClient { /// Performs the `BatchGetSecretValue` operation on the `secretsmanager` service. /// diff --git a/Sources/Services/AWSSecurityHub/Plugins.swift b/Sources/Services/AWSSecurityHub/Plugins.swift new file mode 100644 index 00000000000..64b7b8e6857 --- /dev/null +++ b/Sources/Services/AWSSecurityHub/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SecurityHubClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SecurityHubClient.SecurityHubClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SecurityHubClient.SecurityHubClientConfiguration { + config.authSchemeResolver = DefaultSecurityHubAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SecurityHubClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SecurityHubAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SecurityHubClient.SecurityHubClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSecurityHub/SecurityHubClient.swift b/Sources/Services/AWSSecurityHub/SecurityHubClient.swift index c15abe7d2cc..c01ed68379e 100644 --- a/Sources/Services/AWSSecurityHub/SecurityHubClient.swift +++ b/Sources/Services/AWSSecurityHub/SecurityHubClient.swift @@ -117,7 +117,8 @@ extension SecurityHubClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SecurityHubClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SecurityHubClient.SecurityHubClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SecurityHubClient { /// Performs the `AcceptAdministratorInvitation` operation on the `SecurityHubAPIService` service. /// diff --git a/Sources/Services/AWSSecurityLake/Plugins.swift b/Sources/Services/AWSSecurityLake/Plugins.swift new file mode 100644 index 00000000000..da281e23aa1 --- /dev/null +++ b/Sources/Services/AWSSecurityLake/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SecurityLakeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SecurityLakeClient.SecurityLakeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SecurityLakeClient.SecurityLakeClientConfiguration { + config.authSchemeResolver = DefaultSecurityLakeAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SecurityLakeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SecurityLakeAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SecurityLakeClient.SecurityLakeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSecurityLake/SecurityLakeClient.swift b/Sources/Services/AWSSecurityLake/SecurityLakeClient.swift index 435421a5394..f6d50ddeedb 100644 --- a/Sources/Services/AWSSecurityLake/SecurityLakeClient.swift +++ b/Sources/Services/AWSSecurityLake/SecurityLakeClient.swift @@ -117,7 +117,8 @@ extension SecurityLakeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SecurityLakeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SecurityLakeClient.SecurityLakeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SecurityLakeClient { /// Performs the `CreateAwsLogSource` operation on the `SecurityLake` service. /// diff --git a/Sources/Services/AWSServerlessApplicationRepository/Plugins.swift b/Sources/Services/AWSServerlessApplicationRepository/Plugins.swift new file mode 100644 index 00000000000..788ca96bf4f --- /dev/null +++ b/Sources/Services/AWSServerlessApplicationRepository/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ServerlessApplicationRepositoryClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ServerlessApplicationRepositoryClient.ServerlessApplicationRepositoryClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ServerlessApplicationRepositoryClient.ServerlessApplicationRepositoryClientConfiguration { + config.authSchemeResolver = DefaultServerlessApplicationRepositoryAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ServerlessApplicationRepositoryClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ServerlessApplicationRepositoryAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ServerlessApplicationRepositoryClient.ServerlessApplicationRepositoryClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSServerlessApplicationRepository/ServerlessApplicationRepositoryClient.swift b/Sources/Services/AWSServerlessApplicationRepository/ServerlessApplicationRepositoryClient.swift index 556c0319845..ebe2dc1f145 100644 --- a/Sources/Services/AWSServerlessApplicationRepository/ServerlessApplicationRepositoryClient.swift +++ b/Sources/Services/AWSServerlessApplicationRepository/ServerlessApplicationRepositoryClient.swift @@ -117,7 +117,8 @@ extension ServerlessApplicationRepositoryClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ServerlessApplicationRepositoryClientLogHandlerFactory: ClientRunt } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ServerlessApplicationRepositoryClient.ServerlessApplicationRepositoryClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ServerlessApplicationRepositoryClient { /// Performs the `CreateApplication` operation on the `ServerlessApplicationRepository` service. /// diff --git a/Sources/Services/AWSServiceCatalog/Plugins.swift b/Sources/Services/AWSServiceCatalog/Plugins.swift new file mode 100644 index 00000000000..89fdab7c9bd --- /dev/null +++ b/Sources/Services/AWSServiceCatalog/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ServiceCatalogClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ServiceCatalogClient.ServiceCatalogClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ServiceCatalogClient.ServiceCatalogClientConfiguration { + config.authSchemeResolver = DefaultServiceCatalogAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ServiceCatalogClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ServiceCatalogAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ServiceCatalogClient.ServiceCatalogClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSServiceCatalog/ServiceCatalogClient.swift b/Sources/Services/AWSServiceCatalog/ServiceCatalogClient.swift index ecfbf7ee7eb..43f0c455ce7 100644 --- a/Sources/Services/AWSServiceCatalog/ServiceCatalogClient.swift +++ b/Sources/Services/AWSServiceCatalog/ServiceCatalogClient.swift @@ -117,7 +117,8 @@ extension ServiceCatalogClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ServiceCatalogClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ServiceCatalogClient.ServiceCatalogClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ServiceCatalogClient { /// Performs the `AcceptPortfolioShare` operation on the `AWS242ServiceCatalogService` service. /// diff --git a/Sources/Services/AWSServiceCatalogAppRegistry/Plugins.swift b/Sources/Services/AWSServiceCatalogAppRegistry/Plugins.swift new file mode 100644 index 00000000000..a61c484f03b --- /dev/null +++ b/Sources/Services/AWSServiceCatalogAppRegistry/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ServiceCatalogAppRegistryClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ServiceCatalogAppRegistryClient.ServiceCatalogAppRegistryClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ServiceCatalogAppRegistryClient.ServiceCatalogAppRegistryClientConfiguration { + config.authSchemeResolver = DefaultServiceCatalogAppRegistryAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ServiceCatalogAppRegistryClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ServiceCatalogAppRegistryAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ServiceCatalogAppRegistryClient.ServiceCatalogAppRegistryClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSServiceCatalogAppRegistry/ServiceCatalogAppRegistryClient.swift b/Sources/Services/AWSServiceCatalogAppRegistry/ServiceCatalogAppRegistryClient.swift index 6cc1cfae841..d4b67e86ce3 100644 --- a/Sources/Services/AWSServiceCatalogAppRegistry/ServiceCatalogAppRegistryClient.swift +++ b/Sources/Services/AWSServiceCatalogAppRegistry/ServiceCatalogAppRegistryClient.swift @@ -117,7 +117,8 @@ extension ServiceCatalogAppRegistryClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ServiceCatalogAppRegistryClientLogHandlerFactory: ClientRuntime.SD } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ServiceCatalogAppRegistryClient.ServiceCatalogAppRegistryClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ServiceCatalogAppRegistryClient { /// Performs the `AssociateAttributeGroup` operation on the `AWS242AppRegistry` service. /// diff --git a/Sources/Services/AWSServiceDiscovery/Plugins.swift b/Sources/Services/AWSServiceDiscovery/Plugins.swift new file mode 100644 index 00000000000..d1bb8378c65 --- /dev/null +++ b/Sources/Services/AWSServiceDiscovery/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ServiceDiscoveryClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ServiceDiscoveryClient.ServiceDiscoveryClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ServiceDiscoveryClient.ServiceDiscoveryClientConfiguration { + config.authSchemeResolver = DefaultServiceDiscoveryAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ServiceDiscoveryClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ServiceDiscoveryAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ServiceDiscoveryClient.ServiceDiscoveryClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSServiceDiscovery/ServiceDiscoveryClient.swift b/Sources/Services/AWSServiceDiscovery/ServiceDiscoveryClient.swift index f7ecd8100d4..4f94a5099df 100644 --- a/Sources/Services/AWSServiceDiscovery/ServiceDiscoveryClient.swift +++ b/Sources/Services/AWSServiceDiscovery/ServiceDiscoveryClient.swift @@ -117,7 +117,8 @@ extension ServiceDiscoveryClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ServiceDiscoveryClientLogHandlerFactory: ClientRuntime.SDKLogHandl } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ServiceDiscoveryClient.ServiceDiscoveryClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ServiceDiscoveryClient { /// Performs the `CreateHttpNamespace` operation on the `Route53AutoNaming_v20170314` service. /// diff --git a/Sources/Services/AWSServiceQuotas/Plugins.swift b/Sources/Services/AWSServiceQuotas/Plugins.swift new file mode 100644 index 00000000000..9a097963e68 --- /dev/null +++ b/Sources/Services/AWSServiceQuotas/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ServiceQuotasClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ServiceQuotasClient.ServiceQuotasClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ServiceQuotasClient.ServiceQuotasClientConfiguration { + config.authSchemeResolver = DefaultServiceQuotasAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ServiceQuotasClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ServiceQuotasAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ServiceQuotasClient.ServiceQuotasClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSServiceQuotas/ServiceQuotasClient.swift b/Sources/Services/AWSServiceQuotas/ServiceQuotasClient.swift index d024274dfef..1ad6b9bda0a 100644 --- a/Sources/Services/AWSServiceQuotas/ServiceQuotasClient.swift +++ b/Sources/Services/AWSServiceQuotas/ServiceQuotasClient.swift @@ -117,7 +117,8 @@ extension ServiceQuotasClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ServiceQuotasClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ServiceQuotasClient.ServiceQuotasClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ServiceQuotasClient { /// Performs the `AssociateServiceQuotaTemplate` operation on the `ServiceQuotasV20190624` service. /// diff --git a/Sources/Services/AWSShield/Plugins.swift b/Sources/Services/AWSShield/Plugins.swift new file mode 100644 index 00000000000..dfad52cc6d8 --- /dev/null +++ b/Sources/Services/AWSShield/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class ShieldClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ShieldClient.ShieldClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ShieldClient.ShieldClientConfiguration { + config.authSchemeResolver = DefaultShieldAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class ShieldClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ShieldAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? ShieldClient.ShieldClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSShield/ShieldClient.swift b/Sources/Services/AWSShield/ShieldClient.swift index 1742a98c0e6..84871e64ebe 100644 --- a/Sources/Services/AWSShield/ShieldClient.swift +++ b/Sources/Services/AWSShield/ShieldClient.swift @@ -117,7 +117,8 @@ extension ShieldClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct ShieldClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? ShieldClient.ShieldClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension ShieldClient { /// Performs the `AssociateDRTLogBucket` operation on the `AWSShield_20160616` service. /// diff --git a/Sources/Services/AWSSigner/Plugins.swift b/Sources/Services/AWSSigner/Plugins.swift new file mode 100644 index 00000000000..4ca8acf72da --- /dev/null +++ b/Sources/Services/AWSSigner/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SignerClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SignerClient.SignerClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SignerClient.SignerClientConfiguration { + config.authSchemeResolver = DefaultSignerAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SignerClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SignerAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SignerClient.SignerClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSigner/SignerClient.swift b/Sources/Services/AWSSigner/SignerClient.swift index 7e6cdaac047..19efde970f9 100644 --- a/Sources/Services/AWSSigner/SignerClient.swift +++ b/Sources/Services/AWSSigner/SignerClient.swift @@ -117,7 +117,8 @@ extension SignerClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SignerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SignerClient.SignerClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SignerClient { /// Performs the `AddProfilePermission` operation on the `WallabyService` service. /// diff --git a/Sources/Services/AWSSimSpaceWeaver/Plugins.swift b/Sources/Services/AWSSimSpaceWeaver/Plugins.swift new file mode 100644 index 00000000000..1cc1beebe40 --- /dev/null +++ b/Sources/Services/AWSSimSpaceWeaver/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SimSpaceWeaverClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SimSpaceWeaverClient.SimSpaceWeaverClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SimSpaceWeaverClient.SimSpaceWeaverClientConfiguration { + config.authSchemeResolver = DefaultSimSpaceWeaverAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SimSpaceWeaverClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SimSpaceWeaverAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SimSpaceWeaverClient.SimSpaceWeaverClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSimSpaceWeaver/SimSpaceWeaverClient.swift b/Sources/Services/AWSSimSpaceWeaver/SimSpaceWeaverClient.swift index 442a140e3c1..fda1535fa8d 100644 --- a/Sources/Services/AWSSimSpaceWeaver/SimSpaceWeaverClient.swift +++ b/Sources/Services/AWSSimSpaceWeaver/SimSpaceWeaverClient.swift @@ -117,7 +117,8 @@ extension SimSpaceWeaverClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SimSpaceWeaverClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SimSpaceWeaverClient.SimSpaceWeaverClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SimSpaceWeaverClient { /// Performs the `CreateSnapshot` operation on the `SimSpaceWeaver` service. /// diff --git a/Sources/Services/AWSSnowDeviceManagement/Plugins.swift b/Sources/Services/AWSSnowDeviceManagement/Plugins.swift new file mode 100644 index 00000000000..7b8e35e04bc --- /dev/null +++ b/Sources/Services/AWSSnowDeviceManagement/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SnowDeviceManagementClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SnowDeviceManagementClient.SnowDeviceManagementClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SnowDeviceManagementClient.SnowDeviceManagementClientConfiguration { + config.authSchemeResolver = DefaultSnowDeviceManagementAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SnowDeviceManagementClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SnowDeviceManagementAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SnowDeviceManagementClient.SnowDeviceManagementClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSnowDeviceManagement/SnowDeviceManagementClient.swift b/Sources/Services/AWSSnowDeviceManagement/SnowDeviceManagementClient.swift index b1011276511..cc4c30365cc 100644 --- a/Sources/Services/AWSSnowDeviceManagement/SnowDeviceManagementClient.swift +++ b/Sources/Services/AWSSnowDeviceManagement/SnowDeviceManagementClient.swift @@ -117,7 +117,8 @@ extension SnowDeviceManagementClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SnowDeviceManagementClientLogHandlerFactory: ClientRuntime.SDKLogH } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SnowDeviceManagementClient.SnowDeviceManagementClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SnowDeviceManagementClient { /// Performs the `CancelTask` operation on the `SnowDeviceManagement` service. /// diff --git a/Sources/Services/AWSSnowball/Plugins.swift b/Sources/Services/AWSSnowball/Plugins.swift new file mode 100644 index 00000000000..bfe6116c443 --- /dev/null +++ b/Sources/Services/AWSSnowball/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SnowballClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SnowballClient.SnowballClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SnowballClient.SnowballClientConfiguration { + config.authSchemeResolver = DefaultSnowballAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SnowballClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SnowballAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SnowballClient.SnowballClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSnowball/SnowballClient.swift b/Sources/Services/AWSSnowball/SnowballClient.swift index 30be177a641..2a3f711ce7b 100644 --- a/Sources/Services/AWSSnowball/SnowballClient.swift +++ b/Sources/Services/AWSSnowball/SnowballClient.swift @@ -117,7 +117,8 @@ extension SnowballClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SnowballClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SnowballClient.SnowballClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SnowballClient { /// Performs the `CancelCluster` operation on the `AWSIESnowballJobManagementService` service. /// diff --git a/Sources/Services/AWSSsmSap/Plugins.swift b/Sources/Services/AWSSsmSap/Plugins.swift new file mode 100644 index 00000000000..d1b95b98952 --- /dev/null +++ b/Sources/Services/AWSSsmSap/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SsmSapClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SsmSapClient.SsmSapClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SsmSapClient.SsmSapClientConfiguration { + config.authSchemeResolver = DefaultSsmSapAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SsmSapClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SsmSapAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SsmSapClient.SsmSapClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSsmSap/SsmSapClient.swift b/Sources/Services/AWSSsmSap/SsmSapClient.swift index c32bd802563..f83cc4c8ad2 100644 --- a/Sources/Services/AWSSsmSap/SsmSapClient.swift +++ b/Sources/Services/AWSSsmSap/SsmSapClient.swift @@ -117,7 +117,8 @@ extension SsmSapClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SsmSapClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SsmSapClient.SsmSapClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SsmSapClient { /// Performs the `DeleteResourcePermission` operation on the `SsmSap` service. /// diff --git a/Sources/Services/AWSStorageGateway/Plugins.swift b/Sources/Services/AWSStorageGateway/Plugins.swift new file mode 100644 index 00000000000..b79f929a3b0 --- /dev/null +++ b/Sources/Services/AWSStorageGateway/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class StorageGatewayClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? StorageGatewayClient.StorageGatewayClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? StorageGatewayClient.StorageGatewayClientConfiguration { + config.authSchemeResolver = DefaultStorageGatewayAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class StorageGatewayClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: StorageGatewayAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? StorageGatewayClient.StorageGatewayClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSStorageGateway/StorageGatewayClient.swift b/Sources/Services/AWSStorageGateway/StorageGatewayClient.swift index 67ea0ba3987..98e5642146f 100644 --- a/Sources/Services/AWSStorageGateway/StorageGatewayClient.swift +++ b/Sources/Services/AWSStorageGateway/StorageGatewayClient.swift @@ -117,7 +117,8 @@ extension StorageGatewayClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct StorageGatewayClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? StorageGatewayClient.StorageGatewayClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension StorageGatewayClient { /// Performs the `ActivateGateway` operation on the `StorageGateway_20130630` service. /// diff --git a/Sources/Services/AWSSupplyChain/Plugins.swift b/Sources/Services/AWSSupplyChain/Plugins.swift new file mode 100644 index 00000000000..c7c036807ec --- /dev/null +++ b/Sources/Services/AWSSupplyChain/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SupplyChainClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SupplyChainClient.SupplyChainClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SupplyChainClient.SupplyChainClientConfiguration { + config.authSchemeResolver = DefaultSupplyChainAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SupplyChainClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SupplyChainAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SupplyChainClient.SupplyChainClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSupplyChain/SupplyChainClient.swift b/Sources/Services/AWSSupplyChain/SupplyChainClient.swift index 3761cd3bc08..327ce8a780e 100644 --- a/Sources/Services/AWSSupplyChain/SupplyChainClient.swift +++ b/Sources/Services/AWSSupplyChain/SupplyChainClient.swift @@ -117,7 +117,8 @@ extension SupplyChainClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SupplyChainClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SupplyChainClient.SupplyChainClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SupplyChainClient { /// Performs the `CreateBillOfMaterialsImportJob` operation on the `GalaxyPublicAPIGateway` service. /// diff --git a/Sources/Services/AWSSupport/Plugins.swift b/Sources/Services/AWSSupport/Plugins.swift new file mode 100644 index 00000000000..8dfcf4684b2 --- /dev/null +++ b/Sources/Services/AWSSupport/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SupportClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SupportClient.SupportClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SupportClient.SupportClientConfiguration { + config.authSchemeResolver = DefaultSupportAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SupportClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SupportAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SupportClient.SupportClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSupport/SupportClient.swift b/Sources/Services/AWSSupport/SupportClient.swift index d5f4eb250f1..58f8620caa5 100644 --- a/Sources/Services/AWSSupport/SupportClient.swift +++ b/Sources/Services/AWSSupport/SupportClient.swift @@ -117,7 +117,8 @@ extension SupportClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SupportClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SupportClient.SupportClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SupportClient { /// Performs the `AddAttachmentsToSet` operation on the `AWSSupport_20130415` service. /// diff --git a/Sources/Services/AWSSupportApp/Plugins.swift b/Sources/Services/AWSSupportApp/Plugins.swift new file mode 100644 index 00000000000..6c526cd0af3 --- /dev/null +++ b/Sources/Services/AWSSupportApp/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SupportAppClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SupportAppClient.SupportAppClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SupportAppClient.SupportAppClientConfiguration { + config.authSchemeResolver = DefaultSupportAppAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SupportAppClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SupportAppAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SupportAppClient.SupportAppClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSupportApp/SupportAppClient.swift b/Sources/Services/AWSSupportApp/SupportAppClient.swift index 0e9e64a1e08..330c26f0d43 100644 --- a/Sources/Services/AWSSupportApp/SupportAppClient.swift +++ b/Sources/Services/AWSSupportApp/SupportAppClient.swift @@ -117,7 +117,8 @@ extension SupportAppClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SupportAppClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SupportAppClient.SupportAppClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SupportAppClient { /// Performs the `CreateSlackChannelConfiguration` operation on the `SupportApp` service. /// diff --git a/Sources/Services/AWSSynthetics/Plugins.swift b/Sources/Services/AWSSynthetics/Plugins.swift new file mode 100644 index 00000000000..338fcd1a025 --- /dev/null +++ b/Sources/Services/AWSSynthetics/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class SyntheticsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SyntheticsClient.SyntheticsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SyntheticsClient.SyntheticsClientConfiguration { + config.authSchemeResolver = DefaultSyntheticsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class SyntheticsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: SyntheticsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? SyntheticsClient.SyntheticsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSSynthetics/SyntheticsClient.swift b/Sources/Services/AWSSynthetics/SyntheticsClient.swift index 0975c7aaf62..9925382f5f2 100644 --- a/Sources/Services/AWSSynthetics/SyntheticsClient.swift +++ b/Sources/Services/AWSSynthetics/SyntheticsClient.swift @@ -117,7 +117,8 @@ extension SyntheticsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct SyntheticsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? SyntheticsClient.SyntheticsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension SyntheticsClient { /// Performs the `AssociateResource` operation on the `Synthetics` service. /// diff --git a/Sources/Services/AWSTextract/Plugins.swift b/Sources/Services/AWSTextract/Plugins.swift new file mode 100644 index 00000000000..b03c3ec63fc --- /dev/null +++ b/Sources/Services/AWSTextract/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class TextractClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TextractClient.TextractClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TextractClient.TextractClientConfiguration { + config.authSchemeResolver = DefaultTextractAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class TextractClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: TextractAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TextractClient.TextractClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSTextract/TextractClient.swift b/Sources/Services/AWSTextract/TextractClient.swift index 0a1400fac0e..56ab22211a3 100644 --- a/Sources/Services/AWSTextract/TextractClient.swift +++ b/Sources/Services/AWSTextract/TextractClient.swift @@ -117,7 +117,8 @@ extension TextractClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct TextractClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? TextractClient.TextractClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension TextractClient { /// Performs the `AnalyzeDocument` operation on the `Textract` service. /// diff --git a/Sources/Services/AWSTimestreamQuery/Plugins.swift b/Sources/Services/AWSTimestreamQuery/Plugins.swift new file mode 100644 index 00000000000..dd695ec0b7f --- /dev/null +++ b/Sources/Services/AWSTimestreamQuery/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class TimestreamQueryClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TimestreamQueryClient.TimestreamQueryClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TimestreamQueryClient.TimestreamQueryClientConfiguration { + config.authSchemeResolver = DefaultTimestreamQueryAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class TimestreamQueryClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: TimestreamQueryAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TimestreamQueryClient.TimestreamQueryClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSTimestreamQuery/TimestreamQueryClient.swift b/Sources/Services/AWSTimestreamQuery/TimestreamQueryClient.swift index 73c5c079b53..643e8c9f3c0 100644 --- a/Sources/Services/AWSTimestreamQuery/TimestreamQueryClient.swift +++ b/Sources/Services/AWSTimestreamQuery/TimestreamQueryClient.swift @@ -117,7 +117,8 @@ extension TimestreamQueryClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct TimestreamQueryClientLogHandlerFactory: ClientRuntime.SDKLogHandle } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? TimestreamQueryClient.TimestreamQueryClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension TimestreamQueryClient { /// Performs the `CancelQuery` operation on the `Timestream_20181101` service. /// diff --git a/Sources/Services/AWSTimestreamWrite/Plugins.swift b/Sources/Services/AWSTimestreamWrite/Plugins.swift new file mode 100644 index 00000000000..dd435a4fb7c --- /dev/null +++ b/Sources/Services/AWSTimestreamWrite/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class TimestreamWriteClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TimestreamWriteClient.TimestreamWriteClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TimestreamWriteClient.TimestreamWriteClientConfiguration { + config.authSchemeResolver = DefaultTimestreamWriteAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class TimestreamWriteClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: TimestreamWriteAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TimestreamWriteClient.TimestreamWriteClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSTimestreamWrite/TimestreamWriteClient.swift b/Sources/Services/AWSTimestreamWrite/TimestreamWriteClient.swift index 6393056d03b..5bf7fd68833 100644 --- a/Sources/Services/AWSTimestreamWrite/TimestreamWriteClient.swift +++ b/Sources/Services/AWSTimestreamWrite/TimestreamWriteClient.swift @@ -117,7 +117,8 @@ extension TimestreamWriteClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct TimestreamWriteClientLogHandlerFactory: ClientRuntime.SDKLogHandle } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? TimestreamWriteClient.TimestreamWriteClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension TimestreamWriteClient { /// Performs the `CreateBatchLoadTask` operation on the `Timestream_20181101` service. /// diff --git a/Sources/Services/AWSTnb/Plugins.swift b/Sources/Services/AWSTnb/Plugins.swift new file mode 100644 index 00000000000..616f604fbae --- /dev/null +++ b/Sources/Services/AWSTnb/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class TnbClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TnbClient.TnbClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TnbClient.TnbClientConfiguration { + config.authSchemeResolver = DefaultTnbAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class TnbClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: TnbAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TnbClient.TnbClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSTnb/TnbClient.swift b/Sources/Services/AWSTnb/TnbClient.swift index 5341f581662..0647490233b 100644 --- a/Sources/Services/AWSTnb/TnbClient.swift +++ b/Sources/Services/AWSTnb/TnbClient.swift @@ -117,7 +117,8 @@ extension TnbClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct TnbClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? TnbClient.TnbClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension TnbClient { /// Performs the `CancelSolNetworkOperation` operation on the `TNB` service. /// diff --git a/Sources/Services/AWSTranscribe/Plugins.swift b/Sources/Services/AWSTranscribe/Plugins.swift new file mode 100644 index 00000000000..f21f3cf731d --- /dev/null +++ b/Sources/Services/AWSTranscribe/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class TranscribeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TranscribeClient.TranscribeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TranscribeClient.TranscribeClientConfiguration { + config.authSchemeResolver = DefaultTranscribeAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class TranscribeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: TranscribeAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TranscribeClient.TranscribeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSTranscribe/TranscribeClient.swift b/Sources/Services/AWSTranscribe/TranscribeClient.swift index 2f87301f27d..b870cbf72c5 100644 --- a/Sources/Services/AWSTranscribe/TranscribeClient.swift +++ b/Sources/Services/AWSTranscribe/TranscribeClient.swift @@ -117,7 +117,8 @@ extension TranscribeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct TranscribeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? TranscribeClient.TranscribeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension TranscribeClient { /// Performs the `CreateCallAnalyticsCategory` operation on the `Transcribe` service. /// diff --git a/Sources/Services/AWSTranscribeStreaming/Plugins.swift b/Sources/Services/AWSTranscribeStreaming/Plugins.swift new file mode 100644 index 00000000000..9cc08ece2a9 --- /dev/null +++ b/Sources/Services/AWSTranscribeStreaming/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class TranscribeStreamingClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TranscribeStreamingClient.TranscribeStreamingClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TranscribeStreamingClient.TranscribeStreamingClientConfiguration { + config.authSchemeResolver = DefaultTranscribeStreamingAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class TranscribeStreamingClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: TranscribeStreamingAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TranscribeStreamingClient.TranscribeStreamingClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSTranscribeStreaming/TranscribeStreamingClient.swift b/Sources/Services/AWSTranscribeStreaming/TranscribeStreamingClient.swift index b10fba8f7e8..8508ff92905 100644 --- a/Sources/Services/AWSTranscribeStreaming/TranscribeStreamingClient.swift +++ b/Sources/Services/AWSTranscribeStreaming/TranscribeStreamingClient.swift @@ -117,7 +117,8 @@ extension TranscribeStreamingClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct TranscribeStreamingClientLogHandlerFactory: ClientRuntime.SDKLogHa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? TranscribeStreamingClient.TranscribeStreamingClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension TranscribeStreamingClient { /// Performs the `StartCallAnalyticsStreamTranscription` operation on the `Transcribe` service. /// diff --git a/Sources/Services/AWSTransfer/Plugins.swift b/Sources/Services/AWSTransfer/Plugins.swift new file mode 100644 index 00000000000..56600c448a1 --- /dev/null +++ b/Sources/Services/AWSTransfer/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class TransferClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TransferClient.TransferClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TransferClient.TransferClientConfiguration { + config.authSchemeResolver = DefaultTransferAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class TransferClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: TransferAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TransferClient.TransferClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSTransfer/TransferClient.swift b/Sources/Services/AWSTransfer/TransferClient.swift index f3c40b9112b..01c74ee4738 100644 --- a/Sources/Services/AWSTransfer/TransferClient.swift +++ b/Sources/Services/AWSTransfer/TransferClient.swift @@ -117,7 +117,8 @@ extension TransferClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct TransferClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? TransferClient.TransferClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension TransferClient { /// Performs the `CreateAccess` operation on the `TransferService` service. /// diff --git a/Sources/Services/AWSTranslate/Plugins.swift b/Sources/Services/AWSTranslate/Plugins.swift new file mode 100644 index 00000000000..c38b8d60561 --- /dev/null +++ b/Sources/Services/AWSTranslate/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class TranslateClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TranslateClient.TranslateClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TranslateClient.TranslateClientConfiguration { + config.authSchemeResolver = DefaultTranslateAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class TranslateClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: TranslateAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TranslateClient.TranslateClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSTranslate/TranslateClient.swift b/Sources/Services/AWSTranslate/TranslateClient.swift index f21b7eaa956..e560ee1783d 100644 --- a/Sources/Services/AWSTranslate/TranslateClient.swift +++ b/Sources/Services/AWSTranslate/TranslateClient.swift @@ -117,7 +117,8 @@ extension TranslateClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct TranslateClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFacto } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? TranslateClient.TranslateClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension TranslateClient { /// Performs the `CreateParallelData` operation on the `AWSShineFrontendService_20170701` service. /// diff --git a/Sources/Services/AWSTrustedAdvisor/Plugins.swift b/Sources/Services/AWSTrustedAdvisor/Plugins.swift new file mode 100644 index 00000000000..69405807808 --- /dev/null +++ b/Sources/Services/AWSTrustedAdvisor/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class TrustedAdvisorClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TrustedAdvisorClient.TrustedAdvisorClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TrustedAdvisorClient.TrustedAdvisorClientConfiguration { + config.authSchemeResolver = DefaultTrustedAdvisorAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class TrustedAdvisorClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: TrustedAdvisorAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? TrustedAdvisorClient.TrustedAdvisorClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSTrustedAdvisor/TrustedAdvisorClient.swift b/Sources/Services/AWSTrustedAdvisor/TrustedAdvisorClient.swift index 6e026e29b83..512cae9f7d6 100644 --- a/Sources/Services/AWSTrustedAdvisor/TrustedAdvisorClient.swift +++ b/Sources/Services/AWSTrustedAdvisor/TrustedAdvisorClient.swift @@ -117,7 +117,8 @@ extension TrustedAdvisorClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct TrustedAdvisorClientLogHandlerFactory: ClientRuntime.SDKLogHandler } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? TrustedAdvisorClient.TrustedAdvisorClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension TrustedAdvisorClient { /// Performs the `GetOrganizationRecommendation` operation on the `TrustedAdvisor` service. /// diff --git a/Sources/Services/AWSVPCLattice/Plugins.swift b/Sources/Services/AWSVPCLattice/Plugins.swift new file mode 100644 index 00000000000..3b277033f35 --- /dev/null +++ b/Sources/Services/AWSVPCLattice/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class VPCLatticeClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? VPCLatticeClient.VPCLatticeClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? VPCLatticeClient.VPCLatticeClientConfiguration { + config.authSchemeResolver = DefaultVPCLatticeAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class VPCLatticeClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: VPCLatticeAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? VPCLatticeClient.VPCLatticeClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSVPCLattice/VPCLatticeClient.swift b/Sources/Services/AWSVPCLattice/VPCLatticeClient.swift index d0c544954ba..077e33a1b76 100644 --- a/Sources/Services/AWSVPCLattice/VPCLatticeClient.swift +++ b/Sources/Services/AWSVPCLattice/VPCLatticeClient.swift @@ -117,7 +117,8 @@ extension VPCLatticeClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct VPCLatticeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? VPCLatticeClient.VPCLatticeClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension VPCLatticeClient { /// Performs the `BatchUpdateRule` operation on the `MercuryControlPlane` service. /// diff --git a/Sources/Services/AWSVerifiedPermissions/Plugins.swift b/Sources/Services/AWSVerifiedPermissions/Plugins.swift new file mode 100644 index 00000000000..32efd480bb3 --- /dev/null +++ b/Sources/Services/AWSVerifiedPermissions/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class VerifiedPermissionsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? VerifiedPermissionsClient.VerifiedPermissionsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? VerifiedPermissionsClient.VerifiedPermissionsClientConfiguration { + config.authSchemeResolver = DefaultVerifiedPermissionsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class VerifiedPermissionsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: VerifiedPermissionsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? VerifiedPermissionsClient.VerifiedPermissionsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSVerifiedPermissions/VerifiedPermissionsClient.swift b/Sources/Services/AWSVerifiedPermissions/VerifiedPermissionsClient.swift index 86af65c4b44..e666b4b00ff 100644 --- a/Sources/Services/AWSVerifiedPermissions/VerifiedPermissionsClient.swift +++ b/Sources/Services/AWSVerifiedPermissions/VerifiedPermissionsClient.swift @@ -117,7 +117,8 @@ extension VerifiedPermissionsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct VerifiedPermissionsClientLogHandlerFactory: ClientRuntime.SDKLogHa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? VerifiedPermissionsClient.VerifiedPermissionsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension VerifiedPermissionsClient { /// Performs the `BatchIsAuthorized` operation on the `VerifiedPermissions` service. /// diff --git a/Sources/Services/AWSVoiceID/Plugins.swift b/Sources/Services/AWSVoiceID/Plugins.swift new file mode 100644 index 00000000000..67a1327fba0 --- /dev/null +++ b/Sources/Services/AWSVoiceID/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class VoiceIDClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? VoiceIDClient.VoiceIDClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? VoiceIDClient.VoiceIDClientConfiguration { + config.authSchemeResolver = DefaultVoiceIDAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class VoiceIDClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: VoiceIDAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? VoiceIDClient.VoiceIDClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSVoiceID/VoiceIDClient.swift b/Sources/Services/AWSVoiceID/VoiceIDClient.swift index 6399a0afe7e..7dc6f2e4480 100644 --- a/Sources/Services/AWSVoiceID/VoiceIDClient.swift +++ b/Sources/Services/AWSVoiceID/VoiceIDClient.swift @@ -117,7 +117,8 @@ extension VoiceIDClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct VoiceIDClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? VoiceIDClient.VoiceIDClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension VoiceIDClient { /// Performs the `AssociateFraudster` operation on the `VoiceID` service. /// diff --git a/Sources/Services/AWSWAF/Plugins.swift b/Sources/Services/AWSWAF/Plugins.swift new file mode 100644 index 00000000000..743006bed2f --- /dev/null +++ b/Sources/Services/AWSWAF/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class WAFClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WAFClient.WAFClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WAFClient.WAFClientConfiguration { + config.authSchemeResolver = DefaultWAFAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class WAFClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: WAFAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WAFClient.WAFClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSWAF/WAFClient.swift b/Sources/Services/AWSWAF/WAFClient.swift index b7b3c144efb..b12ccb0c1ce 100644 --- a/Sources/Services/AWSWAF/WAFClient.swift +++ b/Sources/Services/AWSWAF/WAFClient.swift @@ -117,7 +117,8 @@ extension WAFClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct WAFClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? WAFClient.WAFClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension WAFClient { /// Performs the `CreateByteMatchSet` operation on the `AWSWAF_20150824` service. /// diff --git a/Sources/Services/AWSWAFRegional/Plugins.swift b/Sources/Services/AWSWAFRegional/Plugins.swift new file mode 100644 index 00000000000..9f19a601bbb --- /dev/null +++ b/Sources/Services/AWSWAFRegional/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class WAFRegionalClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WAFRegionalClient.WAFRegionalClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WAFRegionalClient.WAFRegionalClientConfiguration { + config.authSchemeResolver = DefaultWAFRegionalAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class WAFRegionalClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: WAFRegionalAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WAFRegionalClient.WAFRegionalClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSWAFRegional/WAFRegionalClient.swift b/Sources/Services/AWSWAFRegional/WAFRegionalClient.swift index b69071d6fd3..3b76dc4d11a 100644 --- a/Sources/Services/AWSWAFRegional/WAFRegionalClient.swift +++ b/Sources/Services/AWSWAFRegional/WAFRegionalClient.swift @@ -117,7 +117,8 @@ extension WAFRegionalClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct WAFRegionalClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFac } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? WAFRegionalClient.WAFRegionalClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension WAFRegionalClient { /// Performs the `AssociateWebACL` operation on the `AWSWAF_Regional_20161128` service. /// diff --git a/Sources/Services/AWSWAFV2/Plugins.swift b/Sources/Services/AWSWAFV2/Plugins.swift new file mode 100644 index 00000000000..101d1cd3775 --- /dev/null +++ b/Sources/Services/AWSWAFV2/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class WAFV2ClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WAFV2Client.WAFV2ClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WAFV2Client.WAFV2ClientConfiguration { + config.authSchemeResolver = DefaultWAFV2AuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class WAFV2ClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: WAFV2AuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WAFV2Client.WAFV2ClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSWAFV2/WAFV2Client.swift b/Sources/Services/AWSWAFV2/WAFV2Client.swift index 776408a8be4..d3de7cf5a87 100644 --- a/Sources/Services/AWSWAFV2/WAFV2Client.swift +++ b/Sources/Services/AWSWAFV2/WAFV2Client.swift @@ -117,7 +117,8 @@ extension WAFV2Client { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct WAFV2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? WAFV2Client.WAFV2ClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension WAFV2Client { /// Performs the `AssociateWebACL` operation on the `AWSWAF_20190729` service. /// diff --git a/Sources/Services/AWSWellArchitected/Plugins.swift b/Sources/Services/AWSWellArchitected/Plugins.swift new file mode 100644 index 00000000000..4087566896c --- /dev/null +++ b/Sources/Services/AWSWellArchitected/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class WellArchitectedClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WellArchitectedClient.WellArchitectedClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WellArchitectedClient.WellArchitectedClientConfiguration { + config.authSchemeResolver = DefaultWellArchitectedAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class WellArchitectedClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: WellArchitectedAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WellArchitectedClient.WellArchitectedClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSWellArchitected/WellArchitectedClient.swift b/Sources/Services/AWSWellArchitected/WellArchitectedClient.swift index 4f8bacedcfc..61c601b2fa6 100644 --- a/Sources/Services/AWSWellArchitected/WellArchitectedClient.swift +++ b/Sources/Services/AWSWellArchitected/WellArchitectedClient.swift @@ -117,7 +117,8 @@ extension WellArchitectedClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct WellArchitectedClientLogHandlerFactory: ClientRuntime.SDKLogHandle } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? WellArchitectedClient.WellArchitectedClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension WellArchitectedClient { /// Performs the `AssociateLenses` operation on the `WellArchitectedApiServiceLambda` service. /// diff --git a/Sources/Services/AWSWisdom/Plugins.swift b/Sources/Services/AWSWisdom/Plugins.swift new file mode 100644 index 00000000000..c7f2738ac0c --- /dev/null +++ b/Sources/Services/AWSWisdom/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class WisdomClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WisdomClient.WisdomClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WisdomClient.WisdomClientConfiguration { + config.authSchemeResolver = DefaultWisdomAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class WisdomClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: WisdomAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WisdomClient.WisdomClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSWisdom/WisdomClient.swift b/Sources/Services/AWSWisdom/WisdomClient.swift index 206310901c6..767431af2cf 100644 --- a/Sources/Services/AWSWisdom/WisdomClient.swift +++ b/Sources/Services/AWSWisdom/WisdomClient.swift @@ -117,7 +117,8 @@ extension WisdomClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct WisdomClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? WisdomClient.WisdomClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension WisdomClient { /// Performs the `CreateAssistant` operation on the `WisdomService` service. /// diff --git a/Sources/Services/AWSWorkDocs/Plugins.swift b/Sources/Services/AWSWorkDocs/Plugins.swift new file mode 100644 index 00000000000..ec90464eeca --- /dev/null +++ b/Sources/Services/AWSWorkDocs/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class WorkDocsClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkDocsClient.WorkDocsClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkDocsClient.WorkDocsClientConfiguration { + config.authSchemeResolver = DefaultWorkDocsAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class WorkDocsClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: WorkDocsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkDocsClient.WorkDocsClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSWorkDocs/WorkDocsClient.swift b/Sources/Services/AWSWorkDocs/WorkDocsClient.swift index e01d78b1ae6..81fa49ca6aa 100644 --- a/Sources/Services/AWSWorkDocs/WorkDocsClient.swift +++ b/Sources/Services/AWSWorkDocs/WorkDocsClient.swift @@ -117,7 +117,8 @@ extension WorkDocsClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct WorkDocsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? WorkDocsClient.WorkDocsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension WorkDocsClient { /// Performs the `AbortDocumentVersionUpload` operation on the `AWSGorillaBoyService` service. /// diff --git a/Sources/Services/AWSWorkLink/Plugins.swift b/Sources/Services/AWSWorkLink/Plugins.swift new file mode 100644 index 00000000000..5ccb8948078 --- /dev/null +++ b/Sources/Services/AWSWorkLink/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class WorkLinkClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkLinkClient.WorkLinkClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkLinkClient.WorkLinkClientConfiguration { + config.authSchemeResolver = DefaultWorkLinkAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class WorkLinkClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: WorkLinkAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkLinkClient.WorkLinkClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSWorkLink/WorkLinkClient.swift b/Sources/Services/AWSWorkLink/WorkLinkClient.swift index accdcb4b0ac..c57c64d4c0c 100644 --- a/Sources/Services/AWSWorkLink/WorkLinkClient.swift +++ b/Sources/Services/AWSWorkLink/WorkLinkClient.swift @@ -117,7 +117,8 @@ extension WorkLinkClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct WorkLinkClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? WorkLinkClient.WorkLinkClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension WorkLinkClient { /// Performs the `AssociateDomain` operation on the `WorkLink` service. /// diff --git a/Sources/Services/AWSWorkMail/Plugins.swift b/Sources/Services/AWSWorkMail/Plugins.swift new file mode 100644 index 00000000000..5e5397c5503 --- /dev/null +++ b/Sources/Services/AWSWorkMail/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class WorkMailClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkMailClient.WorkMailClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkMailClient.WorkMailClientConfiguration { + config.authSchemeResolver = DefaultWorkMailAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class WorkMailClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: WorkMailAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkMailClient.WorkMailClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSWorkMail/WorkMailClient.swift b/Sources/Services/AWSWorkMail/WorkMailClient.swift index c2e74d6dab2..f44d7aa97b8 100644 --- a/Sources/Services/AWSWorkMail/WorkMailClient.swift +++ b/Sources/Services/AWSWorkMail/WorkMailClient.swift @@ -117,7 +117,8 @@ extension WorkMailClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct WorkMailClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactor } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? WorkMailClient.WorkMailClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension WorkMailClient { /// Performs the `AssociateDelegateToResource` operation on the `WorkMailService` service. /// diff --git a/Sources/Services/AWSWorkMailMessageFlow/Plugins.swift b/Sources/Services/AWSWorkMailMessageFlow/Plugins.swift new file mode 100644 index 00000000000..65fc9dadc45 --- /dev/null +++ b/Sources/Services/AWSWorkMailMessageFlow/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class WorkMailMessageFlowClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkMailMessageFlowClient.WorkMailMessageFlowClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkMailMessageFlowClient.WorkMailMessageFlowClientConfiguration { + config.authSchemeResolver = DefaultWorkMailMessageFlowAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class WorkMailMessageFlowClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: WorkMailMessageFlowAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkMailMessageFlowClient.WorkMailMessageFlowClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSWorkMailMessageFlow/WorkMailMessageFlowClient.swift b/Sources/Services/AWSWorkMailMessageFlow/WorkMailMessageFlowClient.swift index 7fb2b260589..972f82211ac 100644 --- a/Sources/Services/AWSWorkMailMessageFlow/WorkMailMessageFlowClient.swift +++ b/Sources/Services/AWSWorkMailMessageFlow/WorkMailMessageFlowClient.swift @@ -117,7 +117,8 @@ extension WorkMailMessageFlowClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct WorkMailMessageFlowClientLogHandlerFactory: ClientRuntime.SDKLogHa } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? WorkMailMessageFlowClient.WorkMailMessageFlowClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension WorkMailMessageFlowClient { /// Performs the `GetRawMessageContent` operation on the `GiraffeMessageInTransitService` service. /// diff --git a/Sources/Services/AWSWorkSpaces/Plugins.swift b/Sources/Services/AWSWorkSpaces/Plugins.swift new file mode 100644 index 00000000000..c8b6487f5d0 --- /dev/null +++ b/Sources/Services/AWSWorkSpaces/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class WorkSpacesClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkSpacesClient.WorkSpacesClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkSpacesClient.WorkSpacesClientConfiguration { + config.authSchemeResolver = DefaultWorkSpacesAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class WorkSpacesClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: WorkSpacesAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkSpacesClient.WorkSpacesClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSWorkSpaces/WorkSpacesClient.swift b/Sources/Services/AWSWorkSpaces/WorkSpacesClient.swift index d89832b2bcb..00a73777fe8 100644 --- a/Sources/Services/AWSWorkSpaces/WorkSpacesClient.swift +++ b/Sources/Services/AWSWorkSpaces/WorkSpacesClient.swift @@ -117,7 +117,8 @@ extension WorkSpacesClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct WorkSpacesClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFact } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? WorkSpacesClient.WorkSpacesClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension WorkSpacesClient { /// Performs the `AssociateConnectionAlias` operation on the `WorkspacesService` service. /// diff --git a/Sources/Services/AWSWorkSpacesThinClient/Plugins.swift b/Sources/Services/AWSWorkSpacesThinClient/Plugins.swift new file mode 100644 index 00000000000..bab909c2538 --- /dev/null +++ b/Sources/Services/AWSWorkSpacesThinClient/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class WorkSpacesThinClientClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkSpacesThinClientClient.WorkSpacesThinClientClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkSpacesThinClientClient.WorkSpacesThinClientClientConfiguration { + config.authSchemeResolver = DefaultWorkSpacesThinClientAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class WorkSpacesThinClientClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: WorkSpacesThinClientAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkSpacesThinClientClient.WorkSpacesThinClientClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSWorkSpacesThinClient/WorkSpacesThinClientClient.swift b/Sources/Services/AWSWorkSpacesThinClient/WorkSpacesThinClientClient.swift index 661aa1f4d19..78935ede412 100644 --- a/Sources/Services/AWSWorkSpacesThinClient/WorkSpacesThinClientClient.swift +++ b/Sources/Services/AWSWorkSpacesThinClient/WorkSpacesThinClientClient.swift @@ -117,7 +117,8 @@ extension WorkSpacesThinClientClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct WorkSpacesThinClientClientLogHandlerFactory: ClientRuntime.SDKLogH } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? WorkSpacesThinClientClient.WorkSpacesThinClientClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension WorkSpacesThinClientClient { /// Performs the `CreateEnvironment` operation on the `ThinClient` service. /// diff --git a/Sources/Services/AWSWorkSpacesWeb/Plugins.swift b/Sources/Services/AWSWorkSpacesWeb/Plugins.swift new file mode 100644 index 00000000000..57b6539dc09 --- /dev/null +++ b/Sources/Services/AWSWorkSpacesWeb/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class WorkSpacesWebClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkSpacesWebClient.WorkSpacesWebClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkSpacesWebClient.WorkSpacesWebClientConfiguration { + config.authSchemeResolver = DefaultWorkSpacesWebAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class WorkSpacesWebClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: WorkSpacesWebAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? WorkSpacesWebClient.WorkSpacesWebClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSWorkSpacesWeb/WorkSpacesWebClient.swift b/Sources/Services/AWSWorkSpacesWeb/WorkSpacesWebClient.swift index 5245f664a18..ea160d84125 100644 --- a/Sources/Services/AWSWorkSpacesWeb/WorkSpacesWebClient.swift +++ b/Sources/Services/AWSWorkSpacesWeb/WorkSpacesWebClient.swift @@ -117,7 +117,8 @@ extension WorkSpacesWebClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct WorkSpacesWebClientLogHandlerFactory: ClientRuntime.SDKLogHandlerF } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? WorkSpacesWebClient.WorkSpacesWebClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension WorkSpacesWebClient { /// Performs the `AssociateBrowserSettings` operation on the `AWSErmineControlPlaneService` service. /// diff --git a/Sources/Services/AWSXRay/Plugins.swift b/Sources/Services/AWSXRay/Plugins.swift new file mode 100644 index 00000000000..b52c914d047 --- /dev/null +++ b/Sources/Services/AWSXRay/Plugins.swift @@ -0,0 +1,55 @@ +// Code generated by smithy-swift-codegen. DO NOT EDIT! + +@_spi(FileBasedConfig) import AWSClientRuntime +import ClientRuntime + +public class XRayClientEndpointPlugin: Plugin { + private var endpointResolver: EndpointResolver + public init(endpointResolver: EndpointResolver) { + self.endpointResolver = endpointResolver + } + public convenience init() throws { + self.init(endpointResolver: try DefaultEndpointResolver()) + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? XRayClient.XRayClientConfiguration { + config.endpointResolver = self.endpointResolver + } + } +} + +public class DefaultAWSAuthSchemePlugin: Plugin { + public init() { + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? XRayClient.XRayClientConfiguration { + config.authSchemeResolver = DefaultXRayAuthSchemeResolver() + config.authSchemes = [SigV4AuthScheme()] + config.awsCredentialIdentityResolver = try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() + } + } +} + +public class XRayClientAuthSchemePlugin: Plugin { + private var authSchemes: [ClientRuntime.AuthScheme]? + private var authSchemeResolver: ClientRuntime.AuthSchemeResolver? + private var awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? + public init(authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: XRayAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil) { + self.authSchemeResolver = authSchemeResolver + self.authSchemes = authSchemes + self.awsCredentialIdentityResolver = awsCredentialIdentityResolver + } + public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { + if var config = clientConfiguration as? XRayClient.XRayClientConfiguration { + if (self.authSchemes != nil) { + config.authSchemes = self.authSchemes + } + if (self.authSchemeResolver != nil) { + config.authSchemeResolver = self.authSchemeResolver! + } + if (self.awsCredentialIdentityResolver != nil) { + config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! + } + } + } +} diff --git a/Sources/Services/AWSXRay/XRayClient.swift b/Sources/Services/AWSXRay/XRayClient.swift index d4e75868182..b717877c901 100644 --- a/Sources/Services/AWSXRay/XRayClient.swift +++ b/Sources/Services/AWSXRay/XRayClient.swift @@ -117,7 +117,8 @@ extension XRayClient { public static func builder() -> ClientBuilder { return ClientBuilder(defaultPlugins: [ ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName) + AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), + DefaultAWSAuthSchemePlugin() ]) } } @@ -135,21 +136,6 @@ public struct XRayClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { } } -public class EndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if var config = clientConfiguration as? XRayClient.XRayClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - extension XRayClient { /// Performs the `BatchGetTraces` operation on the `AWSXRay` service. ///