From a2ebce52890af9c48488c627ac70df8494a47c07 Mon Sep 17 00:00:00 2001 From: fossand Date: Mon, 22 Jan 2024 12:00:41 -0800 Subject: [PATCH] feat: update generated client with default client configurations --- Sources/Services/AWSACM/ACMClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSACMPCA/ACMPCAClient.swift | 29 +++++++++++++++++++ .../AWSAPIGateway/APIGatewayClient.swift | 29 +++++++++++++++++++ .../ARCZonalShiftClient.swift | 29 +++++++++++++++++++ .../AccessAnalyzerClient.swift | 29 +++++++++++++++++++ .../Services/AWSAccount/AccountClient.swift | 29 +++++++++++++++++++ .../AlexaForBusinessClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSAmp/AmpClient.swift | 29 +++++++++++++++++++ .../Services/AWSAmplify/AmplifyClient.swift | 29 +++++++++++++++++++ .../AmplifyBackendClient.swift | 29 +++++++++++++++++++ .../AmplifyUIBuilderClient.swift | 29 +++++++++++++++++++ .../ApiGatewayManagementApiClient.swift | 29 +++++++++++++++++++ .../AWSApiGatewayV2/ApiGatewayV2Client.swift | 29 +++++++++++++++++++ .../AWSAppConfig/AppConfigClient.swift | 29 +++++++++++++++++++ .../AppConfigDataClient.swift | 29 +++++++++++++++++++ .../AWSAppFabric/AppFabricClient.swift | 29 +++++++++++++++++++ .../AppIntegrationsClient.swift | 29 +++++++++++++++++++ .../Services/AWSAppMesh/AppMeshClient.swift | 29 +++++++++++++++++++ .../AWSAppRunner/AppRunnerClient.swift | 29 +++++++++++++++++++ .../AWSAppStream/AppStreamClient.swift | 29 +++++++++++++++++++ .../Services/AWSAppSync/AppSyncClient.swift | 29 +++++++++++++++++++ .../Services/AWSAppflow/AppflowClient.swift | 29 +++++++++++++++++++ .../ApplicationAutoScalingClient.swift | 29 +++++++++++++++++++ .../ApplicationCostProfilerClient.swift | 29 +++++++++++++++++++ .../ApplicationDiscoveryClient.swift | 29 +++++++++++++++++++ .../ApplicationInsightsClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSAthena/AthenaClient.swift | 29 +++++++++++++++++++ .../AWSAuditManager/AuditManagerClient.swift | 29 +++++++++++++++++++ .../AWSAutoScaling/AutoScalingClient.swift | 29 +++++++++++++++++++ .../AutoScalingPlansClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSB2bi/B2biClient.swift | 29 +++++++++++++++++++ .../BCMDataExportsClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSBackup/BackupClient.swift | 29 +++++++++++++++++++ .../BackupGatewayClient.swift | 29 +++++++++++++++++++ .../BackupStorageClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSBatch/BatchClient.swift | 29 +++++++++++++++++++ .../Services/AWSBedrock/BedrockClient.swift | 29 +++++++++++++++++++ .../AWSBedrockAgent/BedrockAgentClient.swift | 29 +++++++++++++++++++ .../BedrockAgentRuntimeClient.swift | 29 +++++++++++++++++++ .../BedrockRuntimeClient.swift | 29 +++++++++++++++++++ .../BillingconductorClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSBraket/BraketClient.swift | 29 +++++++++++++++++++ .../Services/AWSBudgets/BudgetsClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSChime/ChimeClient.swift | 29 +++++++++++++++++++ .../ChimeSDKIdentityClient.swift | 29 +++++++++++++++++++ .../ChimeSDKMediaPipelinesClient.swift | 29 +++++++++++++++++++ .../ChimeSDKMeetingsClient.swift | 29 +++++++++++++++++++ .../ChimeSDKMessagingClient.swift | 29 +++++++++++++++++++ .../ChimeSDKVoiceClient.swift | 29 +++++++++++++++++++ .../AWSCleanRooms/CleanRoomsClient.swift | 29 +++++++++++++++++++ .../AWSCleanRoomsML/CleanRoomsMLClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSCloud9/Cloud9Client.swift | 29 +++++++++++++++++++ .../AWSCloudControl/CloudControlClient.swift | 29 +++++++++++++++++++ .../CloudDirectoryClient.swift | 29 +++++++++++++++++++ .../CloudFormationClient.swift | 29 +++++++++++++++++++ .../AWSCloudFront/CloudFrontClient.swift | 29 +++++++++++++++++++ .../CloudFrontKeyValueStoreClient.swift | 29 +++++++++++++++++++ .../Services/AWSCloudHSM/CloudHSMClient.swift | 29 +++++++++++++++++++ .../AWSCloudHSMV2/CloudHSMV2Client.swift | 29 +++++++++++++++++++ .../AWSCloudSearch/CloudSearchClient.swift | 29 +++++++++++++++++++ .../CloudSearchDomainClient.swift | 29 +++++++++++++++++++ .../AWSCloudTrail/CloudTrailClient.swift | 29 +++++++++++++++++++ .../CloudTrailDataClient.swift | 29 +++++++++++++++++++ .../AWSCloudWatch/CloudWatchClient.swift | 29 +++++++++++++++++++ .../CloudWatchEventsClient.swift | 29 +++++++++++++++++++ .../CloudWatchLogsClient.swift | 29 +++++++++++++++++++ .../AWSCodeBuild/CodeBuildClient.swift | 29 +++++++++++++++++++ .../AWSCodeCatalyst/CodeCatalystClient.swift | 29 +++++++++++++++++++ .../AWSCodeCommit/CodeCommitClient.swift | 29 +++++++++++++++++++ .../AWSCodeDeploy/CodeDeployClient.swift | 29 +++++++++++++++++++ .../CodeGuruProfilerClient.swift | 29 +++++++++++++++++++ .../CodeGuruReviewerClient.swift | 29 +++++++++++++++++++ .../CodeGuruSecurityClient.swift | 29 +++++++++++++++++++ .../AWSCodePipeline/CodePipelineClient.swift | 29 +++++++++++++++++++ .../Services/AWSCodeStar/CodeStarClient.swift | 29 +++++++++++++++++++ .../CodeStarconnectionsClient.swift | 29 +++++++++++++++++++ .../AWSCodeartifact/CodeartifactClient.swift | 29 +++++++++++++++++++ .../CodestarnotificationsClient.swift | 29 +++++++++++++++++++ .../CognitoIdentityClient.swift | 29 +++++++++++++++++++ .../CognitoIdentityProviderClient.swift | 29 +++++++++++++++++++ .../AWSCognitoSync/CognitoSyncClient.swift | 29 +++++++++++++++++++ .../AWSComprehend/ComprehendClient.swift | 29 +++++++++++++++++++ .../ComprehendMedicalClient.swift | 29 +++++++++++++++++++ .../ComputeOptimizerClient.swift | 29 +++++++++++++++++++ .../AWSConfigService/ConfigClient.swift | 29 +++++++++++++++++++ .../Services/AWSConnect/ConnectClient.swift | 29 +++++++++++++++++++ .../ConnectCampaignsClient.swift | 29 +++++++++++++++++++ .../AWSConnectCases/ConnectCasesClient.swift | 29 +++++++++++++++++++ .../ConnectContactLensClient.swift | 29 +++++++++++++++++++ .../ConnectParticipantClient.swift | 29 +++++++++++++++++++ .../AWSControlTower/ControlTowerClient.swift | 29 +++++++++++++++++++ .../AWSCostExplorer/CostExplorerClient.swift | 29 +++++++++++++++++++ .../CostOptimizationHubClient.swift | 29 +++++++++++++++++++ .../CostandUsageReportClient.swift | 29 +++++++++++++++++++ .../CustomerProfilesClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSDAX/DAXClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSDLM/DLMClient.swift | 29 +++++++++++++++++++ .../Services/AWSDataBrew/DataBrewClient.swift | 29 +++++++++++++++++++ .../AWSDataExchange/DataExchangeClient.swift | 29 +++++++++++++++++++ .../AWSDataPipeline/DataPipelineClient.swift | 29 +++++++++++++++++++ .../Services/AWSDataSync/DataSyncClient.swift | 29 +++++++++++++++++++ .../Services/AWSDataZone/DataZoneClient.swift | 29 +++++++++++++++++++ .../DatabaseMigrationClient.swift | 29 +++++++++++++++++++ .../AWSDetective/DetectiveClient.swift | 29 +++++++++++++++++++ .../AWSDevOpsGuru/DevOpsGuruClient.swift | 29 +++++++++++++++++++ .../AWSDeviceFarm/DeviceFarmClient.swift | 29 +++++++++++++++++++ .../DirectConnectClient.swift | 29 +++++++++++++++++++ .../AWSDirectoryService/DirectoryClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSDocDB/DocDBClient.swift | 29 +++++++++++++++++++ .../AWSDocDBElastic/DocDBElasticClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSDrs/DrsClient.swift | 29 +++++++++++++++++++ .../Services/AWSDynamoDB/DynamoDBClient.swift | 29 +++++++++++++++++++ .../DynamoDBStreamsClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSEBS/EBSClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSEC2/EC2Client.swift | 29 +++++++++++++++++++ .../EC2InstanceConnectClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSECR/ECRClient.swift | 29 +++++++++++++++++++ .../AWSECRPUBLIC/ECRPUBLICClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSECS/ECSClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSEFS/EFSClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSEKS/EKSClient.swift | 29 +++++++++++++++++++ .../Services/AWSEKSAuth/EKSAuthClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSEMR/EMRClient.swift | 29 +++++++++++++++++++ .../EMRServerlessClient.swift | 29 +++++++++++++++++++ .../EMRcontainersClient.swift | 29 +++++++++++++++++++ .../AWSElastiCache/ElastiCacheClient.swift | 29 +++++++++++++++++++ .../ElasticBeanstalkClient.swift | 29 +++++++++++++++++++ .../ElasticInferenceClient.swift | 29 +++++++++++++++++++ .../ElasticLoadBalancingClient.swift | 29 +++++++++++++++++++ .../ElasticLoadBalancingv2Client.swift | 29 +++++++++++++++++++ .../ElasticTranscoderClient.swift | 29 +++++++++++++++++++ .../ElasticsearchClient.swift | 29 +++++++++++++++++++ .../EntityResolutionClient.swift | 29 +++++++++++++++++++ .../AWSEventBridge/EventBridgeClient.swift | 29 +++++++++++++++++++ .../AWSEvidently/EvidentlyClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSFMS/FMSClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSFSx/FSxClient.swift | 29 +++++++++++++++++++ .../Services/AWSFinspace/FinspaceClient.swift | 29 +++++++++++++++++++ .../AWSFinspacedata/FinspacedataClient.swift | 29 +++++++++++++++++++ .../Services/AWSFirehose/FirehoseClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSFis/FisClient.swift | 29 +++++++++++++++++++ .../Services/AWSForecast/ForecastClient.swift | 29 +++++++++++++++++++ .../ForecastqueryClient.swift | 29 +++++++++++++++++++ .../FraudDetectorClient.swift | 29 +++++++++++++++++++ .../Services/AWSFreeTier/FreeTierClient.swift | 29 +++++++++++++++++++ .../Services/AWSGameLift/GameLiftClient.swift | 29 +++++++++++++++++++ .../Services/AWSGlacier/GlacierClient.swift | 29 +++++++++++++++++++ .../GlobalAcceleratorClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSGlue/GlueClient.swift | 29 +++++++++++++++++++ .../Services/AWSGrafana/GrafanaClient.swift | 29 +++++++++++++++++++ .../AWSGreengrass/GreengrassClient.swift | 29 +++++++++++++++++++ .../AWSGreengrassV2/GreengrassV2Client.swift | 29 +++++++++++++++++++ .../GroundStationClient.swift | 29 +++++++++++++++++++ .../AWSGuardDuty/GuardDutyClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSHealth/HealthClient.swift | 29 +++++++++++++++++++ .../AWSHealthLake/HealthLakeClient.swift | 29 +++++++++++++++++++ .../AWSHoneycode/HoneycodeClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSIAM/IAMClient.swift | 29 +++++++++++++++++++ .../AWSIVSRealTime/IVSRealTimeClient.swift | 29 +++++++++++++++++++ .../IdentitystoreClient.swift | 29 +++++++++++++++++++ .../AWSImagebuilder/ImagebuilderClient.swift | 29 +++++++++++++++++++ .../AWSInspector/InspectorClient.swift | 29 +++++++++++++++++++ .../AWSInspector2/Inspector2Client.swift | 29 +++++++++++++++++++ .../InspectorScanClient.swift | 29 +++++++++++++++++++ .../InternetMonitorClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSIoT/IoTClient.swift | 29 +++++++++++++++++++ .../IoT1ClickDevicesClient.swift | 29 +++++++++++++++++++ .../IoT1ClickProjectsClient.swift | 29 +++++++++++++++++++ .../AWSIoTAnalytics/IoTAnalyticsClient.swift | 29 +++++++++++++++++++ .../AWSIoTDataPlane/IoTDataPlaneClient.swift | 29 +++++++++++++++++++ .../AWSIoTEvents/IoTEventsClient.swift | 29 +++++++++++++++++++ .../IoTEventsDataClient.swift | 29 +++++++++++++++++++ .../AWSIoTFleetHub/IoTFleetHubClient.swift | 29 +++++++++++++++++++ .../AWSIoTFleetWise/IoTFleetWiseClient.swift | 29 +++++++++++++++++++ .../IoTJobsDataPlaneClient.swift | 29 +++++++++++++++++++ .../IoTRoboRunnerClient.swift | 29 +++++++++++++++++++ .../IoTSecureTunnelingClient.swift | 29 +++++++++++++++++++ .../AWSIoTSiteWise/IoTSiteWiseClient.swift | 29 +++++++++++++++++++ .../IoTThingsGraphClient.swift | 29 +++++++++++++++++++ .../AWSIoTTwinMaker/IoTTwinMakerClient.swift | 29 +++++++++++++++++++ .../AWSIoTWireless/IoTWirelessClient.swift | 29 +++++++++++++++++++ .../IotDeviceAdvisorClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSIvs/IvsClient.swift | 29 +++++++++++++++++++ .../Services/AWSIvschat/IvschatClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSKMS/KMSClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSKafka/KafkaClient.swift | 29 +++++++++++++++++++ .../AWSKafkaConnect/KafkaConnectClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSKendra/KendraClient.swift | 29 +++++++++++++++++++ .../KendraRankingClient.swift | 29 +++++++++++++++++++ .../AWSKeyspaces/KeyspacesClient.swift | 29 +++++++++++++++++++ .../Services/AWSKinesis/KinesisClient.swift | 29 +++++++++++++++++++ .../KinesisAnalyticsClient.swift | 29 +++++++++++++++++++ .../KinesisAnalyticsV2Client.swift | 29 +++++++++++++++++++ .../AWSKinesisVideo/KinesisVideoClient.swift | 29 +++++++++++++++++++ .../KinesisVideoArchivedMediaClient.swift | 29 +++++++++++++++++++ .../KinesisVideoMediaClient.swift | 29 +++++++++++++++++++ .../KinesisVideoSignalingClient.swift | 29 +++++++++++++++++++ .../KinesisVideoWebRTCStorageClient.swift | 29 +++++++++++++++++++ .../LakeFormationClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSLambda/LambdaClient.swift | 29 +++++++++++++++++++ .../AWSLaunchWizard/LaunchWizardClient.swift | 29 +++++++++++++++++++ .../LexModelBuildingClient.swift | 29 +++++++++++++++++++ .../AWSLexModelsV2/LexModelsV2Client.swift | 29 +++++++++++++++++++ .../LexRuntimeClient.swift | 29 +++++++++++++++++++ .../AWSLexRuntimeV2/LexRuntimeV2Client.swift | 29 +++++++++++++++++++ .../LicenseManagerClient.swift | 29 +++++++++++++++++++ ...censeManagerLinuxSubscriptionsClient.swift | 29 +++++++++++++++++++ ...icenseManagerUserSubscriptionsClient.swift | 29 +++++++++++++++++++ .../AWSLightsail/LightsailClient.swift | 29 +++++++++++++++++++ .../Services/AWSLocation/LocationClient.swift | 29 +++++++++++++++++++ .../LookoutEquipmentClient.swift | 29 +++++++++++++++++++ .../LookoutMetricsClient.swift | 29 +++++++++++++++++++ .../LookoutVisionClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSM2/M2Client.swift | 29 +++++++++++++++++++ Sources/Services/AWSMTurk/MTurkClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSMWAA/MWAAClient.swift | 29 +++++++++++++++++++ .../MachineLearningClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSMacie2/Macie2Client.swift | 29 +++++++++++++++++++ .../ManagedBlockchainClient.swift | 29 +++++++++++++++++++ .../ManagedBlockchainQueryClient.swift | 29 +++++++++++++++++++ .../MarketplaceAgreementClient.swift | 29 +++++++++++++++++++ .../MarketplaceCatalogClient.swift | 29 +++++++++++++++++++ .../MarketplaceCommerceAnalyticsClient.swift | 29 +++++++++++++++++++ .../MarketplaceDeploymentClient.swift | 29 +++++++++++++++++++ .../MarketplaceEntitlementClient.swift | 29 +++++++++++++++++++ .../MarketplaceMeteringClient.swift | 29 +++++++++++++++++++ .../AWSMediaConnect/MediaConnectClient.swift | 29 +++++++++++++++++++ .../AWSMediaConvert/MediaConvertClient.swift | 29 +++++++++++++++++++ .../AWSMediaLive/MediaLiveClient.swift | 29 +++++++++++++++++++ .../AWSMediaPackage/MediaPackageClient.swift | 29 +++++++++++++++++++ .../MediaPackageV2Client.swift | 29 +++++++++++++++++++ .../MediaPackageVodClient.swift | 29 +++++++++++++++++++ .../AWSMediaStore/MediaStoreClient.swift | 29 +++++++++++++++++++ .../MediaStoreDataClient.swift | 29 +++++++++++++++++++ .../AWSMediaTailor/MediaTailorClient.swift | 29 +++++++++++++++++++ .../MedicalImagingClient.swift | 29 +++++++++++++++++++ .../Services/AWSMemoryDB/MemoryDBClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSMgn/MgnClient.swift | 29 +++++++++++++++++++ .../AWSMigrationHub/MigrationHubClient.swift | 29 +++++++++++++++++++ .../MigrationHubConfigClient.swift | 29 +++++++++++++++++++ .../MigrationHubOrchestratorClient.swift | 29 +++++++++++++++++++ .../MigrationHubRefactorSpacesClient.swift | 29 +++++++++++++++++++ .../MigrationHubStrategyClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSMobile/MobileClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSMq/MqClient.swift | 29 +++++++++++++++++++ .../Services/AWSNeptune/NeptuneClient.swift | 29 +++++++++++++++++++ .../AWSNeptuneGraph/NeptuneGraphClient.swift | 29 +++++++++++++++++++ .../AWSNeptunedata/NeptunedataClient.swift | 29 +++++++++++++++++++ .../NetworkFirewallClient.swift | 29 +++++++++++++++++++ .../NetworkManagerClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSNimble/NimbleClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSOAM/OAMClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSOSIS/OSISClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSOmics/OmicsClient.swift | 29 +++++++++++++++++++ .../AWSOpenSearch/OpenSearchClient.swift | 29 +++++++++++++++++++ .../OpenSearchServerlessClient.swift | 29 +++++++++++++++++++ .../Services/AWSOpsWorks/OpsWorksClient.swift | 29 +++++++++++++++++++ .../AWSOpsWorksCM/OpsWorksCMClient.swift | 29 +++++++++++++++++++ .../OrganizationsClient.swift | 29 +++++++++++++++++++ .../Services/AWSOutposts/OutpostsClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSPI/PIClient.swift | 29 +++++++++++++++++++ .../Services/AWSPanorama/PanoramaClient.swift | 29 +++++++++++++++++++ .../PaymentCryptographyClient.swift | 29 +++++++++++++++++++ .../PaymentCryptographyDataClient.swift | 29 +++++++++++++++++++ .../PcaConnectorAdClient.swift | 29 +++++++++++++++++++ .../AWSPersonalize/PersonalizeClient.swift | 29 +++++++++++++++++++ .../PersonalizeEventsClient.swift | 29 +++++++++++++++++++ .../PersonalizeRuntimeClient.swift | 29 +++++++++++++++++++ .../Services/AWSPinpoint/PinpointClient.swift | 29 +++++++++++++++++++ .../PinpointEmailClient.swift | 29 +++++++++++++++++++ .../PinpointSMSVoiceClient.swift | 29 +++++++++++++++++++ .../PinpointSMSVoiceV2Client.swift | 29 +++++++++++++++++++ Sources/Services/AWSPipes/PipesClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSPolly/PollyClient.swift | 29 +++++++++++++++++++ .../Services/AWSPricing/PricingClient.swift | 29 +++++++++++++++++++ .../PrivateNetworksClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSProton/ProtonClient.swift | 29 +++++++++++++++++++ .../AWSQBusiness/QBusinessClient.swift | 29 +++++++++++++++++++ .../Services/AWSQConnect/QConnectClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSQLDB/QLDBClient.swift | 29 +++++++++++++++++++ .../AWSQLDBSession/QLDBSessionClient.swift | 29 +++++++++++++++++++ .../AWSQuickSight/QuickSightClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSRAM/RAMClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSRDS/RDSClient.swift | 29 +++++++++++++++++++ .../Services/AWSRDSData/RDSDataClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSRUM/RUMClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSRbin/RbinClient.swift | 29 +++++++++++++++++++ .../Services/AWSRedshift/RedshiftClient.swift | 29 +++++++++++++++++++ .../AWSRedshiftData/RedshiftDataClient.swift | 29 +++++++++++++++++++ .../RedshiftServerlessClient.swift | 29 +++++++++++++++++++ .../AWSRekognition/RekognitionClient.swift | 29 +++++++++++++++++++ .../AWSRepostspace/RepostspaceClient.swift | 29 +++++++++++++++++++ .../ResiliencehubClient.swift | 29 +++++++++++++++++++ .../ResourceExplorer2Client.swift | 29 +++++++++++++++++++ .../ResourceGroupsClient.swift | 29 +++++++++++++++++++ .../ResourceGroupsTaggingAPIClient.swift | 29 +++++++++++++++++++ .../AWSRoboMaker/RoboMakerClient.swift | 29 +++++++++++++++++++ .../RolesAnywhereClient.swift | 29 +++++++++++++++++++ .../Services/AWSRoute53/Route53Client.swift | 29 +++++++++++++++++++ .../Route53DomainsClient.swift | 29 +++++++++++++++++++ .../Route53RecoveryClusterClient.swift | 29 +++++++++++++++++++ .../Route53RecoveryControlConfigClient.swift | 29 +++++++++++++++++++ .../Route53RecoveryReadinessClient.swift | 29 +++++++++++++++++++ .../Route53ResolverClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSS3/S3Client.swift | 29 +++++++++++++++++++ .../AWSS3Control/S3ControlClient.swift | 29 +++++++++++++++++++ .../AWSS3Outposts/S3OutpostsClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSSES/SESClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSSESv2/SESv2Client.swift | 29 +++++++++++++++++++ Sources/Services/AWSSFN/SFNClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSSMS/SMSClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSSNS/SNSClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSSQS/SQSClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSSSM/SSMClient.swift | 29 +++++++++++++++++++ .../AWSSSMContacts/SSMContactsClient.swift | 29 +++++++++++++++++++ .../AWSSSMIncidents/SSMIncidentsClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSSSO/SSOClient.swift | 29 +++++++++++++++++++ .../Services/AWSSSOAdmin/SSOAdminClient.swift | 29 +++++++++++++++++++ .../Services/AWSSSOOIDC/SSOOIDCClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSSTS/STSClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSSWF/SWFClient.swift | 29 +++++++++++++++++++ .../AWSSageMaker/SageMakerClient.swift | 29 +++++++++++++++++++ .../SageMakerA2IRuntimeClient.swift | 29 +++++++++++++++++++ .../SageMakerFeatureStoreRuntimeClient.swift | 29 +++++++++++++++++++ .../SageMakerGeospatialClient.swift | 29 +++++++++++++++++++ .../SageMakerMetricsClient.swift | 29 +++++++++++++++++++ .../SageMakerRuntimeClient.swift | 29 +++++++++++++++++++ .../SagemakerEdgeClient.swift | 29 +++++++++++++++++++ .../AWSSavingsplans/SavingsplansClient.swift | 29 +++++++++++++++++++ .../AWSScheduler/SchedulerClient.swift | 29 +++++++++++++++++++ .../Services/AWSSchemas/SchemasClient.swift | 29 +++++++++++++++++++ .../SecretsManagerClient.swift | 29 +++++++++++++++++++ .../AWSSecurityHub/SecurityHubClient.swift | 29 +++++++++++++++++++ .../AWSSecurityLake/SecurityLakeClient.swift | 29 +++++++++++++++++++ ...erverlessApplicationRepositoryClient.swift | 29 +++++++++++++++++++ .../ServiceCatalogClient.swift | 29 +++++++++++++++++++ .../ServiceCatalogAppRegistryClient.swift | 29 +++++++++++++++++++ .../ServiceDiscoveryClient.swift | 29 +++++++++++++++++++ .../ServiceQuotasClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSShield/ShieldClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSSigner/SignerClient.swift | 29 +++++++++++++++++++ .../SimSpaceWeaverClient.swift | 29 +++++++++++++++++++ .../SnowDeviceManagementClient.swift | 29 +++++++++++++++++++ .../Services/AWSSnowball/SnowballClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSSsmSap/SsmSapClient.swift | 29 +++++++++++++++++++ .../StorageGatewayClient.swift | 29 +++++++++++++++++++ .../Services/AWSSupport/SupportClient.swift | 29 +++++++++++++++++++ .../AWSSupportApp/SupportAppClient.swift | 29 +++++++++++++++++++ .../AWSSynthetics/SyntheticsClient.swift | 29 +++++++++++++++++++ .../Services/AWSTextract/TextractClient.swift | 29 +++++++++++++++++++ .../TimestreamQueryClient.swift | 29 +++++++++++++++++++ .../TimestreamWriteClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSTnb/TnbClient.swift | 29 +++++++++++++++++++ .../AWSTranscribe/TranscribeClient.swift | 29 +++++++++++++++++++ .../TranscribeStreamingClient.swift | 29 +++++++++++++++++++ .../Services/AWSTransfer/TransferClient.swift | 29 +++++++++++++++++++ .../AWSTranslate/TranslateClient.swift | 29 +++++++++++++++++++ .../TrustedAdvisorClient.swift | 29 +++++++++++++++++++ .../AWSVPCLattice/VPCLatticeClient.swift | 29 +++++++++++++++++++ .../VerifiedPermissionsClient.swift | 29 +++++++++++++++++++ .../Services/AWSVoiceID/VoiceIDClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSWAF/WAFClient.swift | 29 +++++++++++++++++++ .../AWSWAFRegional/WAFRegionalClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSWAFV2/WAFV2Client.swift | 29 +++++++++++++++++++ .../WellArchitectedClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSWisdom/WisdomClient.swift | 29 +++++++++++++++++++ .../Services/AWSWorkDocs/WorkDocsClient.swift | 29 +++++++++++++++++++ .../Services/AWSWorkLink/WorkLinkClient.swift | 29 +++++++++++++++++++ .../Services/AWSWorkMail/WorkMailClient.swift | 29 +++++++++++++++++++ .../WorkMailMessageFlowClient.swift | 29 +++++++++++++++++++ .../AWSWorkSpaces/WorkSpacesClient.swift | 29 +++++++++++++++++++ .../WorkSpacesThinClientClient.swift | 29 +++++++++++++++++++ .../WorkSpacesWebClient.swift | 29 +++++++++++++++++++ Sources/Services/AWSXRay/XRayClient.swift | 29 +++++++++++++++++++ 374 files changed, 10846 insertions(+) diff --git a/Sources/Services/AWSACM/ACMClient.swift b/Sources/Services/AWSACM/ACMClient.swift index 32c19b22d48..60fabb76383 100644 --- a/Sources/Services/AWSACM/ACMClient.swift +++ b/Sources/Services/AWSACM/ACMClient.swift @@ -51,6 +51,35 @@ extension ACMClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ACMClient.ACMClientConfiguration { + let clientConfiguration = try await ACMClient.ACMClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ACMClient { + let configuration = try await resolve(plugins: self.plugins) + return ACMClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ACMClient.ACMClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ACMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSACMPCA/ACMPCAClient.swift b/Sources/Services/AWSACMPCA/ACMPCAClient.swift index 7c9d6172d6c..60af286776d 100644 --- a/Sources/Services/AWSACMPCA/ACMPCAClient.swift +++ b/Sources/Services/AWSACMPCA/ACMPCAClient.swift @@ -51,6 +51,35 @@ extension ACMPCAClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ACMPCAClient.ACMPCAClientConfiguration { + let clientConfiguration = try await ACMPCAClient.ACMPCAClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ACMPCAClient { + let configuration = try await resolve(plugins: self.plugins) + return ACMPCAClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ACMPCAClient.ACMPCAClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ACMPCAClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAPIGateway/APIGatewayClient.swift b/Sources/Services/AWSAPIGateway/APIGatewayClient.swift index 69e0ba85681..682e5af905f 100644 --- a/Sources/Services/AWSAPIGateway/APIGatewayClient.swift +++ b/Sources/Services/AWSAPIGateway/APIGatewayClient.swift @@ -51,6 +51,35 @@ extension APIGatewayClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> APIGatewayClient.APIGatewayClientConfiguration { + let clientConfiguration = try await APIGatewayClient.APIGatewayClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> APIGatewayClient { + let configuration = try await resolve(plugins: self.plugins) + return APIGatewayClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension APIGatewayClient.APIGatewayClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct APIGatewayClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSARCZonalShift/ARCZonalShiftClient.swift b/Sources/Services/AWSARCZonalShift/ARCZonalShiftClient.swift index b6c3d41d0a1..8d870a0aef4 100644 --- a/Sources/Services/AWSARCZonalShift/ARCZonalShiftClient.swift +++ b/Sources/Services/AWSARCZonalShift/ARCZonalShiftClient.swift @@ -51,6 +51,35 @@ extension ARCZonalShiftClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ARCZonalShiftClient.ARCZonalShiftClientConfiguration { + let clientConfiguration = try await ARCZonalShiftClient.ARCZonalShiftClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ARCZonalShiftClient { + let configuration = try await resolve(plugins: self.plugins) + return ARCZonalShiftClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ARCZonalShiftClient.ARCZonalShiftClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ARCZonalShiftClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAccessAnalyzer/AccessAnalyzerClient.swift b/Sources/Services/AWSAccessAnalyzer/AccessAnalyzerClient.swift index e97e2977cf5..53b52a55b18 100644 --- a/Sources/Services/AWSAccessAnalyzer/AccessAnalyzerClient.swift +++ b/Sources/Services/AWSAccessAnalyzer/AccessAnalyzerClient.swift @@ -51,6 +51,35 @@ extension AccessAnalyzerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AccessAnalyzerClient.AccessAnalyzerClientConfiguration { + let clientConfiguration = try await AccessAnalyzerClient.AccessAnalyzerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AccessAnalyzerClient { + let configuration = try await resolve(plugins: self.plugins) + return AccessAnalyzerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AccessAnalyzerClient.AccessAnalyzerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AccessAnalyzerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAccount/AccountClient.swift b/Sources/Services/AWSAccount/AccountClient.swift index dfa5d589cb2..8910c2747b3 100644 --- a/Sources/Services/AWSAccount/AccountClient.swift +++ b/Sources/Services/AWSAccount/AccountClient.swift @@ -51,6 +51,35 @@ extension AccountClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AccountClient.AccountClientConfiguration { + let clientConfiguration = try await AccountClient.AccountClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AccountClient { + let configuration = try await resolve(plugins: self.plugins) + return AccountClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AccountClient.AccountClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AccountClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAlexaForBusiness/AlexaForBusinessClient.swift b/Sources/Services/AWSAlexaForBusiness/AlexaForBusinessClient.swift index abf068f9290..38bcacab6d7 100644 --- a/Sources/Services/AWSAlexaForBusiness/AlexaForBusinessClient.swift +++ b/Sources/Services/AWSAlexaForBusiness/AlexaForBusinessClient.swift @@ -51,6 +51,35 @@ extension AlexaForBusinessClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AlexaForBusinessClient.AlexaForBusinessClientConfiguration { + let clientConfiguration = try await AlexaForBusinessClient.AlexaForBusinessClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AlexaForBusinessClient { + let configuration = try await resolve(plugins: self.plugins) + return AlexaForBusinessClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AlexaForBusinessClient.AlexaForBusinessClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AlexaForBusinessClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAmp/AmpClient.swift b/Sources/Services/AWSAmp/AmpClient.swift index 2ed68c8be3c..263f92c9608 100644 --- a/Sources/Services/AWSAmp/AmpClient.swift +++ b/Sources/Services/AWSAmp/AmpClient.swift @@ -51,6 +51,35 @@ extension AmpClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AmpClient.AmpClientConfiguration { + let clientConfiguration = try await AmpClient.AmpClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AmpClient { + let configuration = try await resolve(plugins: self.plugins) + return AmpClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AmpClient.AmpClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AmpClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAmplify/AmplifyClient.swift b/Sources/Services/AWSAmplify/AmplifyClient.swift index cdaae991fc6..f1441dbf78c 100644 --- a/Sources/Services/AWSAmplify/AmplifyClient.swift +++ b/Sources/Services/AWSAmplify/AmplifyClient.swift @@ -51,6 +51,35 @@ extension AmplifyClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AmplifyClient.AmplifyClientConfiguration { + let clientConfiguration = try await AmplifyClient.AmplifyClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AmplifyClient { + let configuration = try await resolve(plugins: self.plugins) + return AmplifyClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AmplifyClient.AmplifyClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AmplifyClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAmplifyBackend/AmplifyBackendClient.swift b/Sources/Services/AWSAmplifyBackend/AmplifyBackendClient.swift index 3fb400a383b..a811e422429 100644 --- a/Sources/Services/AWSAmplifyBackend/AmplifyBackendClient.swift +++ b/Sources/Services/AWSAmplifyBackend/AmplifyBackendClient.swift @@ -51,6 +51,35 @@ extension AmplifyBackendClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AmplifyBackendClient.AmplifyBackendClientConfiguration { + let clientConfiguration = try await AmplifyBackendClient.AmplifyBackendClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AmplifyBackendClient { + let configuration = try await resolve(plugins: self.plugins) + return AmplifyBackendClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AmplifyBackendClient.AmplifyBackendClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AmplifyBackendClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAmplifyUIBuilder/AmplifyUIBuilderClient.swift b/Sources/Services/AWSAmplifyUIBuilder/AmplifyUIBuilderClient.swift index cd4fc3e6d51..e9c7bcf0e24 100644 --- a/Sources/Services/AWSAmplifyUIBuilder/AmplifyUIBuilderClient.swift +++ b/Sources/Services/AWSAmplifyUIBuilder/AmplifyUIBuilderClient.swift @@ -51,6 +51,35 @@ extension AmplifyUIBuilderClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AmplifyUIBuilderClient.AmplifyUIBuilderClientConfiguration { + let clientConfiguration = try await AmplifyUIBuilderClient.AmplifyUIBuilderClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AmplifyUIBuilderClient { + let configuration = try await resolve(plugins: self.plugins) + return AmplifyUIBuilderClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AmplifyUIBuilderClient.AmplifyUIBuilderClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AmplifyUIBuilderClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSApiGatewayManagementApi/ApiGatewayManagementApiClient.swift b/Sources/Services/AWSApiGatewayManagementApi/ApiGatewayManagementApiClient.swift index a1904e36ad8..7fc24968555 100644 --- a/Sources/Services/AWSApiGatewayManagementApi/ApiGatewayManagementApiClient.swift +++ b/Sources/Services/AWSApiGatewayManagementApi/ApiGatewayManagementApiClient.swift @@ -51,6 +51,35 @@ extension ApiGatewayManagementApiClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ApiGatewayManagementApiClient.ApiGatewayManagementApiClientConfiguration { + let clientConfiguration = try await ApiGatewayManagementApiClient.ApiGatewayManagementApiClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ApiGatewayManagementApiClient { + let configuration = try await resolve(plugins: self.plugins) + return ApiGatewayManagementApiClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ApiGatewayManagementApiClient.ApiGatewayManagementApiClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ApiGatewayManagementApiClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSApiGatewayV2/ApiGatewayV2Client.swift b/Sources/Services/AWSApiGatewayV2/ApiGatewayV2Client.swift index eea02519af3..5344da1cf03 100644 --- a/Sources/Services/AWSApiGatewayV2/ApiGatewayV2Client.swift +++ b/Sources/Services/AWSApiGatewayV2/ApiGatewayV2Client.swift @@ -51,6 +51,35 @@ extension ApiGatewayV2Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ApiGatewayV2Client.ApiGatewayV2ClientConfiguration { + let clientConfiguration = try await ApiGatewayV2Client.ApiGatewayV2ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ApiGatewayV2Client { + let configuration = try await resolve(plugins: self.plugins) + return ApiGatewayV2Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ApiGatewayV2Client.ApiGatewayV2ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ApiGatewayV2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAppConfig/AppConfigClient.swift b/Sources/Services/AWSAppConfig/AppConfigClient.swift index e92cc37d3ce..485d9fb50ec 100644 --- a/Sources/Services/AWSAppConfig/AppConfigClient.swift +++ b/Sources/Services/AWSAppConfig/AppConfigClient.swift @@ -51,6 +51,35 @@ extension AppConfigClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AppConfigClient.AppConfigClientConfiguration { + let clientConfiguration = try await AppConfigClient.AppConfigClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AppConfigClient { + let configuration = try await resolve(plugins: self.plugins) + return AppConfigClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AppConfigClient.AppConfigClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AppConfigClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAppConfigData/AppConfigDataClient.swift b/Sources/Services/AWSAppConfigData/AppConfigDataClient.swift index 30307854fb0..2cd5d3ad875 100644 --- a/Sources/Services/AWSAppConfigData/AppConfigDataClient.swift +++ b/Sources/Services/AWSAppConfigData/AppConfigDataClient.swift @@ -51,6 +51,35 @@ extension AppConfigDataClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AppConfigDataClient.AppConfigDataClientConfiguration { + let clientConfiguration = try await AppConfigDataClient.AppConfigDataClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AppConfigDataClient { + let configuration = try await resolve(plugins: self.plugins) + return AppConfigDataClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AppConfigDataClient.AppConfigDataClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AppConfigDataClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAppFabric/AppFabricClient.swift b/Sources/Services/AWSAppFabric/AppFabricClient.swift index b84d2c0f933..40dd0dc0891 100644 --- a/Sources/Services/AWSAppFabric/AppFabricClient.swift +++ b/Sources/Services/AWSAppFabric/AppFabricClient.swift @@ -51,6 +51,35 @@ extension AppFabricClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AppFabricClient.AppFabricClientConfiguration { + let clientConfiguration = try await AppFabricClient.AppFabricClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AppFabricClient { + let configuration = try await resolve(plugins: self.plugins) + return AppFabricClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AppFabricClient.AppFabricClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AppFabricClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAppIntegrations/AppIntegrationsClient.swift b/Sources/Services/AWSAppIntegrations/AppIntegrationsClient.swift index 5dd6533058d..f54e6ea6d51 100644 --- a/Sources/Services/AWSAppIntegrations/AppIntegrationsClient.swift +++ b/Sources/Services/AWSAppIntegrations/AppIntegrationsClient.swift @@ -51,6 +51,35 @@ extension AppIntegrationsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AppIntegrationsClient.AppIntegrationsClientConfiguration { + let clientConfiguration = try await AppIntegrationsClient.AppIntegrationsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AppIntegrationsClient { + let configuration = try await resolve(plugins: self.plugins) + return AppIntegrationsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AppIntegrationsClient.AppIntegrationsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AppIntegrationsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAppMesh/AppMeshClient.swift b/Sources/Services/AWSAppMesh/AppMeshClient.swift index 533faaeab09..f9232df9c9a 100644 --- a/Sources/Services/AWSAppMesh/AppMeshClient.swift +++ b/Sources/Services/AWSAppMesh/AppMeshClient.swift @@ -51,6 +51,35 @@ extension AppMeshClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AppMeshClient.AppMeshClientConfiguration { + let clientConfiguration = try await AppMeshClient.AppMeshClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AppMeshClient { + let configuration = try await resolve(plugins: self.plugins) + return AppMeshClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AppMeshClient.AppMeshClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AppMeshClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAppRunner/AppRunnerClient.swift b/Sources/Services/AWSAppRunner/AppRunnerClient.swift index 663c25e6b5e..aa4e84ad1dc 100644 --- a/Sources/Services/AWSAppRunner/AppRunnerClient.swift +++ b/Sources/Services/AWSAppRunner/AppRunnerClient.swift @@ -51,6 +51,35 @@ extension AppRunnerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AppRunnerClient.AppRunnerClientConfiguration { + let clientConfiguration = try await AppRunnerClient.AppRunnerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AppRunnerClient { + let configuration = try await resolve(plugins: self.plugins) + return AppRunnerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AppRunnerClient.AppRunnerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AppRunnerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAppStream/AppStreamClient.swift b/Sources/Services/AWSAppStream/AppStreamClient.swift index e6387818e9b..6e3e3ae82be 100644 --- a/Sources/Services/AWSAppStream/AppStreamClient.swift +++ b/Sources/Services/AWSAppStream/AppStreamClient.swift @@ -51,6 +51,35 @@ extension AppStreamClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AppStreamClient.AppStreamClientConfiguration { + let clientConfiguration = try await AppStreamClient.AppStreamClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AppStreamClient { + let configuration = try await resolve(plugins: self.plugins) + return AppStreamClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AppStreamClient.AppStreamClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AppStreamClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAppSync/AppSyncClient.swift b/Sources/Services/AWSAppSync/AppSyncClient.swift index 4273dfeedd6..825b6e25a27 100644 --- a/Sources/Services/AWSAppSync/AppSyncClient.swift +++ b/Sources/Services/AWSAppSync/AppSyncClient.swift @@ -51,6 +51,35 @@ extension AppSyncClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AppSyncClient.AppSyncClientConfiguration { + let clientConfiguration = try await AppSyncClient.AppSyncClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AppSyncClient { + let configuration = try await resolve(plugins: self.plugins) + return AppSyncClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AppSyncClient.AppSyncClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AppSyncClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAppflow/AppflowClient.swift b/Sources/Services/AWSAppflow/AppflowClient.swift index fdc6532f6e5..5f07b8f0bee 100644 --- a/Sources/Services/AWSAppflow/AppflowClient.swift +++ b/Sources/Services/AWSAppflow/AppflowClient.swift @@ -51,6 +51,35 @@ extension AppflowClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AppflowClient.AppflowClientConfiguration { + let clientConfiguration = try await AppflowClient.AppflowClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AppflowClient { + let configuration = try await resolve(plugins: self.plugins) + return AppflowClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AppflowClient.AppflowClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AppflowClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSApplicationAutoScaling/ApplicationAutoScalingClient.swift b/Sources/Services/AWSApplicationAutoScaling/ApplicationAutoScalingClient.swift index 6ec14a0b12c..657eb30081b 100644 --- a/Sources/Services/AWSApplicationAutoScaling/ApplicationAutoScalingClient.swift +++ b/Sources/Services/AWSApplicationAutoScaling/ApplicationAutoScalingClient.swift @@ -51,6 +51,35 @@ extension ApplicationAutoScalingClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ApplicationAutoScalingClient.ApplicationAutoScalingClientConfiguration { + let clientConfiguration = try await ApplicationAutoScalingClient.ApplicationAutoScalingClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ApplicationAutoScalingClient { + let configuration = try await resolve(plugins: self.plugins) + return ApplicationAutoScalingClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ApplicationAutoScalingClient.ApplicationAutoScalingClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ApplicationAutoScalingClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSApplicationCostProfiler/ApplicationCostProfilerClient.swift b/Sources/Services/AWSApplicationCostProfiler/ApplicationCostProfilerClient.swift index 690853e1cc9..90cdaebc030 100644 --- a/Sources/Services/AWSApplicationCostProfiler/ApplicationCostProfilerClient.swift +++ b/Sources/Services/AWSApplicationCostProfiler/ApplicationCostProfilerClient.swift @@ -51,6 +51,35 @@ extension ApplicationCostProfilerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ApplicationCostProfilerClient.ApplicationCostProfilerClientConfiguration { + let clientConfiguration = try await ApplicationCostProfilerClient.ApplicationCostProfilerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ApplicationCostProfilerClient { + let configuration = try await resolve(plugins: self.plugins) + return ApplicationCostProfilerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ApplicationCostProfilerClient.ApplicationCostProfilerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ApplicationCostProfilerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSApplicationDiscoveryService/ApplicationDiscoveryClient.swift b/Sources/Services/AWSApplicationDiscoveryService/ApplicationDiscoveryClient.swift index 7f55f5976a4..6d2774f70ec 100644 --- a/Sources/Services/AWSApplicationDiscoveryService/ApplicationDiscoveryClient.swift +++ b/Sources/Services/AWSApplicationDiscoveryService/ApplicationDiscoveryClient.swift @@ -51,6 +51,35 @@ extension ApplicationDiscoveryClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ApplicationDiscoveryClient.ApplicationDiscoveryClientConfiguration { + let clientConfiguration = try await ApplicationDiscoveryClient.ApplicationDiscoveryClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ApplicationDiscoveryClient { + let configuration = try await resolve(plugins: self.plugins) + return ApplicationDiscoveryClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ApplicationDiscoveryClient.ApplicationDiscoveryClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ApplicationDiscoveryClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSApplicationInsights/ApplicationInsightsClient.swift b/Sources/Services/AWSApplicationInsights/ApplicationInsightsClient.swift index f9a267272d7..e78626e9478 100644 --- a/Sources/Services/AWSApplicationInsights/ApplicationInsightsClient.swift +++ b/Sources/Services/AWSApplicationInsights/ApplicationInsightsClient.swift @@ -51,6 +51,35 @@ extension ApplicationInsightsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ApplicationInsightsClient.ApplicationInsightsClientConfiguration { + let clientConfiguration = try await ApplicationInsightsClient.ApplicationInsightsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ApplicationInsightsClient { + let configuration = try await resolve(plugins: self.plugins) + return ApplicationInsightsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ApplicationInsightsClient.ApplicationInsightsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ApplicationInsightsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAthena/AthenaClient.swift b/Sources/Services/AWSAthena/AthenaClient.swift index 0a13008316e..efeaf9bb344 100644 --- a/Sources/Services/AWSAthena/AthenaClient.swift +++ b/Sources/Services/AWSAthena/AthenaClient.swift @@ -51,6 +51,35 @@ extension AthenaClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AthenaClient.AthenaClientConfiguration { + let clientConfiguration = try await AthenaClient.AthenaClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AthenaClient { + let configuration = try await resolve(plugins: self.plugins) + return AthenaClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AthenaClient.AthenaClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AthenaClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAuditManager/AuditManagerClient.swift b/Sources/Services/AWSAuditManager/AuditManagerClient.swift index b734226f2d1..3a0c23dac42 100644 --- a/Sources/Services/AWSAuditManager/AuditManagerClient.swift +++ b/Sources/Services/AWSAuditManager/AuditManagerClient.swift @@ -51,6 +51,35 @@ extension AuditManagerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AuditManagerClient.AuditManagerClientConfiguration { + let clientConfiguration = try await AuditManagerClient.AuditManagerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AuditManagerClient { + let configuration = try await resolve(plugins: self.plugins) + return AuditManagerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AuditManagerClient.AuditManagerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AuditManagerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAutoScaling/AutoScalingClient.swift b/Sources/Services/AWSAutoScaling/AutoScalingClient.swift index 42017864c20..9c6be2a5341 100644 --- a/Sources/Services/AWSAutoScaling/AutoScalingClient.swift +++ b/Sources/Services/AWSAutoScaling/AutoScalingClient.swift @@ -47,6 +47,35 @@ extension AutoScalingClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AutoScalingClient.AutoScalingClientConfiguration { + let clientConfiguration = try await AutoScalingClient.AutoScalingClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AutoScalingClient { + let configuration = try await resolve(plugins: self.plugins) + return AutoScalingClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AutoScalingClient.AutoScalingClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AutoScalingClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSAutoScalingPlans/AutoScalingPlansClient.swift b/Sources/Services/AWSAutoScalingPlans/AutoScalingPlansClient.swift index 34e0b0accde..c75daa241c6 100644 --- a/Sources/Services/AWSAutoScalingPlans/AutoScalingPlansClient.swift +++ b/Sources/Services/AWSAutoScalingPlans/AutoScalingPlansClient.swift @@ -51,6 +51,35 @@ extension AutoScalingPlansClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> AutoScalingPlansClient.AutoScalingPlansClientConfiguration { + let clientConfiguration = try await AutoScalingPlansClient.AutoScalingPlansClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> AutoScalingPlansClient { + let configuration = try await resolve(plugins: self.plugins) + return AutoScalingPlansClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension AutoScalingPlansClient.AutoScalingPlansClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct AutoScalingPlansClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSB2bi/B2biClient.swift b/Sources/Services/AWSB2bi/B2biClient.swift index 8b0a3ddf043..1f6f0665412 100644 --- a/Sources/Services/AWSB2bi/B2biClient.swift +++ b/Sources/Services/AWSB2bi/B2biClient.swift @@ -51,6 +51,35 @@ extension B2biClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> B2biClient.B2biClientConfiguration { + let clientConfiguration = try await B2biClient.B2biClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> B2biClient { + let configuration = try await resolve(plugins: self.plugins) + return B2biClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension B2biClient.B2biClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct B2biClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSBCMDataExports/BCMDataExportsClient.swift b/Sources/Services/AWSBCMDataExports/BCMDataExportsClient.swift index e1ca280760f..18adca79bc0 100644 --- a/Sources/Services/AWSBCMDataExports/BCMDataExportsClient.swift +++ b/Sources/Services/AWSBCMDataExports/BCMDataExportsClient.swift @@ -51,6 +51,35 @@ extension BCMDataExportsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> BCMDataExportsClient.BCMDataExportsClientConfiguration { + let clientConfiguration = try await BCMDataExportsClient.BCMDataExportsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> BCMDataExportsClient { + let configuration = try await resolve(plugins: self.plugins) + return BCMDataExportsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension BCMDataExportsClient.BCMDataExportsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct BCMDataExportsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSBackup/BackupClient.swift b/Sources/Services/AWSBackup/BackupClient.swift index bcec364aea8..40ceefd09fe 100644 --- a/Sources/Services/AWSBackup/BackupClient.swift +++ b/Sources/Services/AWSBackup/BackupClient.swift @@ -51,6 +51,35 @@ extension BackupClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> BackupClient.BackupClientConfiguration { + let clientConfiguration = try await BackupClient.BackupClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> BackupClient { + let configuration = try await resolve(plugins: self.plugins) + return BackupClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension BackupClient.BackupClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct BackupClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSBackupGateway/BackupGatewayClient.swift b/Sources/Services/AWSBackupGateway/BackupGatewayClient.swift index 7b009b93ccc..e419cd13999 100644 --- a/Sources/Services/AWSBackupGateway/BackupGatewayClient.swift +++ b/Sources/Services/AWSBackupGateway/BackupGatewayClient.swift @@ -51,6 +51,35 @@ extension BackupGatewayClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> BackupGatewayClient.BackupGatewayClientConfiguration { + let clientConfiguration = try await BackupGatewayClient.BackupGatewayClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> BackupGatewayClient { + let configuration = try await resolve(plugins: self.plugins) + return BackupGatewayClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension BackupGatewayClient.BackupGatewayClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct BackupGatewayClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSBackupStorage/BackupStorageClient.swift b/Sources/Services/AWSBackupStorage/BackupStorageClient.swift index cab2db601fe..49f3bad429e 100644 --- a/Sources/Services/AWSBackupStorage/BackupStorageClient.swift +++ b/Sources/Services/AWSBackupStorage/BackupStorageClient.swift @@ -51,6 +51,35 @@ extension BackupStorageClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> BackupStorageClient.BackupStorageClientConfiguration { + let clientConfiguration = try await BackupStorageClient.BackupStorageClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> BackupStorageClient { + let configuration = try await resolve(plugins: self.plugins) + return BackupStorageClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension BackupStorageClient.BackupStorageClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct BackupStorageClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSBatch/BatchClient.swift b/Sources/Services/AWSBatch/BatchClient.swift index 70cd2f38273..e27610c3c18 100644 --- a/Sources/Services/AWSBatch/BatchClient.swift +++ b/Sources/Services/AWSBatch/BatchClient.swift @@ -51,6 +51,35 @@ extension BatchClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> BatchClient.BatchClientConfiguration { + let clientConfiguration = try await BatchClient.BatchClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> BatchClient { + let configuration = try await resolve(plugins: self.plugins) + return BatchClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension BatchClient.BatchClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct BatchClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSBedrock/BedrockClient.swift b/Sources/Services/AWSBedrock/BedrockClient.swift index 103298051bf..3d236d9049d 100644 --- a/Sources/Services/AWSBedrock/BedrockClient.swift +++ b/Sources/Services/AWSBedrock/BedrockClient.swift @@ -51,6 +51,35 @@ extension BedrockClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> BedrockClient.BedrockClientConfiguration { + let clientConfiguration = try await BedrockClient.BedrockClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> BedrockClient { + let configuration = try await resolve(plugins: self.plugins) + return BedrockClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension BedrockClient.BedrockClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct BedrockClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSBedrockAgent/BedrockAgentClient.swift b/Sources/Services/AWSBedrockAgent/BedrockAgentClient.swift index b1713b51ed9..442fdb57604 100644 --- a/Sources/Services/AWSBedrockAgent/BedrockAgentClient.swift +++ b/Sources/Services/AWSBedrockAgent/BedrockAgentClient.swift @@ -51,6 +51,35 @@ extension BedrockAgentClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> BedrockAgentClient.BedrockAgentClientConfiguration { + let clientConfiguration = try await BedrockAgentClient.BedrockAgentClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> BedrockAgentClient { + let configuration = try await resolve(plugins: self.plugins) + return BedrockAgentClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension BedrockAgentClient.BedrockAgentClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct BedrockAgentClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSBedrockAgentRuntime/BedrockAgentRuntimeClient.swift b/Sources/Services/AWSBedrockAgentRuntime/BedrockAgentRuntimeClient.swift index b2e4b8d0406..5bccc1af2cb 100644 --- a/Sources/Services/AWSBedrockAgentRuntime/BedrockAgentRuntimeClient.swift +++ b/Sources/Services/AWSBedrockAgentRuntime/BedrockAgentRuntimeClient.swift @@ -51,6 +51,35 @@ extension BedrockAgentRuntimeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> BedrockAgentRuntimeClient.BedrockAgentRuntimeClientConfiguration { + let clientConfiguration = try await BedrockAgentRuntimeClient.BedrockAgentRuntimeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> BedrockAgentRuntimeClient { + let configuration = try await resolve(plugins: self.plugins) + return BedrockAgentRuntimeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension BedrockAgentRuntimeClient.BedrockAgentRuntimeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct BedrockAgentRuntimeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSBedrockRuntime/BedrockRuntimeClient.swift b/Sources/Services/AWSBedrockRuntime/BedrockRuntimeClient.swift index a3a951a8559..113daa60536 100644 --- a/Sources/Services/AWSBedrockRuntime/BedrockRuntimeClient.swift +++ b/Sources/Services/AWSBedrockRuntime/BedrockRuntimeClient.swift @@ -51,6 +51,35 @@ extension BedrockRuntimeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> BedrockRuntimeClient.BedrockRuntimeClientConfiguration { + let clientConfiguration = try await BedrockRuntimeClient.BedrockRuntimeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> BedrockRuntimeClient { + let configuration = try await resolve(plugins: self.plugins) + return BedrockRuntimeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension BedrockRuntimeClient.BedrockRuntimeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct BedrockRuntimeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSBillingconductor/BillingconductorClient.swift b/Sources/Services/AWSBillingconductor/BillingconductorClient.swift index 9ab8ebeba9e..d4707c98075 100644 --- a/Sources/Services/AWSBillingconductor/BillingconductorClient.swift +++ b/Sources/Services/AWSBillingconductor/BillingconductorClient.swift @@ -51,6 +51,35 @@ extension BillingconductorClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> BillingconductorClient.BillingconductorClientConfiguration { + let clientConfiguration = try await BillingconductorClient.BillingconductorClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> BillingconductorClient { + let configuration = try await resolve(plugins: self.plugins) + return BillingconductorClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension BillingconductorClient.BillingconductorClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct BillingconductorClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSBraket/BraketClient.swift b/Sources/Services/AWSBraket/BraketClient.swift index b1861f2d02b..773cc8d4e36 100644 --- a/Sources/Services/AWSBraket/BraketClient.swift +++ b/Sources/Services/AWSBraket/BraketClient.swift @@ -51,6 +51,35 @@ extension BraketClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> BraketClient.BraketClientConfiguration { + let clientConfiguration = try await BraketClient.BraketClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> BraketClient { + let configuration = try await resolve(plugins: self.plugins) + return BraketClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension BraketClient.BraketClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct BraketClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSBudgets/BudgetsClient.swift b/Sources/Services/AWSBudgets/BudgetsClient.swift index 7de720446e7..99cb9422d59 100644 --- a/Sources/Services/AWSBudgets/BudgetsClient.swift +++ b/Sources/Services/AWSBudgets/BudgetsClient.swift @@ -51,6 +51,35 @@ extension BudgetsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> BudgetsClient.BudgetsClientConfiguration { + let clientConfiguration = try await BudgetsClient.BudgetsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> BudgetsClient { + let configuration = try await resolve(plugins: self.plugins) + return BudgetsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension BudgetsClient.BudgetsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct BudgetsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSChime/ChimeClient.swift b/Sources/Services/AWSChime/ChimeClient.swift index 8eff46ac9ee..0bca101bc0f 100644 --- a/Sources/Services/AWSChime/ChimeClient.swift +++ b/Sources/Services/AWSChime/ChimeClient.swift @@ -51,6 +51,35 @@ extension ChimeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ChimeClient.ChimeClientConfiguration { + let clientConfiguration = try await ChimeClient.ChimeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ChimeClient { + let configuration = try await resolve(plugins: self.plugins) + return ChimeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ChimeClient.ChimeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ChimeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSChimeSDKIdentity/ChimeSDKIdentityClient.swift b/Sources/Services/AWSChimeSDKIdentity/ChimeSDKIdentityClient.swift index 224e8c6e1da..ec3426c1360 100644 --- a/Sources/Services/AWSChimeSDKIdentity/ChimeSDKIdentityClient.swift +++ b/Sources/Services/AWSChimeSDKIdentity/ChimeSDKIdentityClient.swift @@ -51,6 +51,35 @@ extension ChimeSDKIdentityClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ChimeSDKIdentityClient.ChimeSDKIdentityClientConfiguration { + let clientConfiguration = try await ChimeSDKIdentityClient.ChimeSDKIdentityClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ChimeSDKIdentityClient { + let configuration = try await resolve(plugins: self.plugins) + return ChimeSDKIdentityClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ChimeSDKIdentityClient.ChimeSDKIdentityClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ChimeSDKIdentityClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSChimeSDKMediaPipelines/ChimeSDKMediaPipelinesClient.swift b/Sources/Services/AWSChimeSDKMediaPipelines/ChimeSDKMediaPipelinesClient.swift index ee468504368..1cbd5fa3e0e 100644 --- a/Sources/Services/AWSChimeSDKMediaPipelines/ChimeSDKMediaPipelinesClient.swift +++ b/Sources/Services/AWSChimeSDKMediaPipelines/ChimeSDKMediaPipelinesClient.swift @@ -51,6 +51,35 @@ extension ChimeSDKMediaPipelinesClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ChimeSDKMediaPipelinesClient.ChimeSDKMediaPipelinesClientConfiguration { + let clientConfiguration = try await ChimeSDKMediaPipelinesClient.ChimeSDKMediaPipelinesClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ChimeSDKMediaPipelinesClient { + let configuration = try await resolve(plugins: self.plugins) + return ChimeSDKMediaPipelinesClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ChimeSDKMediaPipelinesClient.ChimeSDKMediaPipelinesClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ChimeSDKMediaPipelinesClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSChimeSDKMeetings/ChimeSDKMeetingsClient.swift b/Sources/Services/AWSChimeSDKMeetings/ChimeSDKMeetingsClient.swift index 09de010ed7e..3d8e00c97bc 100644 --- a/Sources/Services/AWSChimeSDKMeetings/ChimeSDKMeetingsClient.swift +++ b/Sources/Services/AWSChimeSDKMeetings/ChimeSDKMeetingsClient.swift @@ -51,6 +51,35 @@ extension ChimeSDKMeetingsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ChimeSDKMeetingsClient.ChimeSDKMeetingsClientConfiguration { + let clientConfiguration = try await ChimeSDKMeetingsClient.ChimeSDKMeetingsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ChimeSDKMeetingsClient { + let configuration = try await resolve(plugins: self.plugins) + return ChimeSDKMeetingsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ChimeSDKMeetingsClient.ChimeSDKMeetingsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ChimeSDKMeetingsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSChimeSDKMessaging/ChimeSDKMessagingClient.swift b/Sources/Services/AWSChimeSDKMessaging/ChimeSDKMessagingClient.swift index f9b9a33a006..aea81dbe415 100644 --- a/Sources/Services/AWSChimeSDKMessaging/ChimeSDKMessagingClient.swift +++ b/Sources/Services/AWSChimeSDKMessaging/ChimeSDKMessagingClient.swift @@ -51,6 +51,35 @@ extension ChimeSDKMessagingClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ChimeSDKMessagingClient.ChimeSDKMessagingClientConfiguration { + let clientConfiguration = try await ChimeSDKMessagingClient.ChimeSDKMessagingClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ChimeSDKMessagingClient { + let configuration = try await resolve(plugins: self.plugins) + return ChimeSDKMessagingClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ChimeSDKMessagingClient.ChimeSDKMessagingClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ChimeSDKMessagingClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSChimeSDKVoice/ChimeSDKVoiceClient.swift b/Sources/Services/AWSChimeSDKVoice/ChimeSDKVoiceClient.swift index dd2582938b0..d3efe5b1a35 100644 --- a/Sources/Services/AWSChimeSDKVoice/ChimeSDKVoiceClient.swift +++ b/Sources/Services/AWSChimeSDKVoice/ChimeSDKVoiceClient.swift @@ -51,6 +51,35 @@ extension ChimeSDKVoiceClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ChimeSDKVoiceClient.ChimeSDKVoiceClientConfiguration { + let clientConfiguration = try await ChimeSDKVoiceClient.ChimeSDKVoiceClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ChimeSDKVoiceClient { + let configuration = try await resolve(plugins: self.plugins) + return ChimeSDKVoiceClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ChimeSDKVoiceClient.ChimeSDKVoiceClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ChimeSDKVoiceClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCleanRooms/CleanRoomsClient.swift b/Sources/Services/AWSCleanRooms/CleanRoomsClient.swift index d44f5f3bc8f..e1d93144d5e 100644 --- a/Sources/Services/AWSCleanRooms/CleanRoomsClient.swift +++ b/Sources/Services/AWSCleanRooms/CleanRoomsClient.swift @@ -51,6 +51,35 @@ extension CleanRoomsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CleanRoomsClient.CleanRoomsClientConfiguration { + let clientConfiguration = try await CleanRoomsClient.CleanRoomsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CleanRoomsClient { + let configuration = try await resolve(plugins: self.plugins) + return CleanRoomsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CleanRoomsClient.CleanRoomsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CleanRoomsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCleanRoomsML/CleanRoomsMLClient.swift b/Sources/Services/AWSCleanRoomsML/CleanRoomsMLClient.swift index f07100b032f..032d9ac33e7 100644 --- a/Sources/Services/AWSCleanRoomsML/CleanRoomsMLClient.swift +++ b/Sources/Services/AWSCleanRoomsML/CleanRoomsMLClient.swift @@ -51,6 +51,35 @@ extension CleanRoomsMLClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CleanRoomsMLClient.CleanRoomsMLClientConfiguration { + let clientConfiguration = try await CleanRoomsMLClient.CleanRoomsMLClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CleanRoomsMLClient { + let configuration = try await resolve(plugins: self.plugins) + return CleanRoomsMLClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CleanRoomsMLClient.CleanRoomsMLClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CleanRoomsMLClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCloud9/Cloud9Client.swift b/Sources/Services/AWSCloud9/Cloud9Client.swift index a7b285829ec..48c896792d0 100644 --- a/Sources/Services/AWSCloud9/Cloud9Client.swift +++ b/Sources/Services/AWSCloud9/Cloud9Client.swift @@ -51,6 +51,35 @@ extension Cloud9Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> Cloud9Client.Cloud9ClientConfiguration { + let clientConfiguration = try await Cloud9Client.Cloud9ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> Cloud9Client { + let configuration = try await resolve(plugins: self.plugins) + return Cloud9Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension Cloud9Client.Cloud9ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct Cloud9ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCloudControl/CloudControlClient.swift b/Sources/Services/AWSCloudControl/CloudControlClient.swift index d6c599db1d7..d063d58211c 100644 --- a/Sources/Services/AWSCloudControl/CloudControlClient.swift +++ b/Sources/Services/AWSCloudControl/CloudControlClient.swift @@ -51,6 +51,35 @@ extension CloudControlClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CloudControlClient.CloudControlClientConfiguration { + let clientConfiguration = try await CloudControlClient.CloudControlClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CloudControlClient { + let configuration = try await resolve(plugins: self.plugins) + return CloudControlClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CloudControlClient.CloudControlClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CloudControlClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCloudDirectory/CloudDirectoryClient.swift b/Sources/Services/AWSCloudDirectory/CloudDirectoryClient.swift index 3260264ee58..04cf22167e4 100644 --- a/Sources/Services/AWSCloudDirectory/CloudDirectoryClient.swift +++ b/Sources/Services/AWSCloudDirectory/CloudDirectoryClient.swift @@ -51,6 +51,35 @@ extension CloudDirectoryClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CloudDirectoryClient.CloudDirectoryClientConfiguration { + let clientConfiguration = try await CloudDirectoryClient.CloudDirectoryClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CloudDirectoryClient { + let configuration = try await resolve(plugins: self.plugins) + return CloudDirectoryClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CloudDirectoryClient.CloudDirectoryClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CloudDirectoryClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCloudFormation/CloudFormationClient.swift b/Sources/Services/AWSCloudFormation/CloudFormationClient.swift index 8b2a63d587a..377ecd0ab5d 100644 --- a/Sources/Services/AWSCloudFormation/CloudFormationClient.swift +++ b/Sources/Services/AWSCloudFormation/CloudFormationClient.swift @@ -47,6 +47,35 @@ extension CloudFormationClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CloudFormationClient.CloudFormationClientConfiguration { + let clientConfiguration = try await CloudFormationClient.CloudFormationClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CloudFormationClient { + let configuration = try await resolve(plugins: self.plugins) + return CloudFormationClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CloudFormationClient.CloudFormationClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CloudFormationClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCloudFront/CloudFrontClient.swift b/Sources/Services/AWSCloudFront/CloudFrontClient.swift index 1bd92ba6be5..8abd7e6d1f2 100644 --- a/Sources/Services/AWSCloudFront/CloudFrontClient.swift +++ b/Sources/Services/AWSCloudFront/CloudFrontClient.swift @@ -52,6 +52,35 @@ extension CloudFrontClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CloudFrontClient.CloudFrontClientConfiguration { + let clientConfiguration = try await CloudFrontClient.CloudFrontClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CloudFrontClient { + let configuration = try await resolve(plugins: self.plugins) + return CloudFrontClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CloudFrontClient.CloudFrontClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CloudFrontClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCloudFrontKeyValueStore/CloudFrontKeyValueStoreClient.swift b/Sources/Services/AWSCloudFrontKeyValueStore/CloudFrontKeyValueStoreClient.swift index edf1a677037..39f06dd91a0 100644 --- a/Sources/Services/AWSCloudFrontKeyValueStore/CloudFrontKeyValueStoreClient.swift +++ b/Sources/Services/AWSCloudFrontKeyValueStore/CloudFrontKeyValueStoreClient.swift @@ -51,6 +51,35 @@ extension CloudFrontKeyValueStoreClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CloudFrontKeyValueStoreClient.CloudFrontKeyValueStoreClientConfiguration { + let clientConfiguration = try await CloudFrontKeyValueStoreClient.CloudFrontKeyValueStoreClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CloudFrontKeyValueStoreClient { + let configuration = try await resolve(plugins: self.plugins) + return CloudFrontKeyValueStoreClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CloudFrontKeyValueStoreClient.CloudFrontKeyValueStoreClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CloudFrontKeyValueStoreClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCloudHSM/CloudHSMClient.swift b/Sources/Services/AWSCloudHSM/CloudHSMClient.swift index ec2a22d4287..a2028440002 100644 --- a/Sources/Services/AWSCloudHSM/CloudHSMClient.swift +++ b/Sources/Services/AWSCloudHSM/CloudHSMClient.swift @@ -51,6 +51,35 @@ extension CloudHSMClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CloudHSMClient.CloudHSMClientConfiguration { + let clientConfiguration = try await CloudHSMClient.CloudHSMClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CloudHSMClient { + let configuration = try await resolve(plugins: self.plugins) + return CloudHSMClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CloudHSMClient.CloudHSMClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CloudHSMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCloudHSMV2/CloudHSMV2Client.swift b/Sources/Services/AWSCloudHSMV2/CloudHSMV2Client.swift index 49dde003554..726b2e66c36 100644 --- a/Sources/Services/AWSCloudHSMV2/CloudHSMV2Client.swift +++ b/Sources/Services/AWSCloudHSMV2/CloudHSMV2Client.swift @@ -51,6 +51,35 @@ extension CloudHSMV2Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CloudHSMV2Client.CloudHSMV2ClientConfiguration { + let clientConfiguration = try await CloudHSMV2Client.CloudHSMV2ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CloudHSMV2Client { + let configuration = try await resolve(plugins: self.plugins) + return CloudHSMV2Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CloudHSMV2Client.CloudHSMV2ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CloudHSMV2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCloudSearch/CloudSearchClient.swift b/Sources/Services/AWSCloudSearch/CloudSearchClient.swift index e9014d2cf3f..010fdb85568 100644 --- a/Sources/Services/AWSCloudSearch/CloudSearchClient.swift +++ b/Sources/Services/AWSCloudSearch/CloudSearchClient.swift @@ -47,6 +47,35 @@ extension CloudSearchClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CloudSearchClient.CloudSearchClientConfiguration { + let clientConfiguration = try await CloudSearchClient.CloudSearchClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CloudSearchClient { + let configuration = try await resolve(plugins: self.plugins) + return CloudSearchClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CloudSearchClient.CloudSearchClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CloudSearchClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCloudSearchDomain/CloudSearchDomainClient.swift b/Sources/Services/AWSCloudSearchDomain/CloudSearchDomainClient.swift index 0b5f8f988f4..d9d03defc0f 100644 --- a/Sources/Services/AWSCloudSearchDomain/CloudSearchDomainClient.swift +++ b/Sources/Services/AWSCloudSearchDomain/CloudSearchDomainClient.swift @@ -51,6 +51,35 @@ extension CloudSearchDomainClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CloudSearchDomainClient.CloudSearchDomainClientConfiguration { + let clientConfiguration = try await CloudSearchDomainClient.CloudSearchDomainClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CloudSearchDomainClient { + let configuration = try await resolve(plugins: self.plugins) + return CloudSearchDomainClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CloudSearchDomainClient.CloudSearchDomainClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CloudSearchDomainClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCloudTrail/CloudTrailClient.swift b/Sources/Services/AWSCloudTrail/CloudTrailClient.swift index efe155cb88c..7c3f9978573 100644 --- a/Sources/Services/AWSCloudTrail/CloudTrailClient.swift +++ b/Sources/Services/AWSCloudTrail/CloudTrailClient.swift @@ -51,6 +51,35 @@ extension CloudTrailClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CloudTrailClient.CloudTrailClientConfiguration { + let clientConfiguration = try await CloudTrailClient.CloudTrailClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CloudTrailClient { + let configuration = try await resolve(plugins: self.plugins) + return CloudTrailClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CloudTrailClient.CloudTrailClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CloudTrailClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCloudTrailData/CloudTrailDataClient.swift b/Sources/Services/AWSCloudTrailData/CloudTrailDataClient.swift index 272987b9c9d..1b83412d47e 100644 --- a/Sources/Services/AWSCloudTrailData/CloudTrailDataClient.swift +++ b/Sources/Services/AWSCloudTrailData/CloudTrailDataClient.swift @@ -51,6 +51,35 @@ extension CloudTrailDataClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CloudTrailDataClient.CloudTrailDataClientConfiguration { + let clientConfiguration = try await CloudTrailDataClient.CloudTrailDataClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CloudTrailDataClient { + let configuration = try await resolve(plugins: self.plugins) + return CloudTrailDataClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CloudTrailDataClient.CloudTrailDataClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CloudTrailDataClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCloudWatch/CloudWatchClient.swift b/Sources/Services/AWSCloudWatch/CloudWatchClient.swift index b7d4b875d30..946a1ce43cc 100644 --- a/Sources/Services/AWSCloudWatch/CloudWatchClient.swift +++ b/Sources/Services/AWSCloudWatch/CloudWatchClient.swift @@ -47,6 +47,35 @@ extension CloudWatchClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CloudWatchClient.CloudWatchClientConfiguration { + let clientConfiguration = try await CloudWatchClient.CloudWatchClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CloudWatchClient { + let configuration = try await resolve(plugins: self.plugins) + return CloudWatchClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CloudWatchClient.CloudWatchClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CloudWatchClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCloudWatchEvents/CloudWatchEventsClient.swift b/Sources/Services/AWSCloudWatchEvents/CloudWatchEventsClient.swift index 3a97a43ee39..0559385b349 100644 --- a/Sources/Services/AWSCloudWatchEvents/CloudWatchEventsClient.swift +++ b/Sources/Services/AWSCloudWatchEvents/CloudWatchEventsClient.swift @@ -51,6 +51,35 @@ extension CloudWatchEventsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CloudWatchEventsClient.CloudWatchEventsClientConfiguration { + let clientConfiguration = try await CloudWatchEventsClient.CloudWatchEventsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CloudWatchEventsClient { + let configuration = try await resolve(plugins: self.plugins) + return CloudWatchEventsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CloudWatchEventsClient.CloudWatchEventsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CloudWatchEventsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCloudWatchLogs/CloudWatchLogsClient.swift b/Sources/Services/AWSCloudWatchLogs/CloudWatchLogsClient.swift index 29b46207360..4b8a5222154 100644 --- a/Sources/Services/AWSCloudWatchLogs/CloudWatchLogsClient.swift +++ b/Sources/Services/AWSCloudWatchLogs/CloudWatchLogsClient.swift @@ -51,6 +51,35 @@ extension CloudWatchLogsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CloudWatchLogsClient.CloudWatchLogsClientConfiguration { + let clientConfiguration = try await CloudWatchLogsClient.CloudWatchLogsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CloudWatchLogsClient { + let configuration = try await resolve(plugins: self.plugins) + return CloudWatchLogsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CloudWatchLogsClient.CloudWatchLogsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CloudWatchLogsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCodeBuild/CodeBuildClient.swift b/Sources/Services/AWSCodeBuild/CodeBuildClient.swift index e6ce20323db..42185bbe65a 100644 --- a/Sources/Services/AWSCodeBuild/CodeBuildClient.swift +++ b/Sources/Services/AWSCodeBuild/CodeBuildClient.swift @@ -51,6 +51,35 @@ extension CodeBuildClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CodeBuildClient.CodeBuildClientConfiguration { + let clientConfiguration = try await CodeBuildClient.CodeBuildClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CodeBuildClient { + let configuration = try await resolve(plugins: self.plugins) + return CodeBuildClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CodeBuildClient.CodeBuildClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CodeBuildClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCodeCatalyst/CodeCatalystClient.swift b/Sources/Services/AWSCodeCatalyst/CodeCatalystClient.swift index 01acacf4e87..0dd69b94494 100644 --- a/Sources/Services/AWSCodeCatalyst/CodeCatalystClient.swift +++ b/Sources/Services/AWSCodeCatalyst/CodeCatalystClient.swift @@ -51,6 +51,35 @@ extension CodeCatalystClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CodeCatalystClient.CodeCatalystClientConfiguration { + let clientConfiguration = try await CodeCatalystClient.CodeCatalystClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CodeCatalystClient { + let configuration = try await resolve(plugins: self.plugins) + return CodeCatalystClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CodeCatalystClient.CodeCatalystClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CodeCatalystClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCodeCommit/CodeCommitClient.swift b/Sources/Services/AWSCodeCommit/CodeCommitClient.swift index afdcb31281b..94f242809a1 100644 --- a/Sources/Services/AWSCodeCommit/CodeCommitClient.swift +++ b/Sources/Services/AWSCodeCommit/CodeCommitClient.swift @@ -51,6 +51,35 @@ extension CodeCommitClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CodeCommitClient.CodeCommitClientConfiguration { + let clientConfiguration = try await CodeCommitClient.CodeCommitClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CodeCommitClient { + let configuration = try await resolve(plugins: self.plugins) + return CodeCommitClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CodeCommitClient.CodeCommitClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CodeCommitClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCodeDeploy/CodeDeployClient.swift b/Sources/Services/AWSCodeDeploy/CodeDeployClient.swift index 3a4b2ba31a1..898879c0db0 100644 --- a/Sources/Services/AWSCodeDeploy/CodeDeployClient.swift +++ b/Sources/Services/AWSCodeDeploy/CodeDeployClient.swift @@ -51,6 +51,35 @@ extension CodeDeployClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CodeDeployClient.CodeDeployClientConfiguration { + let clientConfiguration = try await CodeDeployClient.CodeDeployClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CodeDeployClient { + let configuration = try await resolve(plugins: self.plugins) + return CodeDeployClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CodeDeployClient.CodeDeployClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CodeDeployClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCodeGuruProfiler/CodeGuruProfilerClient.swift b/Sources/Services/AWSCodeGuruProfiler/CodeGuruProfilerClient.swift index 2e692194015..4f892aed5c3 100644 --- a/Sources/Services/AWSCodeGuruProfiler/CodeGuruProfilerClient.swift +++ b/Sources/Services/AWSCodeGuruProfiler/CodeGuruProfilerClient.swift @@ -51,6 +51,35 @@ extension CodeGuruProfilerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CodeGuruProfilerClient.CodeGuruProfilerClientConfiguration { + let clientConfiguration = try await CodeGuruProfilerClient.CodeGuruProfilerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CodeGuruProfilerClient { + let configuration = try await resolve(plugins: self.plugins) + return CodeGuruProfilerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CodeGuruProfilerClient.CodeGuruProfilerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CodeGuruProfilerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCodeGuruReviewer/CodeGuruReviewerClient.swift b/Sources/Services/AWSCodeGuruReviewer/CodeGuruReviewerClient.swift index 39e7b7dc4b1..7e86991ad5f 100644 --- a/Sources/Services/AWSCodeGuruReviewer/CodeGuruReviewerClient.swift +++ b/Sources/Services/AWSCodeGuruReviewer/CodeGuruReviewerClient.swift @@ -51,6 +51,35 @@ extension CodeGuruReviewerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CodeGuruReviewerClient.CodeGuruReviewerClientConfiguration { + let clientConfiguration = try await CodeGuruReviewerClient.CodeGuruReviewerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CodeGuruReviewerClient { + let configuration = try await resolve(plugins: self.plugins) + return CodeGuruReviewerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CodeGuruReviewerClient.CodeGuruReviewerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CodeGuruReviewerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCodeGuruSecurity/CodeGuruSecurityClient.swift b/Sources/Services/AWSCodeGuruSecurity/CodeGuruSecurityClient.swift index 9e6e6950827..450e7f13a01 100644 --- a/Sources/Services/AWSCodeGuruSecurity/CodeGuruSecurityClient.swift +++ b/Sources/Services/AWSCodeGuruSecurity/CodeGuruSecurityClient.swift @@ -51,6 +51,35 @@ extension CodeGuruSecurityClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CodeGuruSecurityClient.CodeGuruSecurityClientConfiguration { + let clientConfiguration = try await CodeGuruSecurityClient.CodeGuruSecurityClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CodeGuruSecurityClient { + let configuration = try await resolve(plugins: self.plugins) + return CodeGuruSecurityClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CodeGuruSecurityClient.CodeGuruSecurityClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CodeGuruSecurityClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCodePipeline/CodePipelineClient.swift b/Sources/Services/AWSCodePipeline/CodePipelineClient.swift index bd34fb531f5..97918a0d410 100644 --- a/Sources/Services/AWSCodePipeline/CodePipelineClient.swift +++ b/Sources/Services/AWSCodePipeline/CodePipelineClient.swift @@ -51,6 +51,35 @@ extension CodePipelineClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CodePipelineClient.CodePipelineClientConfiguration { + let clientConfiguration = try await CodePipelineClient.CodePipelineClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CodePipelineClient { + let configuration = try await resolve(plugins: self.plugins) + return CodePipelineClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CodePipelineClient.CodePipelineClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CodePipelineClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCodeStar/CodeStarClient.swift b/Sources/Services/AWSCodeStar/CodeStarClient.swift index 2c5a33191a6..af1476c4ccf 100644 --- a/Sources/Services/AWSCodeStar/CodeStarClient.swift +++ b/Sources/Services/AWSCodeStar/CodeStarClient.swift @@ -51,6 +51,35 @@ extension CodeStarClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CodeStarClient.CodeStarClientConfiguration { + let clientConfiguration = try await CodeStarClient.CodeStarClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CodeStarClient { + let configuration = try await resolve(plugins: self.plugins) + return CodeStarClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CodeStarClient.CodeStarClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CodeStarClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCodeStarconnections/CodeStarconnectionsClient.swift b/Sources/Services/AWSCodeStarconnections/CodeStarconnectionsClient.swift index 4139272ff00..e36fdbf7601 100644 --- a/Sources/Services/AWSCodeStarconnections/CodeStarconnectionsClient.swift +++ b/Sources/Services/AWSCodeStarconnections/CodeStarconnectionsClient.swift @@ -51,6 +51,35 @@ extension CodeStarconnectionsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CodeStarconnectionsClient.CodeStarconnectionsClientConfiguration { + let clientConfiguration = try await CodeStarconnectionsClient.CodeStarconnectionsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CodeStarconnectionsClient { + let configuration = try await resolve(plugins: self.plugins) + return CodeStarconnectionsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CodeStarconnectionsClient.CodeStarconnectionsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CodeStarconnectionsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCodeartifact/CodeartifactClient.swift b/Sources/Services/AWSCodeartifact/CodeartifactClient.swift index fa3a8208055..b62350fe661 100644 --- a/Sources/Services/AWSCodeartifact/CodeartifactClient.swift +++ b/Sources/Services/AWSCodeartifact/CodeartifactClient.swift @@ -51,6 +51,35 @@ extension CodeartifactClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CodeartifactClient.CodeartifactClientConfiguration { + let clientConfiguration = try await CodeartifactClient.CodeartifactClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CodeartifactClient { + let configuration = try await resolve(plugins: self.plugins) + return CodeartifactClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CodeartifactClient.CodeartifactClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CodeartifactClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCodestarnotifications/CodestarnotificationsClient.swift b/Sources/Services/AWSCodestarnotifications/CodestarnotificationsClient.swift index 9c0c1eec1fa..ac498599ae5 100644 --- a/Sources/Services/AWSCodestarnotifications/CodestarnotificationsClient.swift +++ b/Sources/Services/AWSCodestarnotifications/CodestarnotificationsClient.swift @@ -51,6 +51,35 @@ extension CodestarnotificationsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CodestarnotificationsClient.CodestarnotificationsClientConfiguration { + let clientConfiguration = try await CodestarnotificationsClient.CodestarnotificationsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CodestarnotificationsClient { + let configuration = try await resolve(plugins: self.plugins) + return CodestarnotificationsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CodestarnotificationsClient.CodestarnotificationsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CodestarnotificationsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCognitoIdentity/CognitoIdentityClient.swift b/Sources/Services/AWSCognitoIdentity/CognitoIdentityClient.swift index 5d34af2bb76..6f3228cf998 100644 --- a/Sources/Services/AWSCognitoIdentity/CognitoIdentityClient.swift +++ b/Sources/Services/AWSCognitoIdentity/CognitoIdentityClient.swift @@ -51,6 +51,35 @@ extension CognitoIdentityClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CognitoIdentityClient.CognitoIdentityClientConfiguration { + let clientConfiguration = try await CognitoIdentityClient.CognitoIdentityClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CognitoIdentityClient { + let configuration = try await resolve(plugins: self.plugins) + return CognitoIdentityClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CognitoIdentityClient.CognitoIdentityClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CognitoIdentityClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCognitoIdentityProvider/CognitoIdentityProviderClient.swift b/Sources/Services/AWSCognitoIdentityProvider/CognitoIdentityProviderClient.swift index ccf745c92e2..65cb66ad6f9 100644 --- a/Sources/Services/AWSCognitoIdentityProvider/CognitoIdentityProviderClient.swift +++ b/Sources/Services/AWSCognitoIdentityProvider/CognitoIdentityProviderClient.swift @@ -51,6 +51,35 @@ extension CognitoIdentityProviderClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CognitoIdentityProviderClient.CognitoIdentityProviderClientConfiguration { + let clientConfiguration = try await CognitoIdentityProviderClient.CognitoIdentityProviderClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CognitoIdentityProviderClient { + let configuration = try await resolve(plugins: self.plugins) + return CognitoIdentityProviderClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CognitoIdentityProviderClient.CognitoIdentityProviderClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CognitoIdentityProviderClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCognitoSync/CognitoSyncClient.swift b/Sources/Services/AWSCognitoSync/CognitoSyncClient.swift index 528e79bd1de..b55182dbbfd 100644 --- a/Sources/Services/AWSCognitoSync/CognitoSyncClient.swift +++ b/Sources/Services/AWSCognitoSync/CognitoSyncClient.swift @@ -51,6 +51,35 @@ extension CognitoSyncClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CognitoSyncClient.CognitoSyncClientConfiguration { + let clientConfiguration = try await CognitoSyncClient.CognitoSyncClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CognitoSyncClient { + let configuration = try await resolve(plugins: self.plugins) + return CognitoSyncClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CognitoSyncClient.CognitoSyncClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CognitoSyncClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSComprehend/ComprehendClient.swift b/Sources/Services/AWSComprehend/ComprehendClient.swift index 50b59f64c02..94276b6c1f5 100644 --- a/Sources/Services/AWSComprehend/ComprehendClient.swift +++ b/Sources/Services/AWSComprehend/ComprehendClient.swift @@ -51,6 +51,35 @@ extension ComprehendClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ComprehendClient.ComprehendClientConfiguration { + let clientConfiguration = try await ComprehendClient.ComprehendClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ComprehendClient { + let configuration = try await resolve(plugins: self.plugins) + return ComprehendClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ComprehendClient.ComprehendClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ComprehendClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSComprehendMedical/ComprehendMedicalClient.swift b/Sources/Services/AWSComprehendMedical/ComprehendMedicalClient.swift index 882ef7377e3..cbddb83639a 100644 --- a/Sources/Services/AWSComprehendMedical/ComprehendMedicalClient.swift +++ b/Sources/Services/AWSComprehendMedical/ComprehendMedicalClient.swift @@ -51,6 +51,35 @@ extension ComprehendMedicalClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ComprehendMedicalClient.ComprehendMedicalClientConfiguration { + let clientConfiguration = try await ComprehendMedicalClient.ComprehendMedicalClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ComprehendMedicalClient { + let configuration = try await resolve(plugins: self.plugins) + return ComprehendMedicalClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ComprehendMedicalClient.ComprehendMedicalClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ComprehendMedicalClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSComputeOptimizer/ComputeOptimizerClient.swift b/Sources/Services/AWSComputeOptimizer/ComputeOptimizerClient.swift index 1f996b56392..d9184b4e5f8 100644 --- a/Sources/Services/AWSComputeOptimizer/ComputeOptimizerClient.swift +++ b/Sources/Services/AWSComputeOptimizer/ComputeOptimizerClient.swift @@ -51,6 +51,35 @@ extension ComputeOptimizerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ComputeOptimizerClient.ComputeOptimizerClientConfiguration { + let clientConfiguration = try await ComputeOptimizerClient.ComputeOptimizerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ComputeOptimizerClient { + let configuration = try await resolve(plugins: self.plugins) + return ComputeOptimizerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ComputeOptimizerClient.ComputeOptimizerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ComputeOptimizerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSConfigService/ConfigClient.swift b/Sources/Services/AWSConfigService/ConfigClient.swift index db9a4f1292a..f7fd91bd7ff 100644 --- a/Sources/Services/AWSConfigService/ConfigClient.swift +++ b/Sources/Services/AWSConfigService/ConfigClient.swift @@ -51,6 +51,35 @@ extension ConfigClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ConfigClient.ConfigClientConfiguration { + let clientConfiguration = try await ConfigClient.ConfigClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ConfigClient { + let configuration = try await resolve(plugins: self.plugins) + return ConfigClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ConfigClient.ConfigClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ConfigClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSConnect/ConnectClient.swift b/Sources/Services/AWSConnect/ConnectClient.swift index ad210577d92..101e801532d 100644 --- a/Sources/Services/AWSConnect/ConnectClient.swift +++ b/Sources/Services/AWSConnect/ConnectClient.swift @@ -51,6 +51,35 @@ extension ConnectClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ConnectClient.ConnectClientConfiguration { + let clientConfiguration = try await ConnectClient.ConnectClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ConnectClient { + let configuration = try await resolve(plugins: self.plugins) + return ConnectClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ConnectClient.ConnectClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ConnectClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSConnectCampaigns/ConnectCampaignsClient.swift b/Sources/Services/AWSConnectCampaigns/ConnectCampaignsClient.swift index 972dbb79b93..4ea54ced5ea 100644 --- a/Sources/Services/AWSConnectCampaigns/ConnectCampaignsClient.swift +++ b/Sources/Services/AWSConnectCampaigns/ConnectCampaignsClient.swift @@ -51,6 +51,35 @@ extension ConnectCampaignsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ConnectCampaignsClient.ConnectCampaignsClientConfiguration { + let clientConfiguration = try await ConnectCampaignsClient.ConnectCampaignsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ConnectCampaignsClient { + let configuration = try await resolve(plugins: self.plugins) + return ConnectCampaignsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ConnectCampaignsClient.ConnectCampaignsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ConnectCampaignsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSConnectCases/ConnectCasesClient.swift b/Sources/Services/AWSConnectCases/ConnectCasesClient.swift index 34def32923e..663c5edb87c 100644 --- a/Sources/Services/AWSConnectCases/ConnectCasesClient.swift +++ b/Sources/Services/AWSConnectCases/ConnectCasesClient.swift @@ -51,6 +51,35 @@ extension ConnectCasesClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ConnectCasesClient.ConnectCasesClientConfiguration { + let clientConfiguration = try await ConnectCasesClient.ConnectCasesClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ConnectCasesClient { + let configuration = try await resolve(plugins: self.plugins) + return ConnectCasesClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ConnectCasesClient.ConnectCasesClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ConnectCasesClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSConnectContactLens/ConnectContactLensClient.swift b/Sources/Services/AWSConnectContactLens/ConnectContactLensClient.swift index ce7c4d06d06..dcd414b975a 100644 --- a/Sources/Services/AWSConnectContactLens/ConnectContactLensClient.swift +++ b/Sources/Services/AWSConnectContactLens/ConnectContactLensClient.swift @@ -51,6 +51,35 @@ extension ConnectContactLensClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ConnectContactLensClient.ConnectContactLensClientConfiguration { + let clientConfiguration = try await ConnectContactLensClient.ConnectContactLensClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ConnectContactLensClient { + let configuration = try await resolve(plugins: self.plugins) + return ConnectContactLensClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ConnectContactLensClient.ConnectContactLensClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ConnectContactLensClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSConnectParticipant/ConnectParticipantClient.swift b/Sources/Services/AWSConnectParticipant/ConnectParticipantClient.swift index 2333650b14d..69c1ed8d5f4 100644 --- a/Sources/Services/AWSConnectParticipant/ConnectParticipantClient.swift +++ b/Sources/Services/AWSConnectParticipant/ConnectParticipantClient.swift @@ -51,6 +51,35 @@ extension ConnectParticipantClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ConnectParticipantClient.ConnectParticipantClientConfiguration { + let clientConfiguration = try await ConnectParticipantClient.ConnectParticipantClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ConnectParticipantClient { + let configuration = try await resolve(plugins: self.plugins) + return ConnectParticipantClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ConnectParticipantClient.ConnectParticipantClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ConnectParticipantClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSControlTower/ControlTowerClient.swift b/Sources/Services/AWSControlTower/ControlTowerClient.swift index 03b06519819..70893f62021 100644 --- a/Sources/Services/AWSControlTower/ControlTowerClient.swift +++ b/Sources/Services/AWSControlTower/ControlTowerClient.swift @@ -51,6 +51,35 @@ extension ControlTowerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ControlTowerClient.ControlTowerClientConfiguration { + let clientConfiguration = try await ControlTowerClient.ControlTowerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ControlTowerClient { + let configuration = try await resolve(plugins: self.plugins) + return ControlTowerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ControlTowerClient.ControlTowerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ControlTowerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCostExplorer/CostExplorerClient.swift b/Sources/Services/AWSCostExplorer/CostExplorerClient.swift index 72491028a90..8dea3743a0f 100644 --- a/Sources/Services/AWSCostExplorer/CostExplorerClient.swift +++ b/Sources/Services/AWSCostExplorer/CostExplorerClient.swift @@ -51,6 +51,35 @@ extension CostExplorerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CostExplorerClient.CostExplorerClientConfiguration { + let clientConfiguration = try await CostExplorerClient.CostExplorerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CostExplorerClient { + let configuration = try await resolve(plugins: self.plugins) + return CostExplorerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CostExplorerClient.CostExplorerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CostExplorerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCostOptimizationHub/CostOptimizationHubClient.swift b/Sources/Services/AWSCostOptimizationHub/CostOptimizationHubClient.swift index 4b382e428a6..86d4f08df70 100644 --- a/Sources/Services/AWSCostOptimizationHub/CostOptimizationHubClient.swift +++ b/Sources/Services/AWSCostOptimizationHub/CostOptimizationHubClient.swift @@ -51,6 +51,35 @@ extension CostOptimizationHubClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CostOptimizationHubClient.CostOptimizationHubClientConfiguration { + let clientConfiguration = try await CostOptimizationHubClient.CostOptimizationHubClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CostOptimizationHubClient { + let configuration = try await resolve(plugins: self.plugins) + return CostOptimizationHubClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CostOptimizationHubClient.CostOptimizationHubClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CostOptimizationHubClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCostandUsageReportService/CostandUsageReportClient.swift b/Sources/Services/AWSCostandUsageReportService/CostandUsageReportClient.swift index 5a65e7916fb..33f89f21fac 100644 --- a/Sources/Services/AWSCostandUsageReportService/CostandUsageReportClient.swift +++ b/Sources/Services/AWSCostandUsageReportService/CostandUsageReportClient.swift @@ -51,6 +51,35 @@ extension CostandUsageReportClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CostandUsageReportClient.CostandUsageReportClientConfiguration { + let clientConfiguration = try await CostandUsageReportClient.CostandUsageReportClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CostandUsageReportClient { + let configuration = try await resolve(plugins: self.plugins) + return CostandUsageReportClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CostandUsageReportClient.CostandUsageReportClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CostandUsageReportClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSCustomerProfiles/CustomerProfilesClient.swift b/Sources/Services/AWSCustomerProfiles/CustomerProfilesClient.swift index e16cc72f183..ad4d6948f67 100644 --- a/Sources/Services/AWSCustomerProfiles/CustomerProfilesClient.swift +++ b/Sources/Services/AWSCustomerProfiles/CustomerProfilesClient.swift @@ -51,6 +51,35 @@ extension CustomerProfilesClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> CustomerProfilesClient.CustomerProfilesClientConfiguration { + let clientConfiguration = try await CustomerProfilesClient.CustomerProfilesClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> CustomerProfilesClient { + let configuration = try await resolve(plugins: self.plugins) + return CustomerProfilesClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension CustomerProfilesClient.CustomerProfilesClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct CustomerProfilesClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDAX/DAXClient.swift b/Sources/Services/AWSDAX/DAXClient.swift index 48c2162a8d8..1b827aa5734 100644 --- a/Sources/Services/AWSDAX/DAXClient.swift +++ b/Sources/Services/AWSDAX/DAXClient.swift @@ -51,6 +51,35 @@ extension DAXClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DAXClient.DAXClientConfiguration { + let clientConfiguration = try await DAXClient.DAXClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DAXClient { + let configuration = try await resolve(plugins: self.plugins) + return DAXClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DAXClient.DAXClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DAXClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDLM/DLMClient.swift b/Sources/Services/AWSDLM/DLMClient.swift index 55657722bc8..902e5ac0e81 100644 --- a/Sources/Services/AWSDLM/DLMClient.swift +++ b/Sources/Services/AWSDLM/DLMClient.swift @@ -51,6 +51,35 @@ extension DLMClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DLMClient.DLMClientConfiguration { + let clientConfiguration = try await DLMClient.DLMClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DLMClient { + let configuration = try await resolve(plugins: self.plugins) + return DLMClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DLMClient.DLMClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DLMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDataBrew/DataBrewClient.swift b/Sources/Services/AWSDataBrew/DataBrewClient.swift index 02afda1a0b9..233f6c9980c 100644 --- a/Sources/Services/AWSDataBrew/DataBrewClient.swift +++ b/Sources/Services/AWSDataBrew/DataBrewClient.swift @@ -51,6 +51,35 @@ extension DataBrewClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DataBrewClient.DataBrewClientConfiguration { + let clientConfiguration = try await DataBrewClient.DataBrewClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DataBrewClient { + let configuration = try await resolve(plugins: self.plugins) + return DataBrewClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DataBrewClient.DataBrewClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DataBrewClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDataExchange/DataExchangeClient.swift b/Sources/Services/AWSDataExchange/DataExchangeClient.swift index 75bbbc874f9..8c25c40936b 100644 --- a/Sources/Services/AWSDataExchange/DataExchangeClient.swift +++ b/Sources/Services/AWSDataExchange/DataExchangeClient.swift @@ -51,6 +51,35 @@ extension DataExchangeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DataExchangeClient.DataExchangeClientConfiguration { + let clientConfiguration = try await DataExchangeClient.DataExchangeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DataExchangeClient { + let configuration = try await resolve(plugins: self.plugins) + return DataExchangeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DataExchangeClient.DataExchangeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DataExchangeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDataPipeline/DataPipelineClient.swift b/Sources/Services/AWSDataPipeline/DataPipelineClient.swift index 937c7bf234d..0caf3619c47 100644 --- a/Sources/Services/AWSDataPipeline/DataPipelineClient.swift +++ b/Sources/Services/AWSDataPipeline/DataPipelineClient.swift @@ -51,6 +51,35 @@ extension DataPipelineClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DataPipelineClient.DataPipelineClientConfiguration { + let clientConfiguration = try await DataPipelineClient.DataPipelineClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DataPipelineClient { + let configuration = try await resolve(plugins: self.plugins) + return DataPipelineClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DataPipelineClient.DataPipelineClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DataPipelineClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDataSync/DataSyncClient.swift b/Sources/Services/AWSDataSync/DataSyncClient.swift index a2279e4ee6c..88c628fb890 100644 --- a/Sources/Services/AWSDataSync/DataSyncClient.swift +++ b/Sources/Services/AWSDataSync/DataSyncClient.swift @@ -51,6 +51,35 @@ extension DataSyncClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DataSyncClient.DataSyncClientConfiguration { + let clientConfiguration = try await DataSyncClient.DataSyncClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DataSyncClient { + let configuration = try await resolve(plugins: self.plugins) + return DataSyncClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DataSyncClient.DataSyncClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DataSyncClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDataZone/DataZoneClient.swift b/Sources/Services/AWSDataZone/DataZoneClient.swift index 8a140f5aa64..328827ea6d9 100644 --- a/Sources/Services/AWSDataZone/DataZoneClient.swift +++ b/Sources/Services/AWSDataZone/DataZoneClient.swift @@ -51,6 +51,35 @@ extension DataZoneClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DataZoneClient.DataZoneClientConfiguration { + let clientConfiguration = try await DataZoneClient.DataZoneClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DataZoneClient { + let configuration = try await resolve(plugins: self.plugins) + return DataZoneClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DataZoneClient.DataZoneClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DataZoneClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDatabaseMigrationService/DatabaseMigrationClient.swift b/Sources/Services/AWSDatabaseMigrationService/DatabaseMigrationClient.swift index 2e383c44df5..d5ae48021b4 100644 --- a/Sources/Services/AWSDatabaseMigrationService/DatabaseMigrationClient.swift +++ b/Sources/Services/AWSDatabaseMigrationService/DatabaseMigrationClient.swift @@ -51,6 +51,35 @@ extension DatabaseMigrationClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DatabaseMigrationClient.DatabaseMigrationClientConfiguration { + let clientConfiguration = try await DatabaseMigrationClient.DatabaseMigrationClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DatabaseMigrationClient { + let configuration = try await resolve(plugins: self.plugins) + return DatabaseMigrationClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DatabaseMigrationClient.DatabaseMigrationClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DatabaseMigrationClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDetective/DetectiveClient.swift b/Sources/Services/AWSDetective/DetectiveClient.swift index b6fa8a4afb5..79c913cdcea 100644 --- a/Sources/Services/AWSDetective/DetectiveClient.swift +++ b/Sources/Services/AWSDetective/DetectiveClient.swift @@ -51,6 +51,35 @@ extension DetectiveClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DetectiveClient.DetectiveClientConfiguration { + let clientConfiguration = try await DetectiveClient.DetectiveClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DetectiveClient { + let configuration = try await resolve(plugins: self.plugins) + return DetectiveClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DetectiveClient.DetectiveClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DetectiveClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDevOpsGuru/DevOpsGuruClient.swift b/Sources/Services/AWSDevOpsGuru/DevOpsGuruClient.swift index b91a2d79930..a82d4fca98d 100644 --- a/Sources/Services/AWSDevOpsGuru/DevOpsGuruClient.swift +++ b/Sources/Services/AWSDevOpsGuru/DevOpsGuruClient.swift @@ -51,6 +51,35 @@ extension DevOpsGuruClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DevOpsGuruClient.DevOpsGuruClientConfiguration { + let clientConfiguration = try await DevOpsGuruClient.DevOpsGuruClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DevOpsGuruClient { + let configuration = try await resolve(plugins: self.plugins) + return DevOpsGuruClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DevOpsGuruClient.DevOpsGuruClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DevOpsGuruClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDeviceFarm/DeviceFarmClient.swift b/Sources/Services/AWSDeviceFarm/DeviceFarmClient.swift index 2f9fcc1d7ac..9b26cbca191 100644 --- a/Sources/Services/AWSDeviceFarm/DeviceFarmClient.swift +++ b/Sources/Services/AWSDeviceFarm/DeviceFarmClient.swift @@ -51,6 +51,35 @@ extension DeviceFarmClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DeviceFarmClient.DeviceFarmClientConfiguration { + let clientConfiguration = try await DeviceFarmClient.DeviceFarmClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DeviceFarmClient { + let configuration = try await resolve(plugins: self.plugins) + return DeviceFarmClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DeviceFarmClient.DeviceFarmClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DeviceFarmClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDirectConnect/DirectConnectClient.swift b/Sources/Services/AWSDirectConnect/DirectConnectClient.swift index 581ebc7ec6a..2403c30480d 100644 --- a/Sources/Services/AWSDirectConnect/DirectConnectClient.swift +++ b/Sources/Services/AWSDirectConnect/DirectConnectClient.swift @@ -51,6 +51,35 @@ extension DirectConnectClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DirectConnectClient.DirectConnectClientConfiguration { + let clientConfiguration = try await DirectConnectClient.DirectConnectClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DirectConnectClient { + let configuration = try await resolve(plugins: self.plugins) + return DirectConnectClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DirectConnectClient.DirectConnectClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DirectConnectClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDirectoryService/DirectoryClient.swift b/Sources/Services/AWSDirectoryService/DirectoryClient.swift index ea29f32f93f..c988f5cccde 100644 --- a/Sources/Services/AWSDirectoryService/DirectoryClient.swift +++ b/Sources/Services/AWSDirectoryService/DirectoryClient.swift @@ -51,6 +51,35 @@ extension DirectoryClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DirectoryClient.DirectoryClientConfiguration { + let clientConfiguration = try await DirectoryClient.DirectoryClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DirectoryClient { + let configuration = try await resolve(plugins: self.plugins) + return DirectoryClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DirectoryClient.DirectoryClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DirectoryClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDocDB/DocDBClient.swift b/Sources/Services/AWSDocDB/DocDBClient.swift index 15b3f0aa22f..1c8e72e4b55 100644 --- a/Sources/Services/AWSDocDB/DocDBClient.swift +++ b/Sources/Services/AWSDocDB/DocDBClient.swift @@ -47,6 +47,35 @@ extension DocDBClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DocDBClient.DocDBClientConfiguration { + let clientConfiguration = try await DocDBClient.DocDBClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DocDBClient { + let configuration = try await resolve(plugins: self.plugins) + return DocDBClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DocDBClient.DocDBClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DocDBClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDocDBElastic/DocDBElasticClient.swift b/Sources/Services/AWSDocDBElastic/DocDBElasticClient.swift index 53b7d25f0fd..f67ef19a635 100644 --- a/Sources/Services/AWSDocDBElastic/DocDBElasticClient.swift +++ b/Sources/Services/AWSDocDBElastic/DocDBElasticClient.swift @@ -51,6 +51,35 @@ extension DocDBElasticClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DocDBElasticClient.DocDBElasticClientConfiguration { + let clientConfiguration = try await DocDBElasticClient.DocDBElasticClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DocDBElasticClient { + let configuration = try await resolve(plugins: self.plugins) + return DocDBElasticClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DocDBElasticClient.DocDBElasticClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DocDBElasticClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDrs/DrsClient.swift b/Sources/Services/AWSDrs/DrsClient.swift index a655d9c25ee..481637f1625 100644 --- a/Sources/Services/AWSDrs/DrsClient.swift +++ b/Sources/Services/AWSDrs/DrsClient.swift @@ -51,6 +51,35 @@ extension DrsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DrsClient.DrsClientConfiguration { + let clientConfiguration = try await DrsClient.DrsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DrsClient { + let configuration = try await resolve(plugins: self.plugins) + return DrsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DrsClient.DrsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DrsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDynamoDB/DynamoDBClient.swift b/Sources/Services/AWSDynamoDB/DynamoDBClient.swift index 8d8c59f90e4..38a4ce49148 100644 --- a/Sources/Services/AWSDynamoDB/DynamoDBClient.swift +++ b/Sources/Services/AWSDynamoDB/DynamoDBClient.swift @@ -51,6 +51,35 @@ extension DynamoDBClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DynamoDBClient.DynamoDBClientConfiguration { + let clientConfiguration = try await DynamoDBClient.DynamoDBClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DynamoDBClient { + let configuration = try await resolve(plugins: self.plugins) + return DynamoDBClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DynamoDBClient.DynamoDBClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DynamoDBClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSDynamoDBStreams/DynamoDBStreamsClient.swift b/Sources/Services/AWSDynamoDBStreams/DynamoDBStreamsClient.swift index 2644e29ce09..1b7493cab08 100644 --- a/Sources/Services/AWSDynamoDBStreams/DynamoDBStreamsClient.swift +++ b/Sources/Services/AWSDynamoDBStreams/DynamoDBStreamsClient.swift @@ -51,6 +51,35 @@ extension DynamoDBStreamsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> DynamoDBStreamsClient.DynamoDBStreamsClientConfiguration { + let clientConfiguration = try await DynamoDBStreamsClient.DynamoDBStreamsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> DynamoDBStreamsClient { + let configuration = try await resolve(plugins: self.plugins) + return DynamoDBStreamsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension DynamoDBStreamsClient.DynamoDBStreamsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct DynamoDBStreamsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSEBS/EBSClient.swift b/Sources/Services/AWSEBS/EBSClient.swift index cbf84d1cacf..e9041c50e2e 100644 --- a/Sources/Services/AWSEBS/EBSClient.swift +++ b/Sources/Services/AWSEBS/EBSClient.swift @@ -51,6 +51,35 @@ extension EBSClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> EBSClient.EBSClientConfiguration { + let clientConfiguration = try await EBSClient.EBSClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> EBSClient { + let configuration = try await resolve(plugins: self.plugins) + return EBSClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension EBSClient.EBSClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct EBSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSEC2/EC2Client.swift b/Sources/Services/AWSEC2/EC2Client.swift index 454a0f274e3..1be2a61cfc0 100644 --- a/Sources/Services/AWSEC2/EC2Client.swift +++ b/Sources/Services/AWSEC2/EC2Client.swift @@ -47,6 +47,35 @@ extension EC2Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> EC2Client.EC2ClientConfiguration { + let clientConfiguration = try await EC2Client.EC2ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> EC2Client { + let configuration = try await resolve(plugins: self.plugins) + return EC2Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension EC2Client.EC2ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct EC2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSEC2InstanceConnect/EC2InstanceConnectClient.swift b/Sources/Services/AWSEC2InstanceConnect/EC2InstanceConnectClient.swift index cf9e886d417..e4740c0e878 100644 --- a/Sources/Services/AWSEC2InstanceConnect/EC2InstanceConnectClient.swift +++ b/Sources/Services/AWSEC2InstanceConnect/EC2InstanceConnectClient.swift @@ -51,6 +51,35 @@ extension EC2InstanceConnectClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> EC2InstanceConnectClient.EC2InstanceConnectClientConfiguration { + let clientConfiguration = try await EC2InstanceConnectClient.EC2InstanceConnectClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> EC2InstanceConnectClient { + let configuration = try await resolve(plugins: self.plugins) + return EC2InstanceConnectClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension EC2InstanceConnectClient.EC2InstanceConnectClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct EC2InstanceConnectClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSECR/ECRClient.swift b/Sources/Services/AWSECR/ECRClient.swift index 325f5011c54..bcab9618d2b 100644 --- a/Sources/Services/AWSECR/ECRClient.swift +++ b/Sources/Services/AWSECR/ECRClient.swift @@ -51,6 +51,35 @@ extension ECRClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ECRClient.ECRClientConfiguration { + let clientConfiguration = try await ECRClient.ECRClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ECRClient { + let configuration = try await resolve(plugins: self.plugins) + return ECRClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ECRClient.ECRClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ECRClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSECRPUBLIC/ECRPUBLICClient.swift b/Sources/Services/AWSECRPUBLIC/ECRPUBLICClient.swift index 35346e734c1..373a0937e02 100644 --- a/Sources/Services/AWSECRPUBLIC/ECRPUBLICClient.swift +++ b/Sources/Services/AWSECRPUBLIC/ECRPUBLICClient.swift @@ -51,6 +51,35 @@ extension ECRPUBLICClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ECRPUBLICClient.ECRPUBLICClientConfiguration { + let clientConfiguration = try await ECRPUBLICClient.ECRPUBLICClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ECRPUBLICClient { + let configuration = try await resolve(plugins: self.plugins) + return ECRPUBLICClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ECRPUBLICClient.ECRPUBLICClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ECRPUBLICClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSECS/ECSClient.swift b/Sources/Services/AWSECS/ECSClient.swift index 05fcf50d5f1..899bf6b546f 100644 --- a/Sources/Services/AWSECS/ECSClient.swift +++ b/Sources/Services/AWSECS/ECSClient.swift @@ -51,6 +51,35 @@ extension ECSClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ECSClient.ECSClientConfiguration { + let clientConfiguration = try await ECSClient.ECSClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ECSClient { + let configuration = try await resolve(plugins: self.plugins) + return ECSClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ECSClient.ECSClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ECSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSEFS/EFSClient.swift b/Sources/Services/AWSEFS/EFSClient.swift index beaf85baccc..7041caa454b 100644 --- a/Sources/Services/AWSEFS/EFSClient.swift +++ b/Sources/Services/AWSEFS/EFSClient.swift @@ -51,6 +51,35 @@ extension EFSClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> EFSClient.EFSClientConfiguration { + let clientConfiguration = try await EFSClient.EFSClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> EFSClient { + let configuration = try await resolve(plugins: self.plugins) + return EFSClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension EFSClient.EFSClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct EFSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSEKS/EKSClient.swift b/Sources/Services/AWSEKS/EKSClient.swift index 5e73b53326e..5f0fbe6d4bc 100644 --- a/Sources/Services/AWSEKS/EKSClient.swift +++ b/Sources/Services/AWSEKS/EKSClient.swift @@ -51,6 +51,35 @@ extension EKSClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> EKSClient.EKSClientConfiguration { + let clientConfiguration = try await EKSClient.EKSClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> EKSClient { + let configuration = try await resolve(plugins: self.plugins) + return EKSClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension EKSClient.EKSClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct EKSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSEKSAuth/EKSAuthClient.swift b/Sources/Services/AWSEKSAuth/EKSAuthClient.swift index 37bbd0869ee..4633d37ccba 100644 --- a/Sources/Services/AWSEKSAuth/EKSAuthClient.swift +++ b/Sources/Services/AWSEKSAuth/EKSAuthClient.swift @@ -51,6 +51,35 @@ extension EKSAuthClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> EKSAuthClient.EKSAuthClientConfiguration { + let clientConfiguration = try await EKSAuthClient.EKSAuthClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> EKSAuthClient { + let configuration = try await resolve(plugins: self.plugins) + return EKSAuthClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension EKSAuthClient.EKSAuthClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct EKSAuthClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSEMR/EMRClient.swift b/Sources/Services/AWSEMR/EMRClient.swift index 59216b47e8d..d0440bedd0a 100644 --- a/Sources/Services/AWSEMR/EMRClient.swift +++ b/Sources/Services/AWSEMR/EMRClient.swift @@ -51,6 +51,35 @@ extension EMRClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> EMRClient.EMRClientConfiguration { + let clientConfiguration = try await EMRClient.EMRClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> EMRClient { + let configuration = try await resolve(plugins: self.plugins) + return EMRClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension EMRClient.EMRClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct EMRClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSEMRServerless/EMRServerlessClient.swift b/Sources/Services/AWSEMRServerless/EMRServerlessClient.swift index 1ec8a8068cc..18d988bd021 100644 --- a/Sources/Services/AWSEMRServerless/EMRServerlessClient.swift +++ b/Sources/Services/AWSEMRServerless/EMRServerlessClient.swift @@ -51,6 +51,35 @@ extension EMRServerlessClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> EMRServerlessClient.EMRServerlessClientConfiguration { + let clientConfiguration = try await EMRServerlessClient.EMRServerlessClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> EMRServerlessClient { + let configuration = try await resolve(plugins: self.plugins) + return EMRServerlessClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension EMRServerlessClient.EMRServerlessClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct EMRServerlessClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSEMRcontainers/EMRcontainersClient.swift b/Sources/Services/AWSEMRcontainers/EMRcontainersClient.swift index c92050f09c7..8f9670fedf4 100644 --- a/Sources/Services/AWSEMRcontainers/EMRcontainersClient.swift +++ b/Sources/Services/AWSEMRcontainers/EMRcontainersClient.swift @@ -51,6 +51,35 @@ extension EMRcontainersClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> EMRcontainersClient.EMRcontainersClientConfiguration { + let clientConfiguration = try await EMRcontainersClient.EMRcontainersClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> EMRcontainersClient { + let configuration = try await resolve(plugins: self.plugins) + return EMRcontainersClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension EMRcontainersClient.EMRcontainersClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct EMRcontainersClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSElastiCache/ElastiCacheClient.swift b/Sources/Services/AWSElastiCache/ElastiCacheClient.swift index 0f59c14cf67..d1edc927f80 100644 --- a/Sources/Services/AWSElastiCache/ElastiCacheClient.swift +++ b/Sources/Services/AWSElastiCache/ElastiCacheClient.swift @@ -47,6 +47,35 @@ extension ElastiCacheClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ElastiCacheClient.ElastiCacheClientConfiguration { + let clientConfiguration = try await ElastiCacheClient.ElastiCacheClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ElastiCacheClient { + let configuration = try await resolve(plugins: self.plugins) + return ElastiCacheClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ElastiCacheClient.ElastiCacheClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ElastiCacheClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSElasticBeanstalk/ElasticBeanstalkClient.swift b/Sources/Services/AWSElasticBeanstalk/ElasticBeanstalkClient.swift index 9010b899060..1d324c6d243 100644 --- a/Sources/Services/AWSElasticBeanstalk/ElasticBeanstalkClient.swift +++ b/Sources/Services/AWSElasticBeanstalk/ElasticBeanstalkClient.swift @@ -47,6 +47,35 @@ extension ElasticBeanstalkClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ElasticBeanstalkClient.ElasticBeanstalkClientConfiguration { + let clientConfiguration = try await ElasticBeanstalkClient.ElasticBeanstalkClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ElasticBeanstalkClient { + let configuration = try await resolve(plugins: self.plugins) + return ElasticBeanstalkClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ElasticBeanstalkClient.ElasticBeanstalkClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ElasticBeanstalkClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSElasticInference/ElasticInferenceClient.swift b/Sources/Services/AWSElasticInference/ElasticInferenceClient.swift index ed134acc90e..8ddb3a4ead5 100644 --- a/Sources/Services/AWSElasticInference/ElasticInferenceClient.swift +++ b/Sources/Services/AWSElasticInference/ElasticInferenceClient.swift @@ -51,6 +51,35 @@ extension ElasticInferenceClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ElasticInferenceClient.ElasticInferenceClientConfiguration { + let clientConfiguration = try await ElasticInferenceClient.ElasticInferenceClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ElasticInferenceClient { + let configuration = try await resolve(plugins: self.plugins) + return ElasticInferenceClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ElasticInferenceClient.ElasticInferenceClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ElasticInferenceClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSElasticLoadBalancing/ElasticLoadBalancingClient.swift b/Sources/Services/AWSElasticLoadBalancing/ElasticLoadBalancingClient.swift index 63b23471e43..48b11be964b 100644 --- a/Sources/Services/AWSElasticLoadBalancing/ElasticLoadBalancingClient.swift +++ b/Sources/Services/AWSElasticLoadBalancing/ElasticLoadBalancingClient.swift @@ -47,6 +47,35 @@ extension ElasticLoadBalancingClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ElasticLoadBalancingClient.ElasticLoadBalancingClientConfiguration { + let clientConfiguration = try await ElasticLoadBalancingClient.ElasticLoadBalancingClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ElasticLoadBalancingClient { + let configuration = try await resolve(plugins: self.plugins) + return ElasticLoadBalancingClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ElasticLoadBalancingClient.ElasticLoadBalancingClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ElasticLoadBalancingClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSElasticLoadBalancingv2/ElasticLoadBalancingv2Client.swift b/Sources/Services/AWSElasticLoadBalancingv2/ElasticLoadBalancingv2Client.swift index aa8f19d7bcb..72cdf275762 100644 --- a/Sources/Services/AWSElasticLoadBalancingv2/ElasticLoadBalancingv2Client.swift +++ b/Sources/Services/AWSElasticLoadBalancingv2/ElasticLoadBalancingv2Client.swift @@ -47,6 +47,35 @@ extension ElasticLoadBalancingv2Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ElasticLoadBalancingv2Client.ElasticLoadBalancingv2ClientConfiguration { + let clientConfiguration = try await ElasticLoadBalancingv2Client.ElasticLoadBalancingv2ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ElasticLoadBalancingv2Client { + let configuration = try await resolve(plugins: self.plugins) + return ElasticLoadBalancingv2Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ElasticLoadBalancingv2Client.ElasticLoadBalancingv2ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ElasticLoadBalancingv2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSElasticTranscoder/ElasticTranscoderClient.swift b/Sources/Services/AWSElasticTranscoder/ElasticTranscoderClient.swift index ec915ed579c..0036851aad7 100644 --- a/Sources/Services/AWSElasticTranscoder/ElasticTranscoderClient.swift +++ b/Sources/Services/AWSElasticTranscoder/ElasticTranscoderClient.swift @@ -51,6 +51,35 @@ extension ElasticTranscoderClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ElasticTranscoderClient.ElasticTranscoderClientConfiguration { + let clientConfiguration = try await ElasticTranscoderClient.ElasticTranscoderClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ElasticTranscoderClient { + let configuration = try await resolve(plugins: self.plugins) + return ElasticTranscoderClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ElasticTranscoderClient.ElasticTranscoderClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ElasticTranscoderClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSElasticsearchService/ElasticsearchClient.swift b/Sources/Services/AWSElasticsearchService/ElasticsearchClient.swift index 5e698559be6..6570e23a068 100644 --- a/Sources/Services/AWSElasticsearchService/ElasticsearchClient.swift +++ b/Sources/Services/AWSElasticsearchService/ElasticsearchClient.swift @@ -51,6 +51,35 @@ extension ElasticsearchClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ElasticsearchClient.ElasticsearchClientConfiguration { + let clientConfiguration = try await ElasticsearchClient.ElasticsearchClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ElasticsearchClient { + let configuration = try await resolve(plugins: self.plugins) + return ElasticsearchClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ElasticsearchClient.ElasticsearchClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ElasticsearchClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSEntityResolution/EntityResolutionClient.swift b/Sources/Services/AWSEntityResolution/EntityResolutionClient.swift index e5f588d4c90..2334ff50f8b 100644 --- a/Sources/Services/AWSEntityResolution/EntityResolutionClient.swift +++ b/Sources/Services/AWSEntityResolution/EntityResolutionClient.swift @@ -51,6 +51,35 @@ extension EntityResolutionClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> EntityResolutionClient.EntityResolutionClientConfiguration { + let clientConfiguration = try await EntityResolutionClient.EntityResolutionClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> EntityResolutionClient { + let configuration = try await resolve(plugins: self.plugins) + return EntityResolutionClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension EntityResolutionClient.EntityResolutionClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct EntityResolutionClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSEventBridge/EventBridgeClient.swift b/Sources/Services/AWSEventBridge/EventBridgeClient.swift index 2aaf9ad9c3e..160bef136d4 100644 --- a/Sources/Services/AWSEventBridge/EventBridgeClient.swift +++ b/Sources/Services/AWSEventBridge/EventBridgeClient.swift @@ -51,6 +51,35 @@ extension EventBridgeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> EventBridgeClient.EventBridgeClientConfiguration { + let clientConfiguration = try await EventBridgeClient.EventBridgeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> EventBridgeClient { + let configuration = try await resolve(plugins: self.plugins) + return EventBridgeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension EventBridgeClient.EventBridgeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct EventBridgeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSEvidently/EvidentlyClient.swift b/Sources/Services/AWSEvidently/EvidentlyClient.swift index 00086617334..0377b56a3df 100644 --- a/Sources/Services/AWSEvidently/EvidentlyClient.swift +++ b/Sources/Services/AWSEvidently/EvidentlyClient.swift @@ -51,6 +51,35 @@ extension EvidentlyClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> EvidentlyClient.EvidentlyClientConfiguration { + let clientConfiguration = try await EvidentlyClient.EvidentlyClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> EvidentlyClient { + let configuration = try await resolve(plugins: self.plugins) + return EvidentlyClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension EvidentlyClient.EvidentlyClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct EvidentlyClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSFMS/FMSClient.swift b/Sources/Services/AWSFMS/FMSClient.swift index 2cfaaf72b44..cc9e265a5fb 100644 --- a/Sources/Services/AWSFMS/FMSClient.swift +++ b/Sources/Services/AWSFMS/FMSClient.swift @@ -51,6 +51,35 @@ extension FMSClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> FMSClient.FMSClientConfiguration { + let clientConfiguration = try await FMSClient.FMSClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> FMSClient { + let configuration = try await resolve(plugins: self.plugins) + return FMSClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension FMSClient.FMSClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct FMSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSFSx/FSxClient.swift b/Sources/Services/AWSFSx/FSxClient.swift index 00de25c3482..4783ac2f817 100644 --- a/Sources/Services/AWSFSx/FSxClient.swift +++ b/Sources/Services/AWSFSx/FSxClient.swift @@ -51,6 +51,35 @@ extension FSxClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> FSxClient.FSxClientConfiguration { + let clientConfiguration = try await FSxClient.FSxClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> FSxClient { + let configuration = try await resolve(plugins: self.plugins) + return FSxClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension FSxClient.FSxClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct FSxClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSFinspace/FinspaceClient.swift b/Sources/Services/AWSFinspace/FinspaceClient.swift index b4880e7067b..3038bbbf84f 100644 --- a/Sources/Services/AWSFinspace/FinspaceClient.swift +++ b/Sources/Services/AWSFinspace/FinspaceClient.swift @@ -51,6 +51,35 @@ extension FinspaceClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> FinspaceClient.FinspaceClientConfiguration { + let clientConfiguration = try await FinspaceClient.FinspaceClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> FinspaceClient { + let configuration = try await resolve(plugins: self.plugins) + return FinspaceClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension FinspaceClient.FinspaceClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct FinspaceClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSFinspacedata/FinspacedataClient.swift b/Sources/Services/AWSFinspacedata/FinspacedataClient.swift index 6971203977c..ece8f8f5de8 100644 --- a/Sources/Services/AWSFinspacedata/FinspacedataClient.swift +++ b/Sources/Services/AWSFinspacedata/FinspacedataClient.swift @@ -51,6 +51,35 @@ extension FinspacedataClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> FinspacedataClient.FinspacedataClientConfiguration { + let clientConfiguration = try await FinspacedataClient.FinspacedataClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> FinspacedataClient { + let configuration = try await resolve(plugins: self.plugins) + return FinspacedataClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension FinspacedataClient.FinspacedataClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct FinspacedataClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSFirehose/FirehoseClient.swift b/Sources/Services/AWSFirehose/FirehoseClient.swift index ad6c1c092a0..0f9cfd039f7 100644 --- a/Sources/Services/AWSFirehose/FirehoseClient.swift +++ b/Sources/Services/AWSFirehose/FirehoseClient.swift @@ -51,6 +51,35 @@ extension FirehoseClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> FirehoseClient.FirehoseClientConfiguration { + let clientConfiguration = try await FirehoseClient.FirehoseClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> FirehoseClient { + let configuration = try await resolve(plugins: self.plugins) + return FirehoseClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension FirehoseClient.FirehoseClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct FirehoseClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSFis/FisClient.swift b/Sources/Services/AWSFis/FisClient.swift index 6909bc61e61..7cd85f61424 100644 --- a/Sources/Services/AWSFis/FisClient.swift +++ b/Sources/Services/AWSFis/FisClient.swift @@ -51,6 +51,35 @@ extension FisClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> FisClient.FisClientConfiguration { + let clientConfiguration = try await FisClient.FisClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> FisClient { + let configuration = try await resolve(plugins: self.plugins) + return FisClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension FisClient.FisClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct FisClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSForecast/ForecastClient.swift b/Sources/Services/AWSForecast/ForecastClient.swift index ff31fb17f49..5b5af2787cd 100644 --- a/Sources/Services/AWSForecast/ForecastClient.swift +++ b/Sources/Services/AWSForecast/ForecastClient.swift @@ -51,6 +51,35 @@ extension ForecastClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ForecastClient.ForecastClientConfiguration { + let clientConfiguration = try await ForecastClient.ForecastClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ForecastClient { + let configuration = try await resolve(plugins: self.plugins) + return ForecastClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ForecastClient.ForecastClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ForecastClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSForecastquery/ForecastqueryClient.swift b/Sources/Services/AWSForecastquery/ForecastqueryClient.swift index 149661e3c4f..e58cf9c3072 100644 --- a/Sources/Services/AWSForecastquery/ForecastqueryClient.swift +++ b/Sources/Services/AWSForecastquery/ForecastqueryClient.swift @@ -51,6 +51,35 @@ extension ForecastqueryClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ForecastqueryClient.ForecastqueryClientConfiguration { + let clientConfiguration = try await ForecastqueryClient.ForecastqueryClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ForecastqueryClient { + let configuration = try await resolve(plugins: self.plugins) + return ForecastqueryClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ForecastqueryClient.ForecastqueryClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ForecastqueryClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSFraudDetector/FraudDetectorClient.swift b/Sources/Services/AWSFraudDetector/FraudDetectorClient.swift index d6de985b098..3c8c2555ae2 100644 --- a/Sources/Services/AWSFraudDetector/FraudDetectorClient.swift +++ b/Sources/Services/AWSFraudDetector/FraudDetectorClient.swift @@ -51,6 +51,35 @@ extension FraudDetectorClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> FraudDetectorClient.FraudDetectorClientConfiguration { + let clientConfiguration = try await FraudDetectorClient.FraudDetectorClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> FraudDetectorClient { + let configuration = try await resolve(plugins: self.plugins) + return FraudDetectorClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension FraudDetectorClient.FraudDetectorClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct FraudDetectorClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSFreeTier/FreeTierClient.swift b/Sources/Services/AWSFreeTier/FreeTierClient.swift index ff5491445db..5944a762e11 100644 --- a/Sources/Services/AWSFreeTier/FreeTierClient.swift +++ b/Sources/Services/AWSFreeTier/FreeTierClient.swift @@ -51,6 +51,35 @@ extension FreeTierClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> FreeTierClient.FreeTierClientConfiguration { + let clientConfiguration = try await FreeTierClient.FreeTierClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> FreeTierClient { + let configuration = try await resolve(plugins: self.plugins) + return FreeTierClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension FreeTierClient.FreeTierClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct FreeTierClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSGameLift/GameLiftClient.swift b/Sources/Services/AWSGameLift/GameLiftClient.swift index 6933baf0e30..0b82e07407b 100644 --- a/Sources/Services/AWSGameLift/GameLiftClient.swift +++ b/Sources/Services/AWSGameLift/GameLiftClient.swift @@ -51,6 +51,35 @@ extension GameLiftClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> GameLiftClient.GameLiftClientConfiguration { + let clientConfiguration = try await GameLiftClient.GameLiftClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> GameLiftClient { + let configuration = try await resolve(plugins: self.plugins) + return GameLiftClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension GameLiftClient.GameLiftClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct GameLiftClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSGlacier/GlacierClient.swift b/Sources/Services/AWSGlacier/GlacierClient.swift index e46fba063ef..1afe06ce3e1 100644 --- a/Sources/Services/AWSGlacier/GlacierClient.swift +++ b/Sources/Services/AWSGlacier/GlacierClient.swift @@ -51,6 +51,35 @@ extension GlacierClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> GlacierClient.GlacierClientConfiguration { + let clientConfiguration = try await GlacierClient.GlacierClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> GlacierClient { + let configuration = try await resolve(plugins: self.plugins) + return GlacierClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension GlacierClient.GlacierClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct GlacierClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSGlobalAccelerator/GlobalAcceleratorClient.swift b/Sources/Services/AWSGlobalAccelerator/GlobalAcceleratorClient.swift index f8ce78c7a26..31d94970057 100644 --- a/Sources/Services/AWSGlobalAccelerator/GlobalAcceleratorClient.swift +++ b/Sources/Services/AWSGlobalAccelerator/GlobalAcceleratorClient.swift @@ -51,6 +51,35 @@ extension GlobalAcceleratorClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> GlobalAcceleratorClient.GlobalAcceleratorClientConfiguration { + let clientConfiguration = try await GlobalAcceleratorClient.GlobalAcceleratorClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> GlobalAcceleratorClient { + let configuration = try await resolve(plugins: self.plugins) + return GlobalAcceleratorClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension GlobalAcceleratorClient.GlobalAcceleratorClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct GlobalAcceleratorClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSGlue/GlueClient.swift b/Sources/Services/AWSGlue/GlueClient.swift index 8b162c55b21..593d557469b 100644 --- a/Sources/Services/AWSGlue/GlueClient.swift +++ b/Sources/Services/AWSGlue/GlueClient.swift @@ -51,6 +51,35 @@ extension GlueClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> GlueClient.GlueClientConfiguration { + let clientConfiguration = try await GlueClient.GlueClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> GlueClient { + let configuration = try await resolve(plugins: self.plugins) + return GlueClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension GlueClient.GlueClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct GlueClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSGrafana/GrafanaClient.swift b/Sources/Services/AWSGrafana/GrafanaClient.swift index 699b20bb1d4..cc646ef4093 100644 --- a/Sources/Services/AWSGrafana/GrafanaClient.swift +++ b/Sources/Services/AWSGrafana/GrafanaClient.swift @@ -51,6 +51,35 @@ extension GrafanaClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> GrafanaClient.GrafanaClientConfiguration { + let clientConfiguration = try await GrafanaClient.GrafanaClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> GrafanaClient { + let configuration = try await resolve(plugins: self.plugins) + return GrafanaClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension GrafanaClient.GrafanaClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct GrafanaClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSGreengrass/GreengrassClient.swift b/Sources/Services/AWSGreengrass/GreengrassClient.swift index 96dfb3bb63f..42044157da3 100644 --- a/Sources/Services/AWSGreengrass/GreengrassClient.swift +++ b/Sources/Services/AWSGreengrass/GreengrassClient.swift @@ -51,6 +51,35 @@ extension GreengrassClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> GreengrassClient.GreengrassClientConfiguration { + let clientConfiguration = try await GreengrassClient.GreengrassClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> GreengrassClient { + let configuration = try await resolve(plugins: self.plugins) + return GreengrassClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension GreengrassClient.GreengrassClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct GreengrassClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSGreengrassV2/GreengrassV2Client.swift b/Sources/Services/AWSGreengrassV2/GreengrassV2Client.swift index c295d694a8c..cc985854e91 100644 --- a/Sources/Services/AWSGreengrassV2/GreengrassV2Client.swift +++ b/Sources/Services/AWSGreengrassV2/GreengrassV2Client.swift @@ -51,6 +51,35 @@ extension GreengrassV2Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> GreengrassV2Client.GreengrassV2ClientConfiguration { + let clientConfiguration = try await GreengrassV2Client.GreengrassV2ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> GreengrassV2Client { + let configuration = try await resolve(plugins: self.plugins) + return GreengrassV2Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension GreengrassV2Client.GreengrassV2ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct GreengrassV2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSGroundStation/GroundStationClient.swift b/Sources/Services/AWSGroundStation/GroundStationClient.swift index 7998b2b1361..e1280b92b7c 100644 --- a/Sources/Services/AWSGroundStation/GroundStationClient.swift +++ b/Sources/Services/AWSGroundStation/GroundStationClient.swift @@ -51,6 +51,35 @@ extension GroundStationClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> GroundStationClient.GroundStationClientConfiguration { + let clientConfiguration = try await GroundStationClient.GroundStationClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> GroundStationClient { + let configuration = try await resolve(plugins: self.plugins) + return GroundStationClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension GroundStationClient.GroundStationClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct GroundStationClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSGuardDuty/GuardDutyClient.swift b/Sources/Services/AWSGuardDuty/GuardDutyClient.swift index 504006b01ff..00f6ca4948f 100644 --- a/Sources/Services/AWSGuardDuty/GuardDutyClient.swift +++ b/Sources/Services/AWSGuardDuty/GuardDutyClient.swift @@ -51,6 +51,35 @@ extension GuardDutyClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> GuardDutyClient.GuardDutyClientConfiguration { + let clientConfiguration = try await GuardDutyClient.GuardDutyClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> GuardDutyClient { + let configuration = try await resolve(plugins: self.plugins) + return GuardDutyClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension GuardDutyClient.GuardDutyClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct GuardDutyClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSHealth/HealthClient.swift b/Sources/Services/AWSHealth/HealthClient.swift index d254d3a1a76..8576288c9b7 100644 --- a/Sources/Services/AWSHealth/HealthClient.swift +++ b/Sources/Services/AWSHealth/HealthClient.swift @@ -51,6 +51,35 @@ extension HealthClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> HealthClient.HealthClientConfiguration { + let clientConfiguration = try await HealthClient.HealthClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> HealthClient { + let configuration = try await resolve(plugins: self.plugins) + return HealthClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension HealthClient.HealthClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct HealthClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSHealthLake/HealthLakeClient.swift b/Sources/Services/AWSHealthLake/HealthLakeClient.swift index 9219c9fa25a..024af93a755 100644 --- a/Sources/Services/AWSHealthLake/HealthLakeClient.swift +++ b/Sources/Services/AWSHealthLake/HealthLakeClient.swift @@ -51,6 +51,35 @@ extension HealthLakeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> HealthLakeClient.HealthLakeClientConfiguration { + let clientConfiguration = try await HealthLakeClient.HealthLakeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> HealthLakeClient { + let configuration = try await resolve(plugins: self.plugins) + return HealthLakeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension HealthLakeClient.HealthLakeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct HealthLakeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSHoneycode/HoneycodeClient.swift b/Sources/Services/AWSHoneycode/HoneycodeClient.swift index d49630299db..ed809a22a03 100644 --- a/Sources/Services/AWSHoneycode/HoneycodeClient.swift +++ b/Sources/Services/AWSHoneycode/HoneycodeClient.swift @@ -51,6 +51,35 @@ extension HoneycodeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> HoneycodeClient.HoneycodeClientConfiguration { + let clientConfiguration = try await HoneycodeClient.HoneycodeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> HoneycodeClient { + let configuration = try await resolve(plugins: self.plugins) + return HoneycodeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension HoneycodeClient.HoneycodeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct HoneycodeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIAM/IAMClient.swift b/Sources/Services/AWSIAM/IAMClient.swift index 8f47dde59cc..c7db28b3da4 100644 --- a/Sources/Services/AWSIAM/IAMClient.swift +++ b/Sources/Services/AWSIAM/IAMClient.swift @@ -47,6 +47,35 @@ extension IAMClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IAMClient.IAMClientConfiguration { + let clientConfiguration = try await IAMClient.IAMClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IAMClient { + let configuration = try await resolve(plugins: self.plugins) + return IAMClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IAMClient.IAMClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IAMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIVSRealTime/IVSRealTimeClient.swift b/Sources/Services/AWSIVSRealTime/IVSRealTimeClient.swift index 55b3ee1b7ba..e8fd1d01bf0 100644 --- a/Sources/Services/AWSIVSRealTime/IVSRealTimeClient.swift +++ b/Sources/Services/AWSIVSRealTime/IVSRealTimeClient.swift @@ -51,6 +51,35 @@ extension IVSRealTimeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IVSRealTimeClient.IVSRealTimeClientConfiguration { + let clientConfiguration = try await IVSRealTimeClient.IVSRealTimeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IVSRealTimeClient { + let configuration = try await resolve(plugins: self.plugins) + return IVSRealTimeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IVSRealTimeClient.IVSRealTimeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IVSRealTimeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIdentitystore/IdentitystoreClient.swift b/Sources/Services/AWSIdentitystore/IdentitystoreClient.swift index 1341bb761d3..404608bd320 100644 --- a/Sources/Services/AWSIdentitystore/IdentitystoreClient.swift +++ b/Sources/Services/AWSIdentitystore/IdentitystoreClient.swift @@ -51,6 +51,35 @@ extension IdentitystoreClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IdentitystoreClient.IdentitystoreClientConfiguration { + let clientConfiguration = try await IdentitystoreClient.IdentitystoreClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IdentitystoreClient { + let configuration = try await resolve(plugins: self.plugins) + return IdentitystoreClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IdentitystoreClient.IdentitystoreClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IdentitystoreClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSImagebuilder/ImagebuilderClient.swift b/Sources/Services/AWSImagebuilder/ImagebuilderClient.swift index a4d6267aad6..53df069699f 100644 --- a/Sources/Services/AWSImagebuilder/ImagebuilderClient.swift +++ b/Sources/Services/AWSImagebuilder/ImagebuilderClient.swift @@ -51,6 +51,35 @@ extension ImagebuilderClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ImagebuilderClient.ImagebuilderClientConfiguration { + let clientConfiguration = try await ImagebuilderClient.ImagebuilderClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ImagebuilderClient { + let configuration = try await resolve(plugins: self.plugins) + return ImagebuilderClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ImagebuilderClient.ImagebuilderClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ImagebuilderClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSInspector/InspectorClient.swift b/Sources/Services/AWSInspector/InspectorClient.swift index 1f600a57bf7..f8b748ccc6f 100644 --- a/Sources/Services/AWSInspector/InspectorClient.swift +++ b/Sources/Services/AWSInspector/InspectorClient.swift @@ -51,6 +51,35 @@ extension InspectorClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> InspectorClient.InspectorClientConfiguration { + let clientConfiguration = try await InspectorClient.InspectorClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> InspectorClient { + let configuration = try await resolve(plugins: self.plugins) + return InspectorClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension InspectorClient.InspectorClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct InspectorClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSInspector2/Inspector2Client.swift b/Sources/Services/AWSInspector2/Inspector2Client.swift index 260a685b6c1..ad9dcb8bedc 100644 --- a/Sources/Services/AWSInspector2/Inspector2Client.swift +++ b/Sources/Services/AWSInspector2/Inspector2Client.swift @@ -51,6 +51,35 @@ extension Inspector2Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> Inspector2Client.Inspector2ClientConfiguration { + let clientConfiguration = try await Inspector2Client.Inspector2ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> Inspector2Client { + let configuration = try await resolve(plugins: self.plugins) + return Inspector2Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension Inspector2Client.Inspector2ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct Inspector2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSInspectorScan/InspectorScanClient.swift b/Sources/Services/AWSInspectorScan/InspectorScanClient.swift index 8603d0118cb..3808b88b699 100644 --- a/Sources/Services/AWSInspectorScan/InspectorScanClient.swift +++ b/Sources/Services/AWSInspectorScan/InspectorScanClient.swift @@ -51,6 +51,35 @@ extension InspectorScanClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> InspectorScanClient.InspectorScanClientConfiguration { + let clientConfiguration = try await InspectorScanClient.InspectorScanClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> InspectorScanClient { + let configuration = try await resolve(plugins: self.plugins) + return InspectorScanClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension InspectorScanClient.InspectorScanClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct InspectorScanClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSInternetMonitor/InternetMonitorClient.swift b/Sources/Services/AWSInternetMonitor/InternetMonitorClient.swift index a69ed904299..c8b954fe7ea 100644 --- a/Sources/Services/AWSInternetMonitor/InternetMonitorClient.swift +++ b/Sources/Services/AWSInternetMonitor/InternetMonitorClient.swift @@ -51,6 +51,35 @@ extension InternetMonitorClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> InternetMonitorClient.InternetMonitorClientConfiguration { + let clientConfiguration = try await InternetMonitorClient.InternetMonitorClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> InternetMonitorClient { + let configuration = try await resolve(plugins: self.plugins) + return InternetMonitorClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension InternetMonitorClient.InternetMonitorClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct InternetMonitorClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIoT/IoTClient.swift b/Sources/Services/AWSIoT/IoTClient.swift index 0520aad019b..dfabb680bcc 100644 --- a/Sources/Services/AWSIoT/IoTClient.swift +++ b/Sources/Services/AWSIoT/IoTClient.swift @@ -51,6 +51,35 @@ extension IoTClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IoTClient.IoTClientConfiguration { + let clientConfiguration = try await IoTClient.IoTClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IoTClient { + let configuration = try await resolve(plugins: self.plugins) + return IoTClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IoTClient.IoTClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IoTClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIoT1ClickDevicesService/IoT1ClickDevicesClient.swift b/Sources/Services/AWSIoT1ClickDevicesService/IoT1ClickDevicesClient.swift index 8c41e9f3e8e..46a4c93de2a 100644 --- a/Sources/Services/AWSIoT1ClickDevicesService/IoT1ClickDevicesClient.swift +++ b/Sources/Services/AWSIoT1ClickDevicesService/IoT1ClickDevicesClient.swift @@ -51,6 +51,35 @@ extension IoT1ClickDevicesClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IoT1ClickDevicesClient.IoT1ClickDevicesClientConfiguration { + let clientConfiguration = try await IoT1ClickDevicesClient.IoT1ClickDevicesClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IoT1ClickDevicesClient { + let configuration = try await resolve(plugins: self.plugins) + return IoT1ClickDevicesClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IoT1ClickDevicesClient.IoT1ClickDevicesClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IoT1ClickDevicesClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIoT1ClickProjects/IoT1ClickProjectsClient.swift b/Sources/Services/AWSIoT1ClickProjects/IoT1ClickProjectsClient.swift index b8cfdb0e195..bc19d86aa97 100644 --- a/Sources/Services/AWSIoT1ClickProjects/IoT1ClickProjectsClient.swift +++ b/Sources/Services/AWSIoT1ClickProjects/IoT1ClickProjectsClient.swift @@ -51,6 +51,35 @@ extension IoT1ClickProjectsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IoT1ClickProjectsClient.IoT1ClickProjectsClientConfiguration { + let clientConfiguration = try await IoT1ClickProjectsClient.IoT1ClickProjectsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IoT1ClickProjectsClient { + let configuration = try await resolve(plugins: self.plugins) + return IoT1ClickProjectsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IoT1ClickProjectsClient.IoT1ClickProjectsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IoT1ClickProjectsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIoTAnalytics/IoTAnalyticsClient.swift b/Sources/Services/AWSIoTAnalytics/IoTAnalyticsClient.swift index be2f34cf32d..f61907a4b20 100644 --- a/Sources/Services/AWSIoTAnalytics/IoTAnalyticsClient.swift +++ b/Sources/Services/AWSIoTAnalytics/IoTAnalyticsClient.swift @@ -51,6 +51,35 @@ extension IoTAnalyticsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IoTAnalyticsClient.IoTAnalyticsClientConfiguration { + let clientConfiguration = try await IoTAnalyticsClient.IoTAnalyticsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IoTAnalyticsClient { + let configuration = try await resolve(plugins: self.plugins) + return IoTAnalyticsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IoTAnalyticsClient.IoTAnalyticsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IoTAnalyticsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIoTDataPlane/IoTDataPlaneClient.swift b/Sources/Services/AWSIoTDataPlane/IoTDataPlaneClient.swift index 7e7e3b6db3d..871256a0d15 100644 --- a/Sources/Services/AWSIoTDataPlane/IoTDataPlaneClient.swift +++ b/Sources/Services/AWSIoTDataPlane/IoTDataPlaneClient.swift @@ -51,6 +51,35 @@ extension IoTDataPlaneClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IoTDataPlaneClient.IoTDataPlaneClientConfiguration { + let clientConfiguration = try await IoTDataPlaneClient.IoTDataPlaneClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IoTDataPlaneClient { + let configuration = try await resolve(plugins: self.plugins) + return IoTDataPlaneClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IoTDataPlaneClient.IoTDataPlaneClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IoTDataPlaneClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIoTEvents/IoTEventsClient.swift b/Sources/Services/AWSIoTEvents/IoTEventsClient.swift index 58112f74668..59fa56f85cb 100644 --- a/Sources/Services/AWSIoTEvents/IoTEventsClient.swift +++ b/Sources/Services/AWSIoTEvents/IoTEventsClient.swift @@ -51,6 +51,35 @@ extension IoTEventsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IoTEventsClient.IoTEventsClientConfiguration { + let clientConfiguration = try await IoTEventsClient.IoTEventsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IoTEventsClient { + let configuration = try await resolve(plugins: self.plugins) + return IoTEventsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IoTEventsClient.IoTEventsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IoTEventsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIoTEventsData/IoTEventsDataClient.swift b/Sources/Services/AWSIoTEventsData/IoTEventsDataClient.swift index 594569dc55b..2f37e34e5fa 100644 --- a/Sources/Services/AWSIoTEventsData/IoTEventsDataClient.swift +++ b/Sources/Services/AWSIoTEventsData/IoTEventsDataClient.swift @@ -51,6 +51,35 @@ extension IoTEventsDataClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IoTEventsDataClient.IoTEventsDataClientConfiguration { + let clientConfiguration = try await IoTEventsDataClient.IoTEventsDataClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IoTEventsDataClient { + let configuration = try await resolve(plugins: self.plugins) + return IoTEventsDataClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IoTEventsDataClient.IoTEventsDataClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IoTEventsDataClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIoTFleetHub/IoTFleetHubClient.swift b/Sources/Services/AWSIoTFleetHub/IoTFleetHubClient.swift index 40ea695caed..c628781d0fb 100644 --- a/Sources/Services/AWSIoTFleetHub/IoTFleetHubClient.swift +++ b/Sources/Services/AWSIoTFleetHub/IoTFleetHubClient.swift @@ -51,6 +51,35 @@ extension IoTFleetHubClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IoTFleetHubClient.IoTFleetHubClientConfiguration { + let clientConfiguration = try await IoTFleetHubClient.IoTFleetHubClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IoTFleetHubClient { + let configuration = try await resolve(plugins: self.plugins) + return IoTFleetHubClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IoTFleetHubClient.IoTFleetHubClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IoTFleetHubClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIoTFleetWise/IoTFleetWiseClient.swift b/Sources/Services/AWSIoTFleetWise/IoTFleetWiseClient.swift index 81eadc9c056..28b885805ba 100644 --- a/Sources/Services/AWSIoTFleetWise/IoTFleetWiseClient.swift +++ b/Sources/Services/AWSIoTFleetWise/IoTFleetWiseClient.swift @@ -51,6 +51,35 @@ extension IoTFleetWiseClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IoTFleetWiseClient.IoTFleetWiseClientConfiguration { + let clientConfiguration = try await IoTFleetWiseClient.IoTFleetWiseClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IoTFleetWiseClient { + let configuration = try await resolve(plugins: self.plugins) + return IoTFleetWiseClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IoTFleetWiseClient.IoTFleetWiseClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IoTFleetWiseClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIoTJobsDataPlane/IoTJobsDataPlaneClient.swift b/Sources/Services/AWSIoTJobsDataPlane/IoTJobsDataPlaneClient.swift index b347b2d3456..19e487a339c 100644 --- a/Sources/Services/AWSIoTJobsDataPlane/IoTJobsDataPlaneClient.swift +++ b/Sources/Services/AWSIoTJobsDataPlane/IoTJobsDataPlaneClient.swift @@ -51,6 +51,35 @@ extension IoTJobsDataPlaneClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IoTJobsDataPlaneClient.IoTJobsDataPlaneClientConfiguration { + let clientConfiguration = try await IoTJobsDataPlaneClient.IoTJobsDataPlaneClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IoTJobsDataPlaneClient { + let configuration = try await resolve(plugins: self.plugins) + return IoTJobsDataPlaneClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IoTJobsDataPlaneClient.IoTJobsDataPlaneClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IoTJobsDataPlaneClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIoTRoboRunner/IoTRoboRunnerClient.swift b/Sources/Services/AWSIoTRoboRunner/IoTRoboRunnerClient.swift index e03f28f8029..fb50e8b55d6 100644 --- a/Sources/Services/AWSIoTRoboRunner/IoTRoboRunnerClient.swift +++ b/Sources/Services/AWSIoTRoboRunner/IoTRoboRunnerClient.swift @@ -51,6 +51,35 @@ extension IoTRoboRunnerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IoTRoboRunnerClient.IoTRoboRunnerClientConfiguration { + let clientConfiguration = try await IoTRoboRunnerClient.IoTRoboRunnerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IoTRoboRunnerClient { + let configuration = try await resolve(plugins: self.plugins) + return IoTRoboRunnerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IoTRoboRunnerClient.IoTRoboRunnerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IoTRoboRunnerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIoTSecureTunneling/IoTSecureTunnelingClient.swift b/Sources/Services/AWSIoTSecureTunneling/IoTSecureTunnelingClient.swift index 23f370ae24d..668b14d4921 100644 --- a/Sources/Services/AWSIoTSecureTunneling/IoTSecureTunnelingClient.swift +++ b/Sources/Services/AWSIoTSecureTunneling/IoTSecureTunnelingClient.swift @@ -51,6 +51,35 @@ extension IoTSecureTunnelingClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IoTSecureTunnelingClient.IoTSecureTunnelingClientConfiguration { + let clientConfiguration = try await IoTSecureTunnelingClient.IoTSecureTunnelingClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IoTSecureTunnelingClient { + let configuration = try await resolve(plugins: self.plugins) + return IoTSecureTunnelingClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IoTSecureTunnelingClient.IoTSecureTunnelingClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IoTSecureTunnelingClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIoTSiteWise/IoTSiteWiseClient.swift b/Sources/Services/AWSIoTSiteWise/IoTSiteWiseClient.swift index de06dceedc9..5d74615bf11 100644 --- a/Sources/Services/AWSIoTSiteWise/IoTSiteWiseClient.swift +++ b/Sources/Services/AWSIoTSiteWise/IoTSiteWiseClient.swift @@ -51,6 +51,35 @@ extension IoTSiteWiseClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IoTSiteWiseClient.IoTSiteWiseClientConfiguration { + let clientConfiguration = try await IoTSiteWiseClient.IoTSiteWiseClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IoTSiteWiseClient { + let configuration = try await resolve(plugins: self.plugins) + return IoTSiteWiseClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IoTSiteWiseClient.IoTSiteWiseClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IoTSiteWiseClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIoTThingsGraph/IoTThingsGraphClient.swift b/Sources/Services/AWSIoTThingsGraph/IoTThingsGraphClient.swift index bbccd4e7c55..48af5167d3f 100644 --- a/Sources/Services/AWSIoTThingsGraph/IoTThingsGraphClient.swift +++ b/Sources/Services/AWSIoTThingsGraph/IoTThingsGraphClient.swift @@ -51,6 +51,35 @@ extension IoTThingsGraphClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IoTThingsGraphClient.IoTThingsGraphClientConfiguration { + let clientConfiguration = try await IoTThingsGraphClient.IoTThingsGraphClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IoTThingsGraphClient { + let configuration = try await resolve(plugins: self.plugins) + return IoTThingsGraphClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IoTThingsGraphClient.IoTThingsGraphClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IoTThingsGraphClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIoTTwinMaker/IoTTwinMakerClient.swift b/Sources/Services/AWSIoTTwinMaker/IoTTwinMakerClient.swift index fefd79bd4cd..49d1d31cf9a 100644 --- a/Sources/Services/AWSIoTTwinMaker/IoTTwinMakerClient.swift +++ b/Sources/Services/AWSIoTTwinMaker/IoTTwinMakerClient.swift @@ -51,6 +51,35 @@ extension IoTTwinMakerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IoTTwinMakerClient.IoTTwinMakerClientConfiguration { + let clientConfiguration = try await IoTTwinMakerClient.IoTTwinMakerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IoTTwinMakerClient { + let configuration = try await resolve(plugins: self.plugins) + return IoTTwinMakerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IoTTwinMakerClient.IoTTwinMakerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IoTTwinMakerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIoTWireless/IoTWirelessClient.swift b/Sources/Services/AWSIoTWireless/IoTWirelessClient.swift index da793e270d0..8308deef038 100644 --- a/Sources/Services/AWSIoTWireless/IoTWirelessClient.swift +++ b/Sources/Services/AWSIoTWireless/IoTWirelessClient.swift @@ -51,6 +51,35 @@ extension IoTWirelessClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IoTWirelessClient.IoTWirelessClientConfiguration { + let clientConfiguration = try await IoTWirelessClient.IoTWirelessClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IoTWirelessClient { + let configuration = try await resolve(plugins: self.plugins) + return IoTWirelessClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IoTWirelessClient.IoTWirelessClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IoTWirelessClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIotDeviceAdvisor/IotDeviceAdvisorClient.swift b/Sources/Services/AWSIotDeviceAdvisor/IotDeviceAdvisorClient.swift index 236c276dd6e..b11cc0a42ed 100644 --- a/Sources/Services/AWSIotDeviceAdvisor/IotDeviceAdvisorClient.swift +++ b/Sources/Services/AWSIotDeviceAdvisor/IotDeviceAdvisorClient.swift @@ -51,6 +51,35 @@ extension IotDeviceAdvisorClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IotDeviceAdvisorClient.IotDeviceAdvisorClientConfiguration { + let clientConfiguration = try await IotDeviceAdvisorClient.IotDeviceAdvisorClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IotDeviceAdvisorClient { + let configuration = try await resolve(plugins: self.plugins) + return IotDeviceAdvisorClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IotDeviceAdvisorClient.IotDeviceAdvisorClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IotDeviceAdvisorClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIvs/IvsClient.swift b/Sources/Services/AWSIvs/IvsClient.swift index 31a749de024..3aa6e0ce110 100644 --- a/Sources/Services/AWSIvs/IvsClient.swift +++ b/Sources/Services/AWSIvs/IvsClient.swift @@ -51,6 +51,35 @@ extension IvsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IvsClient.IvsClientConfiguration { + let clientConfiguration = try await IvsClient.IvsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IvsClient { + let configuration = try await resolve(plugins: self.plugins) + return IvsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IvsClient.IvsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IvsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSIvschat/IvschatClient.swift b/Sources/Services/AWSIvschat/IvschatClient.swift index 7331949b20e..0df89c29ee5 100644 --- a/Sources/Services/AWSIvschat/IvschatClient.swift +++ b/Sources/Services/AWSIvschat/IvschatClient.swift @@ -51,6 +51,35 @@ extension IvschatClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> IvschatClient.IvschatClientConfiguration { + let clientConfiguration = try await IvschatClient.IvschatClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> IvschatClient { + let configuration = try await resolve(plugins: self.plugins) + return IvschatClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension IvschatClient.IvschatClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct IvschatClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSKMS/KMSClient.swift b/Sources/Services/AWSKMS/KMSClient.swift index 38bac53f461..e4afc54baa9 100644 --- a/Sources/Services/AWSKMS/KMSClient.swift +++ b/Sources/Services/AWSKMS/KMSClient.swift @@ -51,6 +51,35 @@ extension KMSClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> KMSClient.KMSClientConfiguration { + let clientConfiguration = try await KMSClient.KMSClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> KMSClient { + let configuration = try await resolve(plugins: self.plugins) + return KMSClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension KMSClient.KMSClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct KMSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSKafka/KafkaClient.swift b/Sources/Services/AWSKafka/KafkaClient.swift index ab9d881d498..c1ee008d35e 100644 --- a/Sources/Services/AWSKafka/KafkaClient.swift +++ b/Sources/Services/AWSKafka/KafkaClient.swift @@ -51,6 +51,35 @@ extension KafkaClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> KafkaClient.KafkaClientConfiguration { + let clientConfiguration = try await KafkaClient.KafkaClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> KafkaClient { + let configuration = try await resolve(plugins: self.plugins) + return KafkaClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension KafkaClient.KafkaClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct KafkaClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSKafkaConnect/KafkaConnectClient.swift b/Sources/Services/AWSKafkaConnect/KafkaConnectClient.swift index 4bc2b37a535..66d60df1b79 100644 --- a/Sources/Services/AWSKafkaConnect/KafkaConnectClient.swift +++ b/Sources/Services/AWSKafkaConnect/KafkaConnectClient.swift @@ -51,6 +51,35 @@ extension KafkaConnectClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> KafkaConnectClient.KafkaConnectClientConfiguration { + let clientConfiguration = try await KafkaConnectClient.KafkaConnectClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> KafkaConnectClient { + let configuration = try await resolve(plugins: self.plugins) + return KafkaConnectClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension KafkaConnectClient.KafkaConnectClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct KafkaConnectClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSKendra/KendraClient.swift b/Sources/Services/AWSKendra/KendraClient.swift index 1026840afbb..dbe60feb65d 100644 --- a/Sources/Services/AWSKendra/KendraClient.swift +++ b/Sources/Services/AWSKendra/KendraClient.swift @@ -51,6 +51,35 @@ extension KendraClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> KendraClient.KendraClientConfiguration { + let clientConfiguration = try await KendraClient.KendraClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> KendraClient { + let configuration = try await resolve(plugins: self.plugins) + return KendraClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension KendraClient.KendraClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct KendraClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSKendraRanking/KendraRankingClient.swift b/Sources/Services/AWSKendraRanking/KendraRankingClient.swift index 6cae6b570e0..477c28b3503 100644 --- a/Sources/Services/AWSKendraRanking/KendraRankingClient.swift +++ b/Sources/Services/AWSKendraRanking/KendraRankingClient.swift @@ -51,6 +51,35 @@ extension KendraRankingClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> KendraRankingClient.KendraRankingClientConfiguration { + let clientConfiguration = try await KendraRankingClient.KendraRankingClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> KendraRankingClient { + let configuration = try await resolve(plugins: self.plugins) + return KendraRankingClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension KendraRankingClient.KendraRankingClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct KendraRankingClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSKeyspaces/KeyspacesClient.swift b/Sources/Services/AWSKeyspaces/KeyspacesClient.swift index 08ad6751c81..dbd62ad6f21 100644 --- a/Sources/Services/AWSKeyspaces/KeyspacesClient.swift +++ b/Sources/Services/AWSKeyspaces/KeyspacesClient.swift @@ -51,6 +51,35 @@ extension KeyspacesClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> KeyspacesClient.KeyspacesClientConfiguration { + let clientConfiguration = try await KeyspacesClient.KeyspacesClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> KeyspacesClient { + let configuration = try await resolve(plugins: self.plugins) + return KeyspacesClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension KeyspacesClient.KeyspacesClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct KeyspacesClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSKinesis/KinesisClient.swift b/Sources/Services/AWSKinesis/KinesisClient.swift index 470d5345ad4..5ec90434861 100644 --- a/Sources/Services/AWSKinesis/KinesisClient.swift +++ b/Sources/Services/AWSKinesis/KinesisClient.swift @@ -51,6 +51,35 @@ extension KinesisClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> KinesisClient.KinesisClientConfiguration { + let clientConfiguration = try await KinesisClient.KinesisClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> KinesisClient { + let configuration = try await resolve(plugins: self.plugins) + return KinesisClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension KinesisClient.KinesisClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct KinesisClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSKinesisAnalytics/KinesisAnalyticsClient.swift b/Sources/Services/AWSKinesisAnalytics/KinesisAnalyticsClient.swift index 342b2538d26..90fdc007c57 100644 --- a/Sources/Services/AWSKinesisAnalytics/KinesisAnalyticsClient.swift +++ b/Sources/Services/AWSKinesisAnalytics/KinesisAnalyticsClient.swift @@ -51,6 +51,35 @@ extension KinesisAnalyticsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> KinesisAnalyticsClient.KinesisAnalyticsClientConfiguration { + let clientConfiguration = try await KinesisAnalyticsClient.KinesisAnalyticsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> KinesisAnalyticsClient { + let configuration = try await resolve(plugins: self.plugins) + return KinesisAnalyticsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension KinesisAnalyticsClient.KinesisAnalyticsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct KinesisAnalyticsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSKinesisAnalyticsV2/KinesisAnalyticsV2Client.swift b/Sources/Services/AWSKinesisAnalyticsV2/KinesisAnalyticsV2Client.swift index 3130fc176cc..c876dd28087 100644 --- a/Sources/Services/AWSKinesisAnalyticsV2/KinesisAnalyticsV2Client.swift +++ b/Sources/Services/AWSKinesisAnalyticsV2/KinesisAnalyticsV2Client.swift @@ -51,6 +51,35 @@ extension KinesisAnalyticsV2Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> KinesisAnalyticsV2Client.KinesisAnalyticsV2ClientConfiguration { + let clientConfiguration = try await KinesisAnalyticsV2Client.KinesisAnalyticsV2ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> KinesisAnalyticsV2Client { + let configuration = try await resolve(plugins: self.plugins) + return KinesisAnalyticsV2Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension KinesisAnalyticsV2Client.KinesisAnalyticsV2ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct KinesisAnalyticsV2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSKinesisVideo/KinesisVideoClient.swift b/Sources/Services/AWSKinesisVideo/KinesisVideoClient.swift index 87cb295dae2..86e8bb92cbf 100644 --- a/Sources/Services/AWSKinesisVideo/KinesisVideoClient.swift +++ b/Sources/Services/AWSKinesisVideo/KinesisVideoClient.swift @@ -51,6 +51,35 @@ extension KinesisVideoClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> KinesisVideoClient.KinesisVideoClientConfiguration { + let clientConfiguration = try await KinesisVideoClient.KinesisVideoClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> KinesisVideoClient { + let configuration = try await resolve(plugins: self.plugins) + return KinesisVideoClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension KinesisVideoClient.KinesisVideoClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct KinesisVideoClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClient.swift b/Sources/Services/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClient.swift index fc4c48302ec..85cacd1855c 100644 --- a/Sources/Services/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClient.swift +++ b/Sources/Services/AWSKinesisVideoArchivedMedia/KinesisVideoArchivedMediaClient.swift @@ -51,6 +51,35 @@ extension KinesisVideoArchivedMediaClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> KinesisVideoArchivedMediaClient.KinesisVideoArchivedMediaClientConfiguration { + let clientConfiguration = try await KinesisVideoArchivedMediaClient.KinesisVideoArchivedMediaClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> KinesisVideoArchivedMediaClient { + let configuration = try await resolve(plugins: self.plugins) + return KinesisVideoArchivedMediaClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension KinesisVideoArchivedMediaClient.KinesisVideoArchivedMediaClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct KinesisVideoArchivedMediaClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSKinesisVideoMedia/KinesisVideoMediaClient.swift b/Sources/Services/AWSKinesisVideoMedia/KinesisVideoMediaClient.swift index 4eb7a2ffa71..74d8dd6a0cd 100644 --- a/Sources/Services/AWSKinesisVideoMedia/KinesisVideoMediaClient.swift +++ b/Sources/Services/AWSKinesisVideoMedia/KinesisVideoMediaClient.swift @@ -51,6 +51,35 @@ extension KinesisVideoMediaClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> KinesisVideoMediaClient.KinesisVideoMediaClientConfiguration { + let clientConfiguration = try await KinesisVideoMediaClient.KinesisVideoMediaClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> KinesisVideoMediaClient { + let configuration = try await resolve(plugins: self.plugins) + return KinesisVideoMediaClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension KinesisVideoMediaClient.KinesisVideoMediaClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct KinesisVideoMediaClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSKinesisVideoSignaling/KinesisVideoSignalingClient.swift b/Sources/Services/AWSKinesisVideoSignaling/KinesisVideoSignalingClient.swift index 794f794c60c..0c595ceb434 100644 --- a/Sources/Services/AWSKinesisVideoSignaling/KinesisVideoSignalingClient.swift +++ b/Sources/Services/AWSKinesisVideoSignaling/KinesisVideoSignalingClient.swift @@ -51,6 +51,35 @@ extension KinesisVideoSignalingClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> KinesisVideoSignalingClient.KinesisVideoSignalingClientConfiguration { + let clientConfiguration = try await KinesisVideoSignalingClient.KinesisVideoSignalingClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> KinesisVideoSignalingClient { + let configuration = try await resolve(plugins: self.plugins) + return KinesisVideoSignalingClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension KinesisVideoSignalingClient.KinesisVideoSignalingClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct KinesisVideoSignalingClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSKinesisVideoWebRTCStorage/KinesisVideoWebRTCStorageClient.swift b/Sources/Services/AWSKinesisVideoWebRTCStorage/KinesisVideoWebRTCStorageClient.swift index 08e8f9bc599..9d61ca248c9 100644 --- a/Sources/Services/AWSKinesisVideoWebRTCStorage/KinesisVideoWebRTCStorageClient.swift +++ b/Sources/Services/AWSKinesisVideoWebRTCStorage/KinesisVideoWebRTCStorageClient.swift @@ -51,6 +51,35 @@ extension KinesisVideoWebRTCStorageClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> KinesisVideoWebRTCStorageClient.KinesisVideoWebRTCStorageClientConfiguration { + let clientConfiguration = try await KinesisVideoWebRTCStorageClient.KinesisVideoWebRTCStorageClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> KinesisVideoWebRTCStorageClient { + let configuration = try await resolve(plugins: self.plugins) + return KinesisVideoWebRTCStorageClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension KinesisVideoWebRTCStorageClient.KinesisVideoWebRTCStorageClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct KinesisVideoWebRTCStorageClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSLakeFormation/LakeFormationClient.swift b/Sources/Services/AWSLakeFormation/LakeFormationClient.swift index a6816cd74dc..d39c845b851 100644 --- a/Sources/Services/AWSLakeFormation/LakeFormationClient.swift +++ b/Sources/Services/AWSLakeFormation/LakeFormationClient.swift @@ -51,6 +51,35 @@ extension LakeFormationClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> LakeFormationClient.LakeFormationClientConfiguration { + let clientConfiguration = try await LakeFormationClient.LakeFormationClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> LakeFormationClient { + let configuration = try await resolve(plugins: self.plugins) + return LakeFormationClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension LakeFormationClient.LakeFormationClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct LakeFormationClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSLambda/LambdaClient.swift b/Sources/Services/AWSLambda/LambdaClient.swift index 95924af9c99..3052d7bc098 100644 --- a/Sources/Services/AWSLambda/LambdaClient.swift +++ b/Sources/Services/AWSLambda/LambdaClient.swift @@ -51,6 +51,35 @@ extension LambdaClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> LambdaClient.LambdaClientConfiguration { + let clientConfiguration = try await LambdaClient.LambdaClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> LambdaClient { + let configuration = try await resolve(plugins: self.plugins) + return LambdaClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension LambdaClient.LambdaClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct LambdaClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSLaunchWizard/LaunchWizardClient.swift b/Sources/Services/AWSLaunchWizard/LaunchWizardClient.swift index b01cb5867dc..1f930cc6085 100644 --- a/Sources/Services/AWSLaunchWizard/LaunchWizardClient.swift +++ b/Sources/Services/AWSLaunchWizard/LaunchWizardClient.swift @@ -51,6 +51,35 @@ extension LaunchWizardClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> LaunchWizardClient.LaunchWizardClientConfiguration { + let clientConfiguration = try await LaunchWizardClient.LaunchWizardClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> LaunchWizardClient { + let configuration = try await resolve(plugins: self.plugins) + return LaunchWizardClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension LaunchWizardClient.LaunchWizardClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct LaunchWizardClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSLexModelBuildingService/LexModelBuildingClient.swift b/Sources/Services/AWSLexModelBuildingService/LexModelBuildingClient.swift index 2f9cae706ef..b108ead96dd 100644 --- a/Sources/Services/AWSLexModelBuildingService/LexModelBuildingClient.swift +++ b/Sources/Services/AWSLexModelBuildingService/LexModelBuildingClient.swift @@ -51,6 +51,35 @@ extension LexModelBuildingClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> LexModelBuildingClient.LexModelBuildingClientConfiguration { + let clientConfiguration = try await LexModelBuildingClient.LexModelBuildingClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> LexModelBuildingClient { + let configuration = try await resolve(plugins: self.plugins) + return LexModelBuildingClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension LexModelBuildingClient.LexModelBuildingClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct LexModelBuildingClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSLexModelsV2/LexModelsV2Client.swift b/Sources/Services/AWSLexModelsV2/LexModelsV2Client.swift index 11351be1fd8..d60bdabf914 100644 --- a/Sources/Services/AWSLexModelsV2/LexModelsV2Client.swift +++ b/Sources/Services/AWSLexModelsV2/LexModelsV2Client.swift @@ -51,6 +51,35 @@ extension LexModelsV2Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> LexModelsV2Client.LexModelsV2ClientConfiguration { + let clientConfiguration = try await LexModelsV2Client.LexModelsV2ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> LexModelsV2Client { + let configuration = try await resolve(plugins: self.plugins) + return LexModelsV2Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension LexModelsV2Client.LexModelsV2ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct LexModelsV2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSLexRuntimeService/LexRuntimeClient.swift b/Sources/Services/AWSLexRuntimeService/LexRuntimeClient.swift index daf285dea42..67ab5a23353 100644 --- a/Sources/Services/AWSLexRuntimeService/LexRuntimeClient.swift +++ b/Sources/Services/AWSLexRuntimeService/LexRuntimeClient.swift @@ -51,6 +51,35 @@ extension LexRuntimeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> LexRuntimeClient.LexRuntimeClientConfiguration { + let clientConfiguration = try await LexRuntimeClient.LexRuntimeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> LexRuntimeClient { + let configuration = try await resolve(plugins: self.plugins) + return LexRuntimeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension LexRuntimeClient.LexRuntimeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct LexRuntimeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSLexRuntimeV2/LexRuntimeV2Client.swift b/Sources/Services/AWSLexRuntimeV2/LexRuntimeV2Client.swift index a3d5859ac09..d724a3bf274 100644 --- a/Sources/Services/AWSLexRuntimeV2/LexRuntimeV2Client.swift +++ b/Sources/Services/AWSLexRuntimeV2/LexRuntimeV2Client.swift @@ -51,6 +51,35 @@ extension LexRuntimeV2Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> LexRuntimeV2Client.LexRuntimeV2ClientConfiguration { + let clientConfiguration = try await LexRuntimeV2Client.LexRuntimeV2ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> LexRuntimeV2Client { + let configuration = try await resolve(plugins: self.plugins) + return LexRuntimeV2Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension LexRuntimeV2Client.LexRuntimeV2ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct LexRuntimeV2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSLicenseManager/LicenseManagerClient.swift b/Sources/Services/AWSLicenseManager/LicenseManagerClient.swift index 41ac3d675d1..a2e5751b12c 100644 --- a/Sources/Services/AWSLicenseManager/LicenseManagerClient.swift +++ b/Sources/Services/AWSLicenseManager/LicenseManagerClient.swift @@ -51,6 +51,35 @@ extension LicenseManagerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> LicenseManagerClient.LicenseManagerClientConfiguration { + let clientConfiguration = try await LicenseManagerClient.LicenseManagerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> LicenseManagerClient { + let configuration = try await resolve(plugins: self.plugins) + return LicenseManagerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension LicenseManagerClient.LicenseManagerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct LicenseManagerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSLicenseManagerLinuxSubscriptions/LicenseManagerLinuxSubscriptionsClient.swift b/Sources/Services/AWSLicenseManagerLinuxSubscriptions/LicenseManagerLinuxSubscriptionsClient.swift index d58f62488c5..f262dac3e28 100644 --- a/Sources/Services/AWSLicenseManagerLinuxSubscriptions/LicenseManagerLinuxSubscriptionsClient.swift +++ b/Sources/Services/AWSLicenseManagerLinuxSubscriptions/LicenseManagerLinuxSubscriptionsClient.swift @@ -51,6 +51,35 @@ extension LicenseManagerLinuxSubscriptionsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> LicenseManagerLinuxSubscriptionsClient.LicenseManagerLinuxSubscriptionsClientConfiguration { + let clientConfiguration = try await LicenseManagerLinuxSubscriptionsClient.LicenseManagerLinuxSubscriptionsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> LicenseManagerLinuxSubscriptionsClient { + let configuration = try await resolve(plugins: self.plugins) + return LicenseManagerLinuxSubscriptionsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension LicenseManagerLinuxSubscriptionsClient.LicenseManagerLinuxSubscriptionsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct LicenseManagerLinuxSubscriptionsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSLicenseManagerUserSubscriptions/LicenseManagerUserSubscriptionsClient.swift b/Sources/Services/AWSLicenseManagerUserSubscriptions/LicenseManagerUserSubscriptionsClient.swift index 7bbdbbd9d57..aeaf2039b88 100644 --- a/Sources/Services/AWSLicenseManagerUserSubscriptions/LicenseManagerUserSubscriptionsClient.swift +++ b/Sources/Services/AWSLicenseManagerUserSubscriptions/LicenseManagerUserSubscriptionsClient.swift @@ -51,6 +51,35 @@ extension LicenseManagerUserSubscriptionsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> LicenseManagerUserSubscriptionsClient.LicenseManagerUserSubscriptionsClientConfiguration { + let clientConfiguration = try await LicenseManagerUserSubscriptionsClient.LicenseManagerUserSubscriptionsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> LicenseManagerUserSubscriptionsClient { + let configuration = try await resolve(plugins: self.plugins) + return LicenseManagerUserSubscriptionsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension LicenseManagerUserSubscriptionsClient.LicenseManagerUserSubscriptionsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct LicenseManagerUserSubscriptionsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSLightsail/LightsailClient.swift b/Sources/Services/AWSLightsail/LightsailClient.swift index 97f087d1302..fd9f68562cc 100644 --- a/Sources/Services/AWSLightsail/LightsailClient.swift +++ b/Sources/Services/AWSLightsail/LightsailClient.swift @@ -51,6 +51,35 @@ extension LightsailClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> LightsailClient.LightsailClientConfiguration { + let clientConfiguration = try await LightsailClient.LightsailClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> LightsailClient { + let configuration = try await resolve(plugins: self.plugins) + return LightsailClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension LightsailClient.LightsailClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct LightsailClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSLocation/LocationClient.swift b/Sources/Services/AWSLocation/LocationClient.swift index f2da5314113..0621b76ebde 100644 --- a/Sources/Services/AWSLocation/LocationClient.swift +++ b/Sources/Services/AWSLocation/LocationClient.swift @@ -51,6 +51,35 @@ extension LocationClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> LocationClient.LocationClientConfiguration { + let clientConfiguration = try await LocationClient.LocationClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> LocationClient { + let configuration = try await resolve(plugins: self.plugins) + return LocationClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension LocationClient.LocationClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct LocationClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSLookoutEquipment/LookoutEquipmentClient.swift b/Sources/Services/AWSLookoutEquipment/LookoutEquipmentClient.swift index 3d89219f4d8..9e19cba8b86 100644 --- a/Sources/Services/AWSLookoutEquipment/LookoutEquipmentClient.swift +++ b/Sources/Services/AWSLookoutEquipment/LookoutEquipmentClient.swift @@ -51,6 +51,35 @@ extension LookoutEquipmentClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> LookoutEquipmentClient.LookoutEquipmentClientConfiguration { + let clientConfiguration = try await LookoutEquipmentClient.LookoutEquipmentClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> LookoutEquipmentClient { + let configuration = try await resolve(plugins: self.plugins) + return LookoutEquipmentClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension LookoutEquipmentClient.LookoutEquipmentClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct LookoutEquipmentClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSLookoutMetrics/LookoutMetricsClient.swift b/Sources/Services/AWSLookoutMetrics/LookoutMetricsClient.swift index fbe85d6c7c0..c9ffa78703b 100644 --- a/Sources/Services/AWSLookoutMetrics/LookoutMetricsClient.swift +++ b/Sources/Services/AWSLookoutMetrics/LookoutMetricsClient.swift @@ -51,6 +51,35 @@ extension LookoutMetricsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> LookoutMetricsClient.LookoutMetricsClientConfiguration { + let clientConfiguration = try await LookoutMetricsClient.LookoutMetricsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> LookoutMetricsClient { + let configuration = try await resolve(plugins: self.plugins) + return LookoutMetricsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension LookoutMetricsClient.LookoutMetricsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct LookoutMetricsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSLookoutVision/LookoutVisionClient.swift b/Sources/Services/AWSLookoutVision/LookoutVisionClient.swift index d000dc0ae00..0ab6d42210f 100644 --- a/Sources/Services/AWSLookoutVision/LookoutVisionClient.swift +++ b/Sources/Services/AWSLookoutVision/LookoutVisionClient.swift @@ -51,6 +51,35 @@ extension LookoutVisionClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> LookoutVisionClient.LookoutVisionClientConfiguration { + let clientConfiguration = try await LookoutVisionClient.LookoutVisionClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> LookoutVisionClient { + let configuration = try await resolve(plugins: self.plugins) + return LookoutVisionClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension LookoutVisionClient.LookoutVisionClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct LookoutVisionClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSM2/M2Client.swift b/Sources/Services/AWSM2/M2Client.swift index a786127faa0..76aa7be0649 100644 --- a/Sources/Services/AWSM2/M2Client.swift +++ b/Sources/Services/AWSM2/M2Client.swift @@ -51,6 +51,35 @@ extension M2Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> M2Client.M2ClientConfiguration { + let clientConfiguration = try await M2Client.M2ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> M2Client { + let configuration = try await resolve(plugins: self.plugins) + return M2Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension M2Client.M2ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct M2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMTurk/MTurkClient.swift b/Sources/Services/AWSMTurk/MTurkClient.swift index f481d4f29ed..0efaeafcf3c 100644 --- a/Sources/Services/AWSMTurk/MTurkClient.swift +++ b/Sources/Services/AWSMTurk/MTurkClient.swift @@ -51,6 +51,35 @@ extension MTurkClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MTurkClient.MTurkClientConfiguration { + let clientConfiguration = try await MTurkClient.MTurkClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MTurkClient { + let configuration = try await resolve(plugins: self.plugins) + return MTurkClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MTurkClient.MTurkClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MTurkClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMWAA/MWAAClient.swift b/Sources/Services/AWSMWAA/MWAAClient.swift index 7e5906dcac7..b5ba43c662e 100644 --- a/Sources/Services/AWSMWAA/MWAAClient.swift +++ b/Sources/Services/AWSMWAA/MWAAClient.swift @@ -51,6 +51,35 @@ extension MWAAClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MWAAClient.MWAAClientConfiguration { + let clientConfiguration = try await MWAAClient.MWAAClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MWAAClient { + let configuration = try await resolve(plugins: self.plugins) + return MWAAClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MWAAClient.MWAAClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MWAAClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMachineLearning/MachineLearningClient.swift b/Sources/Services/AWSMachineLearning/MachineLearningClient.swift index b427d0e07b1..87a9e7bba8c 100644 --- a/Sources/Services/AWSMachineLearning/MachineLearningClient.swift +++ b/Sources/Services/AWSMachineLearning/MachineLearningClient.swift @@ -51,6 +51,35 @@ extension MachineLearningClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MachineLearningClient.MachineLearningClientConfiguration { + let clientConfiguration = try await MachineLearningClient.MachineLearningClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MachineLearningClient { + let configuration = try await resolve(plugins: self.plugins) + return MachineLearningClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MachineLearningClient.MachineLearningClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MachineLearningClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMacie2/Macie2Client.swift b/Sources/Services/AWSMacie2/Macie2Client.swift index c6817852c41..5947432f17e 100644 --- a/Sources/Services/AWSMacie2/Macie2Client.swift +++ b/Sources/Services/AWSMacie2/Macie2Client.swift @@ -51,6 +51,35 @@ extension Macie2Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> Macie2Client.Macie2ClientConfiguration { + let clientConfiguration = try await Macie2Client.Macie2ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> Macie2Client { + let configuration = try await resolve(plugins: self.plugins) + return Macie2Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension Macie2Client.Macie2ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct Macie2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSManagedBlockchain/ManagedBlockchainClient.swift b/Sources/Services/AWSManagedBlockchain/ManagedBlockchainClient.swift index 87b9319b022..2e5a931e6a2 100644 --- a/Sources/Services/AWSManagedBlockchain/ManagedBlockchainClient.swift +++ b/Sources/Services/AWSManagedBlockchain/ManagedBlockchainClient.swift @@ -51,6 +51,35 @@ extension ManagedBlockchainClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ManagedBlockchainClient.ManagedBlockchainClientConfiguration { + let clientConfiguration = try await ManagedBlockchainClient.ManagedBlockchainClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ManagedBlockchainClient { + let configuration = try await resolve(plugins: self.plugins) + return ManagedBlockchainClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ManagedBlockchainClient.ManagedBlockchainClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ManagedBlockchainClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSManagedBlockchainQuery/ManagedBlockchainQueryClient.swift b/Sources/Services/AWSManagedBlockchainQuery/ManagedBlockchainQueryClient.swift index 07ac8acf614..89caa6c2186 100644 --- a/Sources/Services/AWSManagedBlockchainQuery/ManagedBlockchainQueryClient.swift +++ b/Sources/Services/AWSManagedBlockchainQuery/ManagedBlockchainQueryClient.swift @@ -51,6 +51,35 @@ extension ManagedBlockchainQueryClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ManagedBlockchainQueryClient.ManagedBlockchainQueryClientConfiguration { + let clientConfiguration = try await ManagedBlockchainQueryClient.ManagedBlockchainQueryClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ManagedBlockchainQueryClient { + let configuration = try await resolve(plugins: self.plugins) + return ManagedBlockchainQueryClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ManagedBlockchainQueryClient.ManagedBlockchainQueryClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ManagedBlockchainQueryClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMarketplaceAgreement/MarketplaceAgreementClient.swift b/Sources/Services/AWSMarketplaceAgreement/MarketplaceAgreementClient.swift index 129aa72172f..a93e7998bd3 100644 --- a/Sources/Services/AWSMarketplaceAgreement/MarketplaceAgreementClient.swift +++ b/Sources/Services/AWSMarketplaceAgreement/MarketplaceAgreementClient.swift @@ -51,6 +51,35 @@ extension MarketplaceAgreementClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MarketplaceAgreementClient.MarketplaceAgreementClientConfiguration { + let clientConfiguration = try await MarketplaceAgreementClient.MarketplaceAgreementClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MarketplaceAgreementClient { + let configuration = try await resolve(plugins: self.plugins) + return MarketplaceAgreementClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MarketplaceAgreementClient.MarketplaceAgreementClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MarketplaceAgreementClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMarketplaceCatalog/MarketplaceCatalogClient.swift b/Sources/Services/AWSMarketplaceCatalog/MarketplaceCatalogClient.swift index ac72e65aff0..478060cdb13 100644 --- a/Sources/Services/AWSMarketplaceCatalog/MarketplaceCatalogClient.swift +++ b/Sources/Services/AWSMarketplaceCatalog/MarketplaceCatalogClient.swift @@ -51,6 +51,35 @@ extension MarketplaceCatalogClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MarketplaceCatalogClient.MarketplaceCatalogClientConfiguration { + let clientConfiguration = try await MarketplaceCatalogClient.MarketplaceCatalogClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MarketplaceCatalogClient { + let configuration = try await resolve(plugins: self.plugins) + return MarketplaceCatalogClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MarketplaceCatalogClient.MarketplaceCatalogClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MarketplaceCatalogClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMarketplaceCommerceAnalytics/MarketplaceCommerceAnalyticsClient.swift b/Sources/Services/AWSMarketplaceCommerceAnalytics/MarketplaceCommerceAnalyticsClient.swift index 5629f4a2e2d..5ad0e128624 100644 --- a/Sources/Services/AWSMarketplaceCommerceAnalytics/MarketplaceCommerceAnalyticsClient.swift +++ b/Sources/Services/AWSMarketplaceCommerceAnalytics/MarketplaceCommerceAnalyticsClient.swift @@ -51,6 +51,35 @@ extension MarketplaceCommerceAnalyticsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MarketplaceCommerceAnalyticsClient.MarketplaceCommerceAnalyticsClientConfiguration { + let clientConfiguration = try await MarketplaceCommerceAnalyticsClient.MarketplaceCommerceAnalyticsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MarketplaceCommerceAnalyticsClient { + let configuration = try await resolve(plugins: self.plugins) + return MarketplaceCommerceAnalyticsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MarketplaceCommerceAnalyticsClient.MarketplaceCommerceAnalyticsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MarketplaceCommerceAnalyticsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMarketplaceDeployment/MarketplaceDeploymentClient.swift b/Sources/Services/AWSMarketplaceDeployment/MarketplaceDeploymentClient.swift index 7d1102632a1..134c0f5f96e 100644 --- a/Sources/Services/AWSMarketplaceDeployment/MarketplaceDeploymentClient.swift +++ b/Sources/Services/AWSMarketplaceDeployment/MarketplaceDeploymentClient.swift @@ -51,6 +51,35 @@ extension MarketplaceDeploymentClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MarketplaceDeploymentClient.MarketplaceDeploymentClientConfiguration { + let clientConfiguration = try await MarketplaceDeploymentClient.MarketplaceDeploymentClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MarketplaceDeploymentClient { + let configuration = try await resolve(plugins: self.plugins) + return MarketplaceDeploymentClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MarketplaceDeploymentClient.MarketplaceDeploymentClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MarketplaceDeploymentClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMarketplaceEntitlementService/MarketplaceEntitlementClient.swift b/Sources/Services/AWSMarketplaceEntitlementService/MarketplaceEntitlementClient.swift index e893f78a31a..4cb91d80b06 100644 --- a/Sources/Services/AWSMarketplaceEntitlementService/MarketplaceEntitlementClient.swift +++ b/Sources/Services/AWSMarketplaceEntitlementService/MarketplaceEntitlementClient.swift @@ -51,6 +51,35 @@ extension MarketplaceEntitlementClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MarketplaceEntitlementClient.MarketplaceEntitlementClientConfiguration { + let clientConfiguration = try await MarketplaceEntitlementClient.MarketplaceEntitlementClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MarketplaceEntitlementClient { + let configuration = try await resolve(plugins: self.plugins) + return MarketplaceEntitlementClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MarketplaceEntitlementClient.MarketplaceEntitlementClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MarketplaceEntitlementClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMarketplaceMetering/MarketplaceMeteringClient.swift b/Sources/Services/AWSMarketplaceMetering/MarketplaceMeteringClient.swift index a7955a05f33..fb23b65ff24 100644 --- a/Sources/Services/AWSMarketplaceMetering/MarketplaceMeteringClient.swift +++ b/Sources/Services/AWSMarketplaceMetering/MarketplaceMeteringClient.swift @@ -51,6 +51,35 @@ extension MarketplaceMeteringClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MarketplaceMeteringClient.MarketplaceMeteringClientConfiguration { + let clientConfiguration = try await MarketplaceMeteringClient.MarketplaceMeteringClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MarketplaceMeteringClient { + let configuration = try await resolve(plugins: self.plugins) + return MarketplaceMeteringClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MarketplaceMeteringClient.MarketplaceMeteringClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MarketplaceMeteringClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMediaConnect/MediaConnectClient.swift b/Sources/Services/AWSMediaConnect/MediaConnectClient.swift index f966d5e27d8..797e4595083 100644 --- a/Sources/Services/AWSMediaConnect/MediaConnectClient.swift +++ b/Sources/Services/AWSMediaConnect/MediaConnectClient.swift @@ -51,6 +51,35 @@ extension MediaConnectClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MediaConnectClient.MediaConnectClientConfiguration { + let clientConfiguration = try await MediaConnectClient.MediaConnectClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MediaConnectClient { + let configuration = try await resolve(plugins: self.plugins) + return MediaConnectClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MediaConnectClient.MediaConnectClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MediaConnectClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMediaConvert/MediaConvertClient.swift b/Sources/Services/AWSMediaConvert/MediaConvertClient.swift index 7bad32f9d8f..988ffe931fa 100644 --- a/Sources/Services/AWSMediaConvert/MediaConvertClient.swift +++ b/Sources/Services/AWSMediaConvert/MediaConvertClient.swift @@ -51,6 +51,35 @@ extension MediaConvertClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MediaConvertClient.MediaConvertClientConfiguration { + let clientConfiguration = try await MediaConvertClient.MediaConvertClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MediaConvertClient { + let configuration = try await resolve(plugins: self.plugins) + return MediaConvertClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MediaConvertClient.MediaConvertClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MediaConvertClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMediaLive/MediaLiveClient.swift b/Sources/Services/AWSMediaLive/MediaLiveClient.swift index 75f7c4f1861..5012dcf31e6 100644 --- a/Sources/Services/AWSMediaLive/MediaLiveClient.swift +++ b/Sources/Services/AWSMediaLive/MediaLiveClient.swift @@ -51,6 +51,35 @@ extension MediaLiveClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MediaLiveClient.MediaLiveClientConfiguration { + let clientConfiguration = try await MediaLiveClient.MediaLiveClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MediaLiveClient { + let configuration = try await resolve(plugins: self.plugins) + return MediaLiveClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MediaLiveClient.MediaLiveClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MediaLiveClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMediaPackage/MediaPackageClient.swift b/Sources/Services/AWSMediaPackage/MediaPackageClient.swift index bc63aed2e4e..7baaf578389 100644 --- a/Sources/Services/AWSMediaPackage/MediaPackageClient.swift +++ b/Sources/Services/AWSMediaPackage/MediaPackageClient.swift @@ -51,6 +51,35 @@ extension MediaPackageClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MediaPackageClient.MediaPackageClientConfiguration { + let clientConfiguration = try await MediaPackageClient.MediaPackageClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MediaPackageClient { + let configuration = try await resolve(plugins: self.plugins) + return MediaPackageClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MediaPackageClient.MediaPackageClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MediaPackageClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMediaPackageV2/MediaPackageV2Client.swift b/Sources/Services/AWSMediaPackageV2/MediaPackageV2Client.swift index 788703d338f..e88a49071d2 100644 --- a/Sources/Services/AWSMediaPackageV2/MediaPackageV2Client.swift +++ b/Sources/Services/AWSMediaPackageV2/MediaPackageV2Client.swift @@ -51,6 +51,35 @@ extension MediaPackageV2Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MediaPackageV2Client.MediaPackageV2ClientConfiguration { + let clientConfiguration = try await MediaPackageV2Client.MediaPackageV2ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MediaPackageV2Client { + let configuration = try await resolve(plugins: self.plugins) + return MediaPackageV2Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MediaPackageV2Client.MediaPackageV2ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MediaPackageV2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMediaPackageVod/MediaPackageVodClient.swift b/Sources/Services/AWSMediaPackageVod/MediaPackageVodClient.swift index 4c849fb6db6..99500647696 100644 --- a/Sources/Services/AWSMediaPackageVod/MediaPackageVodClient.swift +++ b/Sources/Services/AWSMediaPackageVod/MediaPackageVodClient.swift @@ -51,6 +51,35 @@ extension MediaPackageVodClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MediaPackageVodClient.MediaPackageVodClientConfiguration { + let clientConfiguration = try await MediaPackageVodClient.MediaPackageVodClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MediaPackageVodClient { + let configuration = try await resolve(plugins: self.plugins) + return MediaPackageVodClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MediaPackageVodClient.MediaPackageVodClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MediaPackageVodClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMediaStore/MediaStoreClient.swift b/Sources/Services/AWSMediaStore/MediaStoreClient.swift index 4c5b3efbc81..3bd8161bcfa 100644 --- a/Sources/Services/AWSMediaStore/MediaStoreClient.swift +++ b/Sources/Services/AWSMediaStore/MediaStoreClient.swift @@ -51,6 +51,35 @@ extension MediaStoreClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MediaStoreClient.MediaStoreClientConfiguration { + let clientConfiguration = try await MediaStoreClient.MediaStoreClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MediaStoreClient { + let configuration = try await resolve(plugins: self.plugins) + return MediaStoreClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MediaStoreClient.MediaStoreClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MediaStoreClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMediaStoreData/MediaStoreDataClient.swift b/Sources/Services/AWSMediaStoreData/MediaStoreDataClient.swift index 2ec207478d2..c5a6ce6b9d1 100644 --- a/Sources/Services/AWSMediaStoreData/MediaStoreDataClient.swift +++ b/Sources/Services/AWSMediaStoreData/MediaStoreDataClient.swift @@ -51,6 +51,35 @@ extension MediaStoreDataClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MediaStoreDataClient.MediaStoreDataClientConfiguration { + let clientConfiguration = try await MediaStoreDataClient.MediaStoreDataClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MediaStoreDataClient { + let configuration = try await resolve(plugins: self.plugins) + return MediaStoreDataClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MediaStoreDataClient.MediaStoreDataClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MediaStoreDataClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMediaTailor/MediaTailorClient.swift b/Sources/Services/AWSMediaTailor/MediaTailorClient.swift index 2bc76994e52..a4ce15f8c29 100644 --- a/Sources/Services/AWSMediaTailor/MediaTailorClient.swift +++ b/Sources/Services/AWSMediaTailor/MediaTailorClient.swift @@ -51,6 +51,35 @@ extension MediaTailorClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MediaTailorClient.MediaTailorClientConfiguration { + let clientConfiguration = try await MediaTailorClient.MediaTailorClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MediaTailorClient { + let configuration = try await resolve(plugins: self.plugins) + return MediaTailorClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MediaTailorClient.MediaTailorClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MediaTailorClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMedicalImaging/MedicalImagingClient.swift b/Sources/Services/AWSMedicalImaging/MedicalImagingClient.swift index e794ae60727..39dbf079d2b 100644 --- a/Sources/Services/AWSMedicalImaging/MedicalImagingClient.swift +++ b/Sources/Services/AWSMedicalImaging/MedicalImagingClient.swift @@ -51,6 +51,35 @@ extension MedicalImagingClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MedicalImagingClient.MedicalImagingClientConfiguration { + let clientConfiguration = try await MedicalImagingClient.MedicalImagingClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MedicalImagingClient { + let configuration = try await resolve(plugins: self.plugins) + return MedicalImagingClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MedicalImagingClient.MedicalImagingClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MedicalImagingClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMemoryDB/MemoryDBClient.swift b/Sources/Services/AWSMemoryDB/MemoryDBClient.swift index e46a5f754ae..45ef62c7ee5 100644 --- a/Sources/Services/AWSMemoryDB/MemoryDBClient.swift +++ b/Sources/Services/AWSMemoryDB/MemoryDBClient.swift @@ -51,6 +51,35 @@ extension MemoryDBClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MemoryDBClient.MemoryDBClientConfiguration { + let clientConfiguration = try await MemoryDBClient.MemoryDBClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MemoryDBClient { + let configuration = try await resolve(plugins: self.plugins) + return MemoryDBClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MemoryDBClient.MemoryDBClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MemoryDBClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMgn/MgnClient.swift b/Sources/Services/AWSMgn/MgnClient.swift index b655d9428fd..b7b701580cf 100644 --- a/Sources/Services/AWSMgn/MgnClient.swift +++ b/Sources/Services/AWSMgn/MgnClient.swift @@ -51,6 +51,35 @@ extension MgnClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MgnClient.MgnClientConfiguration { + let clientConfiguration = try await MgnClient.MgnClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MgnClient { + let configuration = try await resolve(plugins: self.plugins) + return MgnClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MgnClient.MgnClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MgnClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMigrationHub/MigrationHubClient.swift b/Sources/Services/AWSMigrationHub/MigrationHubClient.swift index 0b600487f7f..ac167172d3b 100644 --- a/Sources/Services/AWSMigrationHub/MigrationHubClient.swift +++ b/Sources/Services/AWSMigrationHub/MigrationHubClient.swift @@ -51,6 +51,35 @@ extension MigrationHubClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MigrationHubClient.MigrationHubClientConfiguration { + let clientConfiguration = try await MigrationHubClient.MigrationHubClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MigrationHubClient { + let configuration = try await resolve(plugins: self.plugins) + return MigrationHubClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MigrationHubClient.MigrationHubClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MigrationHubClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMigrationHubConfig/MigrationHubConfigClient.swift b/Sources/Services/AWSMigrationHubConfig/MigrationHubConfigClient.swift index c80d897c177..83130cc17bf 100644 --- a/Sources/Services/AWSMigrationHubConfig/MigrationHubConfigClient.swift +++ b/Sources/Services/AWSMigrationHubConfig/MigrationHubConfigClient.swift @@ -51,6 +51,35 @@ extension MigrationHubConfigClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MigrationHubConfigClient.MigrationHubConfigClientConfiguration { + let clientConfiguration = try await MigrationHubConfigClient.MigrationHubConfigClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MigrationHubConfigClient { + let configuration = try await resolve(plugins: self.plugins) + return MigrationHubConfigClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MigrationHubConfigClient.MigrationHubConfigClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MigrationHubConfigClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMigrationHubOrchestrator/MigrationHubOrchestratorClient.swift b/Sources/Services/AWSMigrationHubOrchestrator/MigrationHubOrchestratorClient.swift index 643a279ebed..e9ff40d8247 100644 --- a/Sources/Services/AWSMigrationHubOrchestrator/MigrationHubOrchestratorClient.swift +++ b/Sources/Services/AWSMigrationHubOrchestrator/MigrationHubOrchestratorClient.swift @@ -51,6 +51,35 @@ extension MigrationHubOrchestratorClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MigrationHubOrchestratorClient.MigrationHubOrchestratorClientConfiguration { + let clientConfiguration = try await MigrationHubOrchestratorClient.MigrationHubOrchestratorClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MigrationHubOrchestratorClient { + let configuration = try await resolve(plugins: self.plugins) + return MigrationHubOrchestratorClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MigrationHubOrchestratorClient.MigrationHubOrchestratorClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MigrationHubOrchestratorClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMigrationHubRefactorSpaces/MigrationHubRefactorSpacesClient.swift b/Sources/Services/AWSMigrationHubRefactorSpaces/MigrationHubRefactorSpacesClient.swift index bbd8f88e285..fb43cbd0b5a 100644 --- a/Sources/Services/AWSMigrationHubRefactorSpaces/MigrationHubRefactorSpacesClient.swift +++ b/Sources/Services/AWSMigrationHubRefactorSpaces/MigrationHubRefactorSpacesClient.swift @@ -51,6 +51,35 @@ extension MigrationHubRefactorSpacesClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MigrationHubRefactorSpacesClient.MigrationHubRefactorSpacesClientConfiguration { + let clientConfiguration = try await MigrationHubRefactorSpacesClient.MigrationHubRefactorSpacesClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MigrationHubRefactorSpacesClient { + let configuration = try await resolve(plugins: self.plugins) + return MigrationHubRefactorSpacesClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MigrationHubRefactorSpacesClient.MigrationHubRefactorSpacesClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MigrationHubRefactorSpacesClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMigrationHubStrategy/MigrationHubStrategyClient.swift b/Sources/Services/AWSMigrationHubStrategy/MigrationHubStrategyClient.swift index 7d079f41035..04b307d3de2 100644 --- a/Sources/Services/AWSMigrationHubStrategy/MigrationHubStrategyClient.swift +++ b/Sources/Services/AWSMigrationHubStrategy/MigrationHubStrategyClient.swift @@ -51,6 +51,35 @@ extension MigrationHubStrategyClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MigrationHubStrategyClient.MigrationHubStrategyClientConfiguration { + let clientConfiguration = try await MigrationHubStrategyClient.MigrationHubStrategyClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MigrationHubStrategyClient { + let configuration = try await resolve(plugins: self.plugins) + return MigrationHubStrategyClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MigrationHubStrategyClient.MigrationHubStrategyClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MigrationHubStrategyClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMobile/MobileClient.swift b/Sources/Services/AWSMobile/MobileClient.swift index 5867d88ba73..9dfb6188fd3 100644 --- a/Sources/Services/AWSMobile/MobileClient.swift +++ b/Sources/Services/AWSMobile/MobileClient.swift @@ -51,6 +51,35 @@ extension MobileClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MobileClient.MobileClientConfiguration { + let clientConfiguration = try await MobileClient.MobileClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MobileClient { + let configuration = try await resolve(plugins: self.plugins) + return MobileClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MobileClient.MobileClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MobileClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSMq/MqClient.swift b/Sources/Services/AWSMq/MqClient.swift index 45df88f3534..a46010072a5 100644 --- a/Sources/Services/AWSMq/MqClient.swift +++ b/Sources/Services/AWSMq/MqClient.swift @@ -51,6 +51,35 @@ extension MqClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> MqClient.MqClientConfiguration { + let clientConfiguration = try await MqClient.MqClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> MqClient { + let configuration = try await resolve(plugins: self.plugins) + return MqClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension MqClient.MqClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct MqClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSNeptune/NeptuneClient.swift b/Sources/Services/AWSNeptune/NeptuneClient.swift index d713faece62..4b3484741e2 100644 --- a/Sources/Services/AWSNeptune/NeptuneClient.swift +++ b/Sources/Services/AWSNeptune/NeptuneClient.swift @@ -47,6 +47,35 @@ extension NeptuneClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> NeptuneClient.NeptuneClientConfiguration { + let clientConfiguration = try await NeptuneClient.NeptuneClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> NeptuneClient { + let configuration = try await resolve(plugins: self.plugins) + return NeptuneClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension NeptuneClient.NeptuneClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct NeptuneClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSNeptuneGraph/NeptuneGraphClient.swift b/Sources/Services/AWSNeptuneGraph/NeptuneGraphClient.swift index c1249e10ee4..c7799c57c7c 100644 --- a/Sources/Services/AWSNeptuneGraph/NeptuneGraphClient.swift +++ b/Sources/Services/AWSNeptuneGraph/NeptuneGraphClient.swift @@ -51,6 +51,35 @@ extension NeptuneGraphClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> NeptuneGraphClient.NeptuneGraphClientConfiguration { + let clientConfiguration = try await NeptuneGraphClient.NeptuneGraphClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> NeptuneGraphClient { + let configuration = try await resolve(plugins: self.plugins) + return NeptuneGraphClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension NeptuneGraphClient.NeptuneGraphClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct NeptuneGraphClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSNeptunedata/NeptunedataClient.swift b/Sources/Services/AWSNeptunedata/NeptunedataClient.swift index 0b988284515..a29bb4bda05 100644 --- a/Sources/Services/AWSNeptunedata/NeptunedataClient.swift +++ b/Sources/Services/AWSNeptunedata/NeptunedataClient.swift @@ -51,6 +51,35 @@ extension NeptunedataClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> NeptunedataClient.NeptunedataClientConfiguration { + let clientConfiguration = try await NeptunedataClient.NeptunedataClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> NeptunedataClient { + let configuration = try await resolve(plugins: self.plugins) + return NeptunedataClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension NeptunedataClient.NeptunedataClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct NeptunedataClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSNetworkFirewall/NetworkFirewallClient.swift b/Sources/Services/AWSNetworkFirewall/NetworkFirewallClient.swift index 5301b25a307..b668d023f69 100644 --- a/Sources/Services/AWSNetworkFirewall/NetworkFirewallClient.swift +++ b/Sources/Services/AWSNetworkFirewall/NetworkFirewallClient.swift @@ -51,6 +51,35 @@ extension NetworkFirewallClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> NetworkFirewallClient.NetworkFirewallClientConfiguration { + let clientConfiguration = try await NetworkFirewallClient.NetworkFirewallClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> NetworkFirewallClient { + let configuration = try await resolve(plugins: self.plugins) + return NetworkFirewallClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension NetworkFirewallClient.NetworkFirewallClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct NetworkFirewallClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSNetworkManager/NetworkManagerClient.swift b/Sources/Services/AWSNetworkManager/NetworkManagerClient.swift index 40d660cdfea..e600a40dbd8 100644 --- a/Sources/Services/AWSNetworkManager/NetworkManagerClient.swift +++ b/Sources/Services/AWSNetworkManager/NetworkManagerClient.swift @@ -51,6 +51,35 @@ extension NetworkManagerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> NetworkManagerClient.NetworkManagerClientConfiguration { + let clientConfiguration = try await NetworkManagerClient.NetworkManagerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> NetworkManagerClient { + let configuration = try await resolve(plugins: self.plugins) + return NetworkManagerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension NetworkManagerClient.NetworkManagerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct NetworkManagerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSNimble/NimbleClient.swift b/Sources/Services/AWSNimble/NimbleClient.swift index c397154ffb6..6dbf48305f9 100644 --- a/Sources/Services/AWSNimble/NimbleClient.swift +++ b/Sources/Services/AWSNimble/NimbleClient.swift @@ -51,6 +51,35 @@ extension NimbleClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> NimbleClient.NimbleClientConfiguration { + let clientConfiguration = try await NimbleClient.NimbleClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> NimbleClient { + let configuration = try await resolve(plugins: self.plugins) + return NimbleClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension NimbleClient.NimbleClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct NimbleClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSOAM/OAMClient.swift b/Sources/Services/AWSOAM/OAMClient.swift index 904ec61eb82..5518c408f68 100644 --- a/Sources/Services/AWSOAM/OAMClient.swift +++ b/Sources/Services/AWSOAM/OAMClient.swift @@ -51,6 +51,35 @@ extension OAMClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> OAMClient.OAMClientConfiguration { + let clientConfiguration = try await OAMClient.OAMClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> OAMClient { + let configuration = try await resolve(plugins: self.plugins) + return OAMClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension OAMClient.OAMClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct OAMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSOSIS/OSISClient.swift b/Sources/Services/AWSOSIS/OSISClient.swift index c796fe5775f..e891ce3c0f4 100644 --- a/Sources/Services/AWSOSIS/OSISClient.swift +++ b/Sources/Services/AWSOSIS/OSISClient.swift @@ -51,6 +51,35 @@ extension OSISClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> OSISClient.OSISClientConfiguration { + let clientConfiguration = try await OSISClient.OSISClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> OSISClient { + let configuration = try await resolve(plugins: self.plugins) + return OSISClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension OSISClient.OSISClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct OSISClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSOmics/OmicsClient.swift b/Sources/Services/AWSOmics/OmicsClient.swift index 85de46db070..4cba3a212ef 100644 --- a/Sources/Services/AWSOmics/OmicsClient.swift +++ b/Sources/Services/AWSOmics/OmicsClient.swift @@ -51,6 +51,35 @@ extension OmicsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> OmicsClient.OmicsClientConfiguration { + let clientConfiguration = try await OmicsClient.OmicsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> OmicsClient { + let configuration = try await resolve(plugins: self.plugins) + return OmicsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension OmicsClient.OmicsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct OmicsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSOpenSearch/OpenSearchClient.swift b/Sources/Services/AWSOpenSearch/OpenSearchClient.swift index 7a574331f5f..fe51a6702f1 100644 --- a/Sources/Services/AWSOpenSearch/OpenSearchClient.swift +++ b/Sources/Services/AWSOpenSearch/OpenSearchClient.swift @@ -51,6 +51,35 @@ extension OpenSearchClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> OpenSearchClient.OpenSearchClientConfiguration { + let clientConfiguration = try await OpenSearchClient.OpenSearchClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> OpenSearchClient { + let configuration = try await resolve(plugins: self.plugins) + return OpenSearchClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension OpenSearchClient.OpenSearchClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct OpenSearchClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSOpenSearchServerless/OpenSearchServerlessClient.swift b/Sources/Services/AWSOpenSearchServerless/OpenSearchServerlessClient.swift index 4f87c37af15..21ec71c02f1 100644 --- a/Sources/Services/AWSOpenSearchServerless/OpenSearchServerlessClient.swift +++ b/Sources/Services/AWSOpenSearchServerless/OpenSearchServerlessClient.swift @@ -51,6 +51,35 @@ extension OpenSearchServerlessClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> OpenSearchServerlessClient.OpenSearchServerlessClientConfiguration { + let clientConfiguration = try await OpenSearchServerlessClient.OpenSearchServerlessClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> OpenSearchServerlessClient { + let configuration = try await resolve(plugins: self.plugins) + return OpenSearchServerlessClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension OpenSearchServerlessClient.OpenSearchServerlessClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct OpenSearchServerlessClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSOpsWorks/OpsWorksClient.swift b/Sources/Services/AWSOpsWorks/OpsWorksClient.swift index 5b97e683ca7..dc69161f3d6 100644 --- a/Sources/Services/AWSOpsWorks/OpsWorksClient.swift +++ b/Sources/Services/AWSOpsWorks/OpsWorksClient.swift @@ -51,6 +51,35 @@ extension OpsWorksClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> OpsWorksClient.OpsWorksClientConfiguration { + let clientConfiguration = try await OpsWorksClient.OpsWorksClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> OpsWorksClient { + let configuration = try await resolve(plugins: self.plugins) + return OpsWorksClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension OpsWorksClient.OpsWorksClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct OpsWorksClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSOpsWorksCM/OpsWorksCMClient.swift b/Sources/Services/AWSOpsWorksCM/OpsWorksCMClient.swift index 9ebd54e2621..ae3c9105bcc 100644 --- a/Sources/Services/AWSOpsWorksCM/OpsWorksCMClient.swift +++ b/Sources/Services/AWSOpsWorksCM/OpsWorksCMClient.swift @@ -51,6 +51,35 @@ extension OpsWorksCMClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> OpsWorksCMClient.OpsWorksCMClientConfiguration { + let clientConfiguration = try await OpsWorksCMClient.OpsWorksCMClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> OpsWorksCMClient { + let configuration = try await resolve(plugins: self.plugins) + return OpsWorksCMClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension OpsWorksCMClient.OpsWorksCMClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct OpsWorksCMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSOrganizations/OrganizationsClient.swift b/Sources/Services/AWSOrganizations/OrganizationsClient.swift index 24a58cd081f..2340506eafb 100644 --- a/Sources/Services/AWSOrganizations/OrganizationsClient.swift +++ b/Sources/Services/AWSOrganizations/OrganizationsClient.swift @@ -51,6 +51,35 @@ extension OrganizationsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> OrganizationsClient.OrganizationsClientConfiguration { + let clientConfiguration = try await OrganizationsClient.OrganizationsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> OrganizationsClient { + let configuration = try await resolve(plugins: self.plugins) + return OrganizationsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension OrganizationsClient.OrganizationsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct OrganizationsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSOutposts/OutpostsClient.swift b/Sources/Services/AWSOutposts/OutpostsClient.swift index 5b102d6a2d5..38e4721dc8d 100644 --- a/Sources/Services/AWSOutposts/OutpostsClient.swift +++ b/Sources/Services/AWSOutposts/OutpostsClient.swift @@ -51,6 +51,35 @@ extension OutpostsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> OutpostsClient.OutpostsClientConfiguration { + let clientConfiguration = try await OutpostsClient.OutpostsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> OutpostsClient { + let configuration = try await resolve(plugins: self.plugins) + return OutpostsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension OutpostsClient.OutpostsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct OutpostsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSPI/PIClient.swift b/Sources/Services/AWSPI/PIClient.swift index a93f8b79cd8..4ad99fbed8b 100644 --- a/Sources/Services/AWSPI/PIClient.swift +++ b/Sources/Services/AWSPI/PIClient.swift @@ -51,6 +51,35 @@ extension PIClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> PIClient.PIClientConfiguration { + let clientConfiguration = try await PIClient.PIClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> PIClient { + let configuration = try await resolve(plugins: self.plugins) + return PIClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension PIClient.PIClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct PIClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSPanorama/PanoramaClient.swift b/Sources/Services/AWSPanorama/PanoramaClient.swift index 775c30afbae..aabc95247e5 100644 --- a/Sources/Services/AWSPanorama/PanoramaClient.swift +++ b/Sources/Services/AWSPanorama/PanoramaClient.swift @@ -51,6 +51,35 @@ extension PanoramaClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> PanoramaClient.PanoramaClientConfiguration { + let clientConfiguration = try await PanoramaClient.PanoramaClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> PanoramaClient { + let configuration = try await resolve(plugins: self.plugins) + return PanoramaClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension PanoramaClient.PanoramaClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct PanoramaClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSPaymentCryptography/PaymentCryptographyClient.swift b/Sources/Services/AWSPaymentCryptography/PaymentCryptographyClient.swift index ebb25fb65cd..2235023c47e 100644 --- a/Sources/Services/AWSPaymentCryptography/PaymentCryptographyClient.swift +++ b/Sources/Services/AWSPaymentCryptography/PaymentCryptographyClient.swift @@ -51,6 +51,35 @@ extension PaymentCryptographyClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> PaymentCryptographyClient.PaymentCryptographyClientConfiguration { + let clientConfiguration = try await PaymentCryptographyClient.PaymentCryptographyClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> PaymentCryptographyClient { + let configuration = try await resolve(plugins: self.plugins) + return PaymentCryptographyClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension PaymentCryptographyClient.PaymentCryptographyClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct PaymentCryptographyClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSPaymentCryptographyData/PaymentCryptographyDataClient.swift b/Sources/Services/AWSPaymentCryptographyData/PaymentCryptographyDataClient.swift index f89b8bc3e5b..2aab572dc30 100644 --- a/Sources/Services/AWSPaymentCryptographyData/PaymentCryptographyDataClient.swift +++ b/Sources/Services/AWSPaymentCryptographyData/PaymentCryptographyDataClient.swift @@ -51,6 +51,35 @@ extension PaymentCryptographyDataClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> PaymentCryptographyDataClient.PaymentCryptographyDataClientConfiguration { + let clientConfiguration = try await PaymentCryptographyDataClient.PaymentCryptographyDataClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> PaymentCryptographyDataClient { + let configuration = try await resolve(plugins: self.plugins) + return PaymentCryptographyDataClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension PaymentCryptographyDataClient.PaymentCryptographyDataClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct PaymentCryptographyDataClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSPcaConnectorAd/PcaConnectorAdClient.swift b/Sources/Services/AWSPcaConnectorAd/PcaConnectorAdClient.swift index 540b8a90b4f..72f6f413e26 100644 --- a/Sources/Services/AWSPcaConnectorAd/PcaConnectorAdClient.swift +++ b/Sources/Services/AWSPcaConnectorAd/PcaConnectorAdClient.swift @@ -51,6 +51,35 @@ extension PcaConnectorAdClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> PcaConnectorAdClient.PcaConnectorAdClientConfiguration { + let clientConfiguration = try await PcaConnectorAdClient.PcaConnectorAdClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> PcaConnectorAdClient { + let configuration = try await resolve(plugins: self.plugins) + return PcaConnectorAdClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension PcaConnectorAdClient.PcaConnectorAdClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct PcaConnectorAdClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSPersonalize/PersonalizeClient.swift b/Sources/Services/AWSPersonalize/PersonalizeClient.swift index fdf089b00ba..3abdf461162 100644 --- a/Sources/Services/AWSPersonalize/PersonalizeClient.swift +++ b/Sources/Services/AWSPersonalize/PersonalizeClient.swift @@ -51,6 +51,35 @@ extension PersonalizeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> PersonalizeClient.PersonalizeClientConfiguration { + let clientConfiguration = try await PersonalizeClient.PersonalizeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> PersonalizeClient { + let configuration = try await resolve(plugins: self.plugins) + return PersonalizeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension PersonalizeClient.PersonalizeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct PersonalizeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSPersonalizeEvents/PersonalizeEventsClient.swift b/Sources/Services/AWSPersonalizeEvents/PersonalizeEventsClient.swift index 5c3ecb268f9..9e4bb2da970 100644 --- a/Sources/Services/AWSPersonalizeEvents/PersonalizeEventsClient.swift +++ b/Sources/Services/AWSPersonalizeEvents/PersonalizeEventsClient.swift @@ -51,6 +51,35 @@ extension PersonalizeEventsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> PersonalizeEventsClient.PersonalizeEventsClientConfiguration { + let clientConfiguration = try await PersonalizeEventsClient.PersonalizeEventsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> PersonalizeEventsClient { + let configuration = try await resolve(plugins: self.plugins) + return PersonalizeEventsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension PersonalizeEventsClient.PersonalizeEventsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct PersonalizeEventsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSPersonalizeRuntime/PersonalizeRuntimeClient.swift b/Sources/Services/AWSPersonalizeRuntime/PersonalizeRuntimeClient.swift index b1e6df8be8a..438f4d8f211 100644 --- a/Sources/Services/AWSPersonalizeRuntime/PersonalizeRuntimeClient.swift +++ b/Sources/Services/AWSPersonalizeRuntime/PersonalizeRuntimeClient.swift @@ -51,6 +51,35 @@ extension PersonalizeRuntimeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> PersonalizeRuntimeClient.PersonalizeRuntimeClientConfiguration { + let clientConfiguration = try await PersonalizeRuntimeClient.PersonalizeRuntimeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> PersonalizeRuntimeClient { + let configuration = try await resolve(plugins: self.plugins) + return PersonalizeRuntimeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension PersonalizeRuntimeClient.PersonalizeRuntimeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct PersonalizeRuntimeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSPinpoint/PinpointClient.swift b/Sources/Services/AWSPinpoint/PinpointClient.swift index 30220ddbcde..839079ac47d 100644 --- a/Sources/Services/AWSPinpoint/PinpointClient.swift +++ b/Sources/Services/AWSPinpoint/PinpointClient.swift @@ -51,6 +51,35 @@ extension PinpointClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> PinpointClient.PinpointClientConfiguration { + let clientConfiguration = try await PinpointClient.PinpointClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> PinpointClient { + let configuration = try await resolve(plugins: self.plugins) + return PinpointClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension PinpointClient.PinpointClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct PinpointClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSPinpointEmail/PinpointEmailClient.swift b/Sources/Services/AWSPinpointEmail/PinpointEmailClient.swift index fa15b8b291c..7839181bce8 100644 --- a/Sources/Services/AWSPinpointEmail/PinpointEmailClient.swift +++ b/Sources/Services/AWSPinpointEmail/PinpointEmailClient.swift @@ -51,6 +51,35 @@ extension PinpointEmailClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> PinpointEmailClient.PinpointEmailClientConfiguration { + let clientConfiguration = try await PinpointEmailClient.PinpointEmailClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> PinpointEmailClient { + let configuration = try await resolve(plugins: self.plugins) + return PinpointEmailClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension PinpointEmailClient.PinpointEmailClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct PinpointEmailClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSPinpointSMSVoice/PinpointSMSVoiceClient.swift b/Sources/Services/AWSPinpointSMSVoice/PinpointSMSVoiceClient.swift index 05cf86a8ec1..ed8d142949d 100644 --- a/Sources/Services/AWSPinpointSMSVoice/PinpointSMSVoiceClient.swift +++ b/Sources/Services/AWSPinpointSMSVoice/PinpointSMSVoiceClient.swift @@ -51,6 +51,35 @@ extension PinpointSMSVoiceClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> PinpointSMSVoiceClient.PinpointSMSVoiceClientConfiguration { + let clientConfiguration = try await PinpointSMSVoiceClient.PinpointSMSVoiceClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> PinpointSMSVoiceClient { + let configuration = try await resolve(plugins: self.plugins) + return PinpointSMSVoiceClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension PinpointSMSVoiceClient.PinpointSMSVoiceClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct PinpointSMSVoiceClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSPinpointSMSVoiceV2/PinpointSMSVoiceV2Client.swift b/Sources/Services/AWSPinpointSMSVoiceV2/PinpointSMSVoiceV2Client.swift index 87b0091e9d7..51bc9bd877d 100644 --- a/Sources/Services/AWSPinpointSMSVoiceV2/PinpointSMSVoiceV2Client.swift +++ b/Sources/Services/AWSPinpointSMSVoiceV2/PinpointSMSVoiceV2Client.swift @@ -51,6 +51,35 @@ extension PinpointSMSVoiceV2Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> PinpointSMSVoiceV2Client.PinpointSMSVoiceV2ClientConfiguration { + let clientConfiguration = try await PinpointSMSVoiceV2Client.PinpointSMSVoiceV2ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> PinpointSMSVoiceV2Client { + let configuration = try await resolve(plugins: self.plugins) + return PinpointSMSVoiceV2Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension PinpointSMSVoiceV2Client.PinpointSMSVoiceV2ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct PinpointSMSVoiceV2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSPipes/PipesClient.swift b/Sources/Services/AWSPipes/PipesClient.swift index 4d0c922e8cb..6362e5cbca4 100644 --- a/Sources/Services/AWSPipes/PipesClient.swift +++ b/Sources/Services/AWSPipes/PipesClient.swift @@ -51,6 +51,35 @@ extension PipesClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> PipesClient.PipesClientConfiguration { + let clientConfiguration = try await PipesClient.PipesClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> PipesClient { + let configuration = try await resolve(plugins: self.plugins) + return PipesClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension PipesClient.PipesClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct PipesClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSPolly/PollyClient.swift b/Sources/Services/AWSPolly/PollyClient.swift index 18ec4016c93..0ac8f986701 100644 --- a/Sources/Services/AWSPolly/PollyClient.swift +++ b/Sources/Services/AWSPolly/PollyClient.swift @@ -54,6 +54,35 @@ extension PollyClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> PollyClient.PollyClientConfiguration { + let clientConfiguration = try await PollyClient.PollyClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> PollyClient { + let configuration = try await resolve(plugins: self.plugins) + return PollyClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension PollyClient.PollyClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct PollyClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSPricing/PricingClient.swift b/Sources/Services/AWSPricing/PricingClient.swift index bc88365758b..d932f782c18 100644 --- a/Sources/Services/AWSPricing/PricingClient.swift +++ b/Sources/Services/AWSPricing/PricingClient.swift @@ -51,6 +51,35 @@ extension PricingClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> PricingClient.PricingClientConfiguration { + let clientConfiguration = try await PricingClient.PricingClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> PricingClient { + let configuration = try await resolve(plugins: self.plugins) + return PricingClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension PricingClient.PricingClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct PricingClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSPrivateNetworks/PrivateNetworksClient.swift b/Sources/Services/AWSPrivateNetworks/PrivateNetworksClient.swift index ce75759f575..d30894e05e1 100644 --- a/Sources/Services/AWSPrivateNetworks/PrivateNetworksClient.swift +++ b/Sources/Services/AWSPrivateNetworks/PrivateNetworksClient.swift @@ -51,6 +51,35 @@ extension PrivateNetworksClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> PrivateNetworksClient.PrivateNetworksClientConfiguration { + let clientConfiguration = try await PrivateNetworksClient.PrivateNetworksClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> PrivateNetworksClient { + let configuration = try await resolve(plugins: self.plugins) + return PrivateNetworksClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension PrivateNetworksClient.PrivateNetworksClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct PrivateNetworksClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSProton/ProtonClient.swift b/Sources/Services/AWSProton/ProtonClient.swift index ee02b00c814..2867e08746c 100644 --- a/Sources/Services/AWSProton/ProtonClient.swift +++ b/Sources/Services/AWSProton/ProtonClient.swift @@ -51,6 +51,35 @@ extension ProtonClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ProtonClient.ProtonClientConfiguration { + let clientConfiguration = try await ProtonClient.ProtonClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ProtonClient { + let configuration = try await resolve(plugins: self.plugins) + return ProtonClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ProtonClient.ProtonClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ProtonClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSQBusiness/QBusinessClient.swift b/Sources/Services/AWSQBusiness/QBusinessClient.swift index 66f3cb374c9..e09513aa790 100644 --- a/Sources/Services/AWSQBusiness/QBusinessClient.swift +++ b/Sources/Services/AWSQBusiness/QBusinessClient.swift @@ -51,6 +51,35 @@ extension QBusinessClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> QBusinessClient.QBusinessClientConfiguration { + let clientConfiguration = try await QBusinessClient.QBusinessClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> QBusinessClient { + let configuration = try await resolve(plugins: self.plugins) + return QBusinessClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension QBusinessClient.QBusinessClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct QBusinessClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSQConnect/QConnectClient.swift b/Sources/Services/AWSQConnect/QConnectClient.swift index e06bb0ccac4..acbafd03f3a 100644 --- a/Sources/Services/AWSQConnect/QConnectClient.swift +++ b/Sources/Services/AWSQConnect/QConnectClient.swift @@ -51,6 +51,35 @@ extension QConnectClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> QConnectClient.QConnectClientConfiguration { + let clientConfiguration = try await QConnectClient.QConnectClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> QConnectClient { + let configuration = try await resolve(plugins: self.plugins) + return QConnectClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension QConnectClient.QConnectClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct QConnectClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSQLDB/QLDBClient.swift b/Sources/Services/AWSQLDB/QLDBClient.swift index aec3c0794e2..a4f09f102dd 100644 --- a/Sources/Services/AWSQLDB/QLDBClient.swift +++ b/Sources/Services/AWSQLDB/QLDBClient.swift @@ -51,6 +51,35 @@ extension QLDBClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> QLDBClient.QLDBClientConfiguration { + let clientConfiguration = try await QLDBClient.QLDBClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> QLDBClient { + let configuration = try await resolve(plugins: self.plugins) + return QLDBClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension QLDBClient.QLDBClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct QLDBClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSQLDBSession/QLDBSessionClient.swift b/Sources/Services/AWSQLDBSession/QLDBSessionClient.swift index dbf1215b044..512cbe86fa0 100644 --- a/Sources/Services/AWSQLDBSession/QLDBSessionClient.swift +++ b/Sources/Services/AWSQLDBSession/QLDBSessionClient.swift @@ -51,6 +51,35 @@ extension QLDBSessionClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> QLDBSessionClient.QLDBSessionClientConfiguration { + let clientConfiguration = try await QLDBSessionClient.QLDBSessionClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> QLDBSessionClient { + let configuration = try await resolve(plugins: self.plugins) + return QLDBSessionClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension QLDBSessionClient.QLDBSessionClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct QLDBSessionClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSQuickSight/QuickSightClient.swift b/Sources/Services/AWSQuickSight/QuickSightClient.swift index 6ab52908b83..733efa9def9 100644 --- a/Sources/Services/AWSQuickSight/QuickSightClient.swift +++ b/Sources/Services/AWSQuickSight/QuickSightClient.swift @@ -51,6 +51,35 @@ extension QuickSightClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> QuickSightClient.QuickSightClientConfiguration { + let clientConfiguration = try await QuickSightClient.QuickSightClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> QuickSightClient { + let configuration = try await resolve(plugins: self.plugins) + return QuickSightClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension QuickSightClient.QuickSightClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct QuickSightClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRAM/RAMClient.swift b/Sources/Services/AWSRAM/RAMClient.swift index 9ad1558bdaa..3236fe216c3 100644 --- a/Sources/Services/AWSRAM/RAMClient.swift +++ b/Sources/Services/AWSRAM/RAMClient.swift @@ -51,6 +51,35 @@ extension RAMClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> RAMClient.RAMClientConfiguration { + let clientConfiguration = try await RAMClient.RAMClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> RAMClient { + let configuration = try await resolve(plugins: self.plugins) + return RAMClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension RAMClient.RAMClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct RAMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRDS/RDSClient.swift b/Sources/Services/AWSRDS/RDSClient.swift index 5d86a111e30..deb7606c387 100644 --- a/Sources/Services/AWSRDS/RDSClient.swift +++ b/Sources/Services/AWSRDS/RDSClient.swift @@ -47,6 +47,35 @@ extension RDSClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> RDSClient.RDSClientConfiguration { + let clientConfiguration = try await RDSClient.RDSClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> RDSClient { + let configuration = try await resolve(plugins: self.plugins) + return RDSClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension RDSClient.RDSClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct RDSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRDSData/RDSDataClient.swift b/Sources/Services/AWSRDSData/RDSDataClient.swift index 9564681c455..cf79fe8be64 100644 --- a/Sources/Services/AWSRDSData/RDSDataClient.swift +++ b/Sources/Services/AWSRDSData/RDSDataClient.swift @@ -51,6 +51,35 @@ extension RDSDataClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> RDSDataClient.RDSDataClientConfiguration { + let clientConfiguration = try await RDSDataClient.RDSDataClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> RDSDataClient { + let configuration = try await resolve(plugins: self.plugins) + return RDSDataClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension RDSDataClient.RDSDataClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct RDSDataClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRUM/RUMClient.swift b/Sources/Services/AWSRUM/RUMClient.swift index 13c0ac94991..1ad21766e4a 100644 --- a/Sources/Services/AWSRUM/RUMClient.swift +++ b/Sources/Services/AWSRUM/RUMClient.swift @@ -51,6 +51,35 @@ extension RUMClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> RUMClient.RUMClientConfiguration { + let clientConfiguration = try await RUMClient.RUMClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> RUMClient { + let configuration = try await resolve(plugins: self.plugins) + return RUMClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension RUMClient.RUMClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct RUMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRbin/RbinClient.swift b/Sources/Services/AWSRbin/RbinClient.swift index 057bbb3042a..4037ce18bd5 100644 --- a/Sources/Services/AWSRbin/RbinClient.swift +++ b/Sources/Services/AWSRbin/RbinClient.swift @@ -51,6 +51,35 @@ extension RbinClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> RbinClient.RbinClientConfiguration { + let clientConfiguration = try await RbinClient.RbinClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> RbinClient { + let configuration = try await resolve(plugins: self.plugins) + return RbinClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension RbinClient.RbinClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct RbinClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRedshift/RedshiftClient.swift b/Sources/Services/AWSRedshift/RedshiftClient.swift index 0affff22130..68ad20da9b2 100644 --- a/Sources/Services/AWSRedshift/RedshiftClient.swift +++ b/Sources/Services/AWSRedshift/RedshiftClient.swift @@ -47,6 +47,35 @@ extension RedshiftClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> RedshiftClient.RedshiftClientConfiguration { + let clientConfiguration = try await RedshiftClient.RedshiftClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> RedshiftClient { + let configuration = try await resolve(plugins: self.plugins) + return RedshiftClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension RedshiftClient.RedshiftClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct RedshiftClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRedshiftData/RedshiftDataClient.swift b/Sources/Services/AWSRedshiftData/RedshiftDataClient.swift index 909ee3982d6..a12eb6cbd5f 100644 --- a/Sources/Services/AWSRedshiftData/RedshiftDataClient.swift +++ b/Sources/Services/AWSRedshiftData/RedshiftDataClient.swift @@ -51,6 +51,35 @@ extension RedshiftDataClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> RedshiftDataClient.RedshiftDataClientConfiguration { + let clientConfiguration = try await RedshiftDataClient.RedshiftDataClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> RedshiftDataClient { + let configuration = try await resolve(plugins: self.plugins) + return RedshiftDataClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension RedshiftDataClient.RedshiftDataClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct RedshiftDataClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRedshiftServerless/RedshiftServerlessClient.swift b/Sources/Services/AWSRedshiftServerless/RedshiftServerlessClient.swift index 9cf640acf62..f4d9285f141 100644 --- a/Sources/Services/AWSRedshiftServerless/RedshiftServerlessClient.swift +++ b/Sources/Services/AWSRedshiftServerless/RedshiftServerlessClient.swift @@ -51,6 +51,35 @@ extension RedshiftServerlessClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> RedshiftServerlessClient.RedshiftServerlessClientConfiguration { + let clientConfiguration = try await RedshiftServerlessClient.RedshiftServerlessClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> RedshiftServerlessClient { + let configuration = try await resolve(plugins: self.plugins) + return RedshiftServerlessClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension RedshiftServerlessClient.RedshiftServerlessClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct RedshiftServerlessClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRekognition/RekognitionClient.swift b/Sources/Services/AWSRekognition/RekognitionClient.swift index c741ac2189f..fc9b017d4e7 100644 --- a/Sources/Services/AWSRekognition/RekognitionClient.swift +++ b/Sources/Services/AWSRekognition/RekognitionClient.swift @@ -51,6 +51,35 @@ extension RekognitionClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> RekognitionClient.RekognitionClientConfiguration { + let clientConfiguration = try await RekognitionClient.RekognitionClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> RekognitionClient { + let configuration = try await resolve(plugins: self.plugins) + return RekognitionClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension RekognitionClient.RekognitionClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct RekognitionClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRepostspace/RepostspaceClient.swift b/Sources/Services/AWSRepostspace/RepostspaceClient.swift index f2f76a11e92..ce4e0dea0da 100644 --- a/Sources/Services/AWSRepostspace/RepostspaceClient.swift +++ b/Sources/Services/AWSRepostspace/RepostspaceClient.swift @@ -51,6 +51,35 @@ extension RepostspaceClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> RepostspaceClient.RepostspaceClientConfiguration { + let clientConfiguration = try await RepostspaceClient.RepostspaceClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> RepostspaceClient { + let configuration = try await resolve(plugins: self.plugins) + return RepostspaceClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension RepostspaceClient.RepostspaceClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct RepostspaceClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSResiliencehub/ResiliencehubClient.swift b/Sources/Services/AWSResiliencehub/ResiliencehubClient.swift index 914d0da4d43..42309f1ff15 100644 --- a/Sources/Services/AWSResiliencehub/ResiliencehubClient.swift +++ b/Sources/Services/AWSResiliencehub/ResiliencehubClient.swift @@ -51,6 +51,35 @@ extension ResiliencehubClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ResiliencehubClient.ResiliencehubClientConfiguration { + let clientConfiguration = try await ResiliencehubClient.ResiliencehubClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ResiliencehubClient { + let configuration = try await resolve(plugins: self.plugins) + return ResiliencehubClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ResiliencehubClient.ResiliencehubClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ResiliencehubClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSResourceExplorer2/ResourceExplorer2Client.swift b/Sources/Services/AWSResourceExplorer2/ResourceExplorer2Client.swift index 22752ddef6a..356ba891335 100644 --- a/Sources/Services/AWSResourceExplorer2/ResourceExplorer2Client.swift +++ b/Sources/Services/AWSResourceExplorer2/ResourceExplorer2Client.swift @@ -51,6 +51,35 @@ extension ResourceExplorer2Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ResourceExplorer2Client.ResourceExplorer2ClientConfiguration { + let clientConfiguration = try await ResourceExplorer2Client.ResourceExplorer2ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ResourceExplorer2Client { + let configuration = try await resolve(plugins: self.plugins) + return ResourceExplorer2Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ResourceExplorer2Client.ResourceExplorer2ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ResourceExplorer2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSResourceGroups/ResourceGroupsClient.swift b/Sources/Services/AWSResourceGroups/ResourceGroupsClient.swift index 74e22dea794..9deabeb8229 100644 --- a/Sources/Services/AWSResourceGroups/ResourceGroupsClient.swift +++ b/Sources/Services/AWSResourceGroups/ResourceGroupsClient.swift @@ -51,6 +51,35 @@ extension ResourceGroupsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ResourceGroupsClient.ResourceGroupsClientConfiguration { + let clientConfiguration = try await ResourceGroupsClient.ResourceGroupsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ResourceGroupsClient { + let configuration = try await resolve(plugins: self.plugins) + return ResourceGroupsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ResourceGroupsClient.ResourceGroupsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ResourceGroupsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSResourceGroupsTaggingAPI/ResourceGroupsTaggingAPIClient.swift b/Sources/Services/AWSResourceGroupsTaggingAPI/ResourceGroupsTaggingAPIClient.swift index 58237d09db4..7c35cf25aa5 100644 --- a/Sources/Services/AWSResourceGroupsTaggingAPI/ResourceGroupsTaggingAPIClient.swift +++ b/Sources/Services/AWSResourceGroupsTaggingAPI/ResourceGroupsTaggingAPIClient.swift @@ -51,6 +51,35 @@ extension ResourceGroupsTaggingAPIClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ResourceGroupsTaggingAPIClient.ResourceGroupsTaggingAPIClientConfiguration { + let clientConfiguration = try await ResourceGroupsTaggingAPIClient.ResourceGroupsTaggingAPIClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ResourceGroupsTaggingAPIClient { + let configuration = try await resolve(plugins: self.plugins) + return ResourceGroupsTaggingAPIClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ResourceGroupsTaggingAPIClient.ResourceGroupsTaggingAPIClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ResourceGroupsTaggingAPIClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRoboMaker/RoboMakerClient.swift b/Sources/Services/AWSRoboMaker/RoboMakerClient.swift index 7aa2776b0cb..c002a023477 100644 --- a/Sources/Services/AWSRoboMaker/RoboMakerClient.swift +++ b/Sources/Services/AWSRoboMaker/RoboMakerClient.swift @@ -51,6 +51,35 @@ extension RoboMakerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> RoboMakerClient.RoboMakerClientConfiguration { + let clientConfiguration = try await RoboMakerClient.RoboMakerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> RoboMakerClient { + let configuration = try await resolve(plugins: self.plugins) + return RoboMakerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension RoboMakerClient.RoboMakerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct RoboMakerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRolesAnywhere/RolesAnywhereClient.swift b/Sources/Services/AWSRolesAnywhere/RolesAnywhereClient.swift index 4917f0503ee..a035447704a 100644 --- a/Sources/Services/AWSRolesAnywhere/RolesAnywhereClient.swift +++ b/Sources/Services/AWSRolesAnywhere/RolesAnywhereClient.swift @@ -51,6 +51,35 @@ extension RolesAnywhereClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> RolesAnywhereClient.RolesAnywhereClientConfiguration { + let clientConfiguration = try await RolesAnywhereClient.RolesAnywhereClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> RolesAnywhereClient { + let configuration = try await resolve(plugins: self.plugins) + return RolesAnywhereClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension RolesAnywhereClient.RolesAnywhereClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct RolesAnywhereClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRoute53/Route53Client.swift b/Sources/Services/AWSRoute53/Route53Client.swift index a3416a92b62..9c9f6b8add3 100644 --- a/Sources/Services/AWSRoute53/Route53Client.swift +++ b/Sources/Services/AWSRoute53/Route53Client.swift @@ -52,6 +52,35 @@ extension Route53Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> Route53Client.Route53ClientConfiguration { + let clientConfiguration = try await Route53Client.Route53ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> Route53Client { + let configuration = try await resolve(plugins: self.plugins) + return Route53Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension Route53Client.Route53ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct Route53ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRoute53Domains/Route53DomainsClient.swift b/Sources/Services/AWSRoute53Domains/Route53DomainsClient.swift index 99504b8ce3f..3175aec4337 100644 --- a/Sources/Services/AWSRoute53Domains/Route53DomainsClient.swift +++ b/Sources/Services/AWSRoute53Domains/Route53DomainsClient.swift @@ -51,6 +51,35 @@ extension Route53DomainsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> Route53DomainsClient.Route53DomainsClientConfiguration { + let clientConfiguration = try await Route53DomainsClient.Route53DomainsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> Route53DomainsClient { + let configuration = try await resolve(plugins: self.plugins) + return Route53DomainsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension Route53DomainsClient.Route53DomainsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct Route53DomainsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRoute53RecoveryCluster/Route53RecoveryClusterClient.swift b/Sources/Services/AWSRoute53RecoveryCluster/Route53RecoveryClusterClient.swift index 237831974df..a025f8ffcdc 100644 --- a/Sources/Services/AWSRoute53RecoveryCluster/Route53RecoveryClusterClient.swift +++ b/Sources/Services/AWSRoute53RecoveryCluster/Route53RecoveryClusterClient.swift @@ -51,6 +51,35 @@ extension Route53RecoveryClusterClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> Route53RecoveryClusterClient.Route53RecoveryClusterClientConfiguration { + let clientConfiguration = try await Route53RecoveryClusterClient.Route53RecoveryClusterClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> Route53RecoveryClusterClient { + let configuration = try await resolve(plugins: self.plugins) + return Route53RecoveryClusterClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension Route53RecoveryClusterClient.Route53RecoveryClusterClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct Route53RecoveryClusterClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRoute53RecoveryControlConfig/Route53RecoveryControlConfigClient.swift b/Sources/Services/AWSRoute53RecoveryControlConfig/Route53RecoveryControlConfigClient.swift index 644ae3c7ae2..2a6a2e9e5da 100644 --- a/Sources/Services/AWSRoute53RecoveryControlConfig/Route53RecoveryControlConfigClient.swift +++ b/Sources/Services/AWSRoute53RecoveryControlConfig/Route53RecoveryControlConfigClient.swift @@ -51,6 +51,35 @@ extension Route53RecoveryControlConfigClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> Route53RecoveryControlConfigClient.Route53RecoveryControlConfigClientConfiguration { + let clientConfiguration = try await Route53RecoveryControlConfigClient.Route53RecoveryControlConfigClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> Route53RecoveryControlConfigClient { + let configuration = try await resolve(plugins: self.plugins) + return Route53RecoveryControlConfigClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension Route53RecoveryControlConfigClient.Route53RecoveryControlConfigClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct Route53RecoveryControlConfigClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRoute53RecoveryReadiness/Route53RecoveryReadinessClient.swift b/Sources/Services/AWSRoute53RecoveryReadiness/Route53RecoveryReadinessClient.swift index 09ac1d7a7da..ac47e26dbaa 100644 --- a/Sources/Services/AWSRoute53RecoveryReadiness/Route53RecoveryReadinessClient.swift +++ b/Sources/Services/AWSRoute53RecoveryReadiness/Route53RecoveryReadinessClient.swift @@ -51,6 +51,35 @@ extension Route53RecoveryReadinessClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> Route53RecoveryReadinessClient.Route53RecoveryReadinessClientConfiguration { + let clientConfiguration = try await Route53RecoveryReadinessClient.Route53RecoveryReadinessClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> Route53RecoveryReadinessClient { + let configuration = try await resolve(plugins: self.plugins) + return Route53RecoveryReadinessClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension Route53RecoveryReadinessClient.Route53RecoveryReadinessClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct Route53RecoveryReadinessClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSRoute53Resolver/Route53ResolverClient.swift b/Sources/Services/AWSRoute53Resolver/Route53ResolverClient.swift index b31f4788d45..4563de113f8 100644 --- a/Sources/Services/AWSRoute53Resolver/Route53ResolverClient.swift +++ b/Sources/Services/AWSRoute53Resolver/Route53ResolverClient.swift @@ -51,6 +51,35 @@ extension Route53ResolverClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> Route53ResolverClient.Route53ResolverClientConfiguration { + let clientConfiguration = try await Route53ResolverClient.Route53ResolverClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> Route53ResolverClient { + let configuration = try await resolve(plugins: self.plugins) + return Route53ResolverClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension Route53ResolverClient.Route53ResolverClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct Route53ResolverClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSS3/S3Client.swift b/Sources/Services/AWSS3/S3Client.swift index e0e0c564ed6..d0992e13d5f 100644 --- a/Sources/Services/AWSS3/S3Client.swift +++ b/Sources/Services/AWSS3/S3Client.swift @@ -61,6 +61,35 @@ extension S3Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> S3Client.S3ClientConfiguration { + let clientConfiguration = try await S3Client.S3ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> S3Client { + let configuration = try await resolve(plugins: self.plugins) + return S3Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension S3Client.S3ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct S3ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSS3Control/S3ControlClient.swift b/Sources/Services/AWSS3Control/S3ControlClient.swift index 3cf987386d2..5bf259ca520 100644 --- a/Sources/Services/AWSS3Control/S3ControlClient.swift +++ b/Sources/Services/AWSS3Control/S3ControlClient.swift @@ -53,6 +53,35 @@ extension S3ControlClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> S3ControlClient.S3ControlClientConfiguration { + let clientConfiguration = try await S3ControlClient.S3ControlClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> S3ControlClient { + let configuration = try await resolve(plugins: self.plugins) + return S3ControlClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension S3ControlClient.S3ControlClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct S3ControlClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSS3Outposts/S3OutpostsClient.swift b/Sources/Services/AWSS3Outposts/S3OutpostsClient.swift index 98fca3c5e7c..6e411d303cb 100644 --- a/Sources/Services/AWSS3Outposts/S3OutpostsClient.swift +++ b/Sources/Services/AWSS3Outposts/S3OutpostsClient.swift @@ -51,6 +51,35 @@ extension S3OutpostsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> S3OutpostsClient.S3OutpostsClientConfiguration { + let clientConfiguration = try await S3OutpostsClient.S3OutpostsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> S3OutpostsClient { + let configuration = try await resolve(plugins: self.plugins) + return S3OutpostsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension S3OutpostsClient.S3OutpostsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct S3OutpostsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSES/SESClient.swift b/Sources/Services/AWSSES/SESClient.swift index 64abff608be..ff47f85305d 100644 --- a/Sources/Services/AWSSES/SESClient.swift +++ b/Sources/Services/AWSSES/SESClient.swift @@ -47,6 +47,35 @@ extension SESClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SESClient.SESClientConfiguration { + let clientConfiguration = try await SESClient.SESClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SESClient { + let configuration = try await resolve(plugins: self.plugins) + return SESClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SESClient.SESClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SESClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSESv2/SESv2Client.swift b/Sources/Services/AWSSESv2/SESv2Client.swift index 3309767acc8..0b182f19ee8 100644 --- a/Sources/Services/AWSSESv2/SESv2Client.swift +++ b/Sources/Services/AWSSESv2/SESv2Client.swift @@ -51,6 +51,35 @@ extension SESv2Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SESv2Client.SESv2ClientConfiguration { + let clientConfiguration = try await SESv2Client.SESv2ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SESv2Client { + let configuration = try await resolve(plugins: self.plugins) + return SESv2Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SESv2Client.SESv2ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SESv2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSFN/SFNClient.swift b/Sources/Services/AWSSFN/SFNClient.swift index bce0ca2bdb6..0666cb2abbe 100644 --- a/Sources/Services/AWSSFN/SFNClient.swift +++ b/Sources/Services/AWSSFN/SFNClient.swift @@ -51,6 +51,35 @@ extension SFNClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SFNClient.SFNClientConfiguration { + let clientConfiguration = try await SFNClient.SFNClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SFNClient { + let configuration = try await resolve(plugins: self.plugins) + return SFNClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SFNClient.SFNClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SFNClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSMS/SMSClient.swift b/Sources/Services/AWSSMS/SMSClient.swift index 5a58990e86b..1055a1408fb 100644 --- a/Sources/Services/AWSSMS/SMSClient.swift +++ b/Sources/Services/AWSSMS/SMSClient.swift @@ -51,6 +51,35 @@ extension SMSClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SMSClient.SMSClientConfiguration { + let clientConfiguration = try await SMSClient.SMSClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SMSClient { + let configuration = try await resolve(plugins: self.plugins) + return SMSClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SMSClient.SMSClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SMSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSNS/SNSClient.swift b/Sources/Services/AWSSNS/SNSClient.swift index 6f68026b823..7750eac2f03 100644 --- a/Sources/Services/AWSSNS/SNSClient.swift +++ b/Sources/Services/AWSSNS/SNSClient.swift @@ -47,6 +47,35 @@ extension SNSClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SNSClient.SNSClientConfiguration { + let clientConfiguration = try await SNSClient.SNSClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SNSClient { + let configuration = try await resolve(plugins: self.plugins) + return SNSClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SNSClient.SNSClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SNSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSQS/SQSClient.swift b/Sources/Services/AWSSQS/SQSClient.swift index 442e095fb5d..a2522f42f75 100644 --- a/Sources/Services/AWSSQS/SQSClient.swift +++ b/Sources/Services/AWSSQS/SQSClient.swift @@ -51,6 +51,35 @@ extension SQSClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SQSClient.SQSClientConfiguration { + let clientConfiguration = try await SQSClient.SQSClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SQSClient { + let configuration = try await resolve(plugins: self.plugins) + return SQSClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SQSClient.SQSClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SQSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSSM/SSMClient.swift b/Sources/Services/AWSSSM/SSMClient.swift index 2670730a918..456abc056bf 100644 --- a/Sources/Services/AWSSSM/SSMClient.swift +++ b/Sources/Services/AWSSSM/SSMClient.swift @@ -51,6 +51,35 @@ extension SSMClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SSMClient.SSMClientConfiguration { + let clientConfiguration = try await SSMClient.SSMClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SSMClient { + let configuration = try await resolve(plugins: self.plugins) + return SSMClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SSMClient.SSMClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SSMClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSSMContacts/SSMContactsClient.swift b/Sources/Services/AWSSSMContacts/SSMContactsClient.swift index 8b30d93cb7c..a76e400ecb0 100644 --- a/Sources/Services/AWSSSMContacts/SSMContactsClient.swift +++ b/Sources/Services/AWSSSMContacts/SSMContactsClient.swift @@ -51,6 +51,35 @@ extension SSMContactsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SSMContactsClient.SSMContactsClientConfiguration { + let clientConfiguration = try await SSMContactsClient.SSMContactsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SSMContactsClient { + let configuration = try await resolve(plugins: self.plugins) + return SSMContactsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SSMContactsClient.SSMContactsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SSMContactsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSSMIncidents/SSMIncidentsClient.swift b/Sources/Services/AWSSSMIncidents/SSMIncidentsClient.swift index 6af04412430..dff2cca46c4 100644 --- a/Sources/Services/AWSSSMIncidents/SSMIncidentsClient.swift +++ b/Sources/Services/AWSSSMIncidents/SSMIncidentsClient.swift @@ -51,6 +51,35 @@ extension SSMIncidentsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SSMIncidentsClient.SSMIncidentsClientConfiguration { + let clientConfiguration = try await SSMIncidentsClient.SSMIncidentsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SSMIncidentsClient { + let configuration = try await resolve(plugins: self.plugins) + return SSMIncidentsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SSMIncidentsClient.SSMIncidentsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SSMIncidentsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSSO/SSOClient.swift b/Sources/Services/AWSSSO/SSOClient.swift index c3b6b245091..83a346b299a 100644 --- a/Sources/Services/AWSSSO/SSOClient.swift +++ b/Sources/Services/AWSSSO/SSOClient.swift @@ -51,6 +51,35 @@ extension SSOClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SSOClient.SSOClientConfiguration { + let clientConfiguration = try await SSOClient.SSOClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SSOClient { + let configuration = try await resolve(plugins: self.plugins) + return SSOClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SSOClient.SSOClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SSOClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSSOAdmin/SSOAdminClient.swift b/Sources/Services/AWSSSOAdmin/SSOAdminClient.swift index 9e1342a2d8c..7f6dee38096 100644 --- a/Sources/Services/AWSSSOAdmin/SSOAdminClient.swift +++ b/Sources/Services/AWSSSOAdmin/SSOAdminClient.swift @@ -51,6 +51,35 @@ extension SSOAdminClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SSOAdminClient.SSOAdminClientConfiguration { + let clientConfiguration = try await SSOAdminClient.SSOAdminClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SSOAdminClient { + let configuration = try await resolve(plugins: self.plugins) + return SSOAdminClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SSOAdminClient.SSOAdminClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SSOAdminClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSSOOIDC/SSOOIDCClient.swift b/Sources/Services/AWSSSOOIDC/SSOOIDCClient.swift index 38b5920f147..bde86b3e809 100644 --- a/Sources/Services/AWSSSOOIDC/SSOOIDCClient.swift +++ b/Sources/Services/AWSSSOOIDC/SSOOIDCClient.swift @@ -51,6 +51,35 @@ extension SSOOIDCClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SSOOIDCClient.SSOOIDCClientConfiguration { + let clientConfiguration = try await SSOOIDCClient.SSOOIDCClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SSOOIDCClient { + let configuration = try await resolve(plugins: self.plugins) + return SSOOIDCClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SSOOIDCClient.SSOOIDCClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SSOOIDCClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSTS/STSClient.swift b/Sources/Services/AWSSTS/STSClient.swift index 6696fd1e366..66dd34bcabd 100644 --- a/Sources/Services/AWSSTS/STSClient.swift +++ b/Sources/Services/AWSSTS/STSClient.swift @@ -51,6 +51,35 @@ extension STSClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> STSClient.STSClientConfiguration { + let clientConfiguration = try await STSClient.STSClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> STSClient { + let configuration = try await resolve(plugins: self.plugins) + return STSClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension STSClient.STSClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct STSClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSWF/SWFClient.swift b/Sources/Services/AWSSWF/SWFClient.swift index 3adc353062e..408f03077e6 100644 --- a/Sources/Services/AWSSWF/SWFClient.swift +++ b/Sources/Services/AWSSWF/SWFClient.swift @@ -51,6 +51,35 @@ extension SWFClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SWFClient.SWFClientConfiguration { + let clientConfiguration = try await SWFClient.SWFClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SWFClient { + let configuration = try await resolve(plugins: self.plugins) + return SWFClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SWFClient.SWFClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SWFClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSageMaker/SageMakerClient.swift b/Sources/Services/AWSSageMaker/SageMakerClient.swift index 352ae1575af..7540b4a0074 100644 --- a/Sources/Services/AWSSageMaker/SageMakerClient.swift +++ b/Sources/Services/AWSSageMaker/SageMakerClient.swift @@ -51,6 +51,35 @@ extension SageMakerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SageMakerClient.SageMakerClientConfiguration { + let clientConfiguration = try await SageMakerClient.SageMakerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SageMakerClient { + let configuration = try await resolve(plugins: self.plugins) + return SageMakerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SageMakerClient.SageMakerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SageMakerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSageMakerA2IRuntime/SageMakerA2IRuntimeClient.swift b/Sources/Services/AWSSageMakerA2IRuntime/SageMakerA2IRuntimeClient.swift index 1c83f2972bd..8c0edecca6e 100644 --- a/Sources/Services/AWSSageMakerA2IRuntime/SageMakerA2IRuntimeClient.swift +++ b/Sources/Services/AWSSageMakerA2IRuntime/SageMakerA2IRuntimeClient.swift @@ -51,6 +51,35 @@ extension SageMakerA2IRuntimeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SageMakerA2IRuntimeClient.SageMakerA2IRuntimeClientConfiguration { + let clientConfiguration = try await SageMakerA2IRuntimeClient.SageMakerA2IRuntimeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SageMakerA2IRuntimeClient { + let configuration = try await resolve(plugins: self.plugins) + return SageMakerA2IRuntimeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SageMakerA2IRuntimeClient.SageMakerA2IRuntimeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SageMakerA2IRuntimeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSageMakerFeatureStoreRuntime/SageMakerFeatureStoreRuntimeClient.swift b/Sources/Services/AWSSageMakerFeatureStoreRuntime/SageMakerFeatureStoreRuntimeClient.swift index 5244d00deea..b36aa0f1c9b 100644 --- a/Sources/Services/AWSSageMakerFeatureStoreRuntime/SageMakerFeatureStoreRuntimeClient.swift +++ b/Sources/Services/AWSSageMakerFeatureStoreRuntime/SageMakerFeatureStoreRuntimeClient.swift @@ -51,6 +51,35 @@ extension SageMakerFeatureStoreRuntimeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SageMakerFeatureStoreRuntimeClient.SageMakerFeatureStoreRuntimeClientConfiguration { + let clientConfiguration = try await SageMakerFeatureStoreRuntimeClient.SageMakerFeatureStoreRuntimeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SageMakerFeatureStoreRuntimeClient { + let configuration = try await resolve(plugins: self.plugins) + return SageMakerFeatureStoreRuntimeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SageMakerFeatureStoreRuntimeClient.SageMakerFeatureStoreRuntimeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SageMakerFeatureStoreRuntimeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSageMakerGeospatial/SageMakerGeospatialClient.swift b/Sources/Services/AWSSageMakerGeospatial/SageMakerGeospatialClient.swift index 81db1578009..a479e152cb2 100644 --- a/Sources/Services/AWSSageMakerGeospatial/SageMakerGeospatialClient.swift +++ b/Sources/Services/AWSSageMakerGeospatial/SageMakerGeospatialClient.swift @@ -51,6 +51,35 @@ extension SageMakerGeospatialClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SageMakerGeospatialClient.SageMakerGeospatialClientConfiguration { + let clientConfiguration = try await SageMakerGeospatialClient.SageMakerGeospatialClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SageMakerGeospatialClient { + let configuration = try await resolve(plugins: self.plugins) + return SageMakerGeospatialClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SageMakerGeospatialClient.SageMakerGeospatialClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SageMakerGeospatialClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSageMakerMetrics/SageMakerMetricsClient.swift b/Sources/Services/AWSSageMakerMetrics/SageMakerMetricsClient.swift index 21022d62ab5..27d36ac5aa4 100644 --- a/Sources/Services/AWSSageMakerMetrics/SageMakerMetricsClient.swift +++ b/Sources/Services/AWSSageMakerMetrics/SageMakerMetricsClient.swift @@ -51,6 +51,35 @@ extension SageMakerMetricsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SageMakerMetricsClient.SageMakerMetricsClientConfiguration { + let clientConfiguration = try await SageMakerMetricsClient.SageMakerMetricsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SageMakerMetricsClient { + let configuration = try await resolve(plugins: self.plugins) + return SageMakerMetricsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SageMakerMetricsClient.SageMakerMetricsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SageMakerMetricsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSageMakerRuntime/SageMakerRuntimeClient.swift b/Sources/Services/AWSSageMakerRuntime/SageMakerRuntimeClient.swift index bf98647a9d6..ec6da361bf7 100644 --- a/Sources/Services/AWSSageMakerRuntime/SageMakerRuntimeClient.swift +++ b/Sources/Services/AWSSageMakerRuntime/SageMakerRuntimeClient.swift @@ -51,6 +51,35 @@ extension SageMakerRuntimeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SageMakerRuntimeClient.SageMakerRuntimeClientConfiguration { + let clientConfiguration = try await SageMakerRuntimeClient.SageMakerRuntimeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SageMakerRuntimeClient { + let configuration = try await resolve(plugins: self.plugins) + return SageMakerRuntimeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SageMakerRuntimeClient.SageMakerRuntimeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SageMakerRuntimeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSagemakerEdge/SagemakerEdgeClient.swift b/Sources/Services/AWSSagemakerEdge/SagemakerEdgeClient.swift index 8a0e7ee4d3b..941836d3eab 100644 --- a/Sources/Services/AWSSagemakerEdge/SagemakerEdgeClient.swift +++ b/Sources/Services/AWSSagemakerEdge/SagemakerEdgeClient.swift @@ -51,6 +51,35 @@ extension SagemakerEdgeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SagemakerEdgeClient.SagemakerEdgeClientConfiguration { + let clientConfiguration = try await SagemakerEdgeClient.SagemakerEdgeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SagemakerEdgeClient { + let configuration = try await resolve(plugins: self.plugins) + return SagemakerEdgeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SagemakerEdgeClient.SagemakerEdgeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SagemakerEdgeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSavingsplans/SavingsplansClient.swift b/Sources/Services/AWSSavingsplans/SavingsplansClient.swift index 540d87857eb..b74b4bbd226 100644 --- a/Sources/Services/AWSSavingsplans/SavingsplansClient.swift +++ b/Sources/Services/AWSSavingsplans/SavingsplansClient.swift @@ -51,6 +51,35 @@ extension SavingsplansClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SavingsplansClient.SavingsplansClientConfiguration { + let clientConfiguration = try await SavingsplansClient.SavingsplansClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SavingsplansClient { + let configuration = try await resolve(plugins: self.plugins) + return SavingsplansClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SavingsplansClient.SavingsplansClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SavingsplansClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSScheduler/SchedulerClient.swift b/Sources/Services/AWSScheduler/SchedulerClient.swift index 43e4ea2919d..c2e7afa54b4 100644 --- a/Sources/Services/AWSScheduler/SchedulerClient.swift +++ b/Sources/Services/AWSScheduler/SchedulerClient.swift @@ -51,6 +51,35 @@ extension SchedulerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SchedulerClient.SchedulerClientConfiguration { + let clientConfiguration = try await SchedulerClient.SchedulerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SchedulerClient { + let configuration = try await resolve(plugins: self.plugins) + return SchedulerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SchedulerClient.SchedulerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SchedulerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSchemas/SchemasClient.swift b/Sources/Services/AWSSchemas/SchemasClient.swift index 3fbb069fe52..e1d1cf35322 100644 --- a/Sources/Services/AWSSchemas/SchemasClient.swift +++ b/Sources/Services/AWSSchemas/SchemasClient.swift @@ -51,6 +51,35 @@ extension SchemasClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SchemasClient.SchemasClientConfiguration { + let clientConfiguration = try await SchemasClient.SchemasClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SchemasClient { + let configuration = try await resolve(plugins: self.plugins) + return SchemasClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SchemasClient.SchemasClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SchemasClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSecretsManager/SecretsManagerClient.swift b/Sources/Services/AWSSecretsManager/SecretsManagerClient.swift index c4116baa124..b356da74320 100644 --- a/Sources/Services/AWSSecretsManager/SecretsManagerClient.swift +++ b/Sources/Services/AWSSecretsManager/SecretsManagerClient.swift @@ -51,6 +51,35 @@ extension SecretsManagerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SecretsManagerClient.SecretsManagerClientConfiguration { + let clientConfiguration = try await SecretsManagerClient.SecretsManagerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SecretsManagerClient { + let configuration = try await resolve(plugins: self.plugins) + return SecretsManagerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SecretsManagerClient.SecretsManagerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SecretsManagerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSecurityHub/SecurityHubClient.swift b/Sources/Services/AWSSecurityHub/SecurityHubClient.swift index fa53628aaa1..0be23e2cf2c 100644 --- a/Sources/Services/AWSSecurityHub/SecurityHubClient.swift +++ b/Sources/Services/AWSSecurityHub/SecurityHubClient.swift @@ -51,6 +51,35 @@ extension SecurityHubClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SecurityHubClient.SecurityHubClientConfiguration { + let clientConfiguration = try await SecurityHubClient.SecurityHubClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SecurityHubClient { + let configuration = try await resolve(plugins: self.plugins) + return SecurityHubClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SecurityHubClient.SecurityHubClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SecurityHubClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSecurityLake/SecurityLakeClient.swift b/Sources/Services/AWSSecurityLake/SecurityLakeClient.swift index 00be161901b..182496e18c0 100644 --- a/Sources/Services/AWSSecurityLake/SecurityLakeClient.swift +++ b/Sources/Services/AWSSecurityLake/SecurityLakeClient.swift @@ -51,6 +51,35 @@ extension SecurityLakeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SecurityLakeClient.SecurityLakeClientConfiguration { + let clientConfiguration = try await SecurityLakeClient.SecurityLakeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SecurityLakeClient { + let configuration = try await resolve(plugins: self.plugins) + return SecurityLakeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SecurityLakeClient.SecurityLakeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SecurityLakeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSServerlessApplicationRepository/ServerlessApplicationRepositoryClient.swift b/Sources/Services/AWSServerlessApplicationRepository/ServerlessApplicationRepositoryClient.swift index 6e4f57830ef..1b7418bbfd2 100644 --- a/Sources/Services/AWSServerlessApplicationRepository/ServerlessApplicationRepositoryClient.swift +++ b/Sources/Services/AWSServerlessApplicationRepository/ServerlessApplicationRepositoryClient.swift @@ -51,6 +51,35 @@ extension ServerlessApplicationRepositoryClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ServerlessApplicationRepositoryClient.ServerlessApplicationRepositoryClientConfiguration { + let clientConfiguration = try await ServerlessApplicationRepositoryClient.ServerlessApplicationRepositoryClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ServerlessApplicationRepositoryClient { + let configuration = try await resolve(plugins: self.plugins) + return ServerlessApplicationRepositoryClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ServerlessApplicationRepositoryClient.ServerlessApplicationRepositoryClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ServerlessApplicationRepositoryClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSServiceCatalog/ServiceCatalogClient.swift b/Sources/Services/AWSServiceCatalog/ServiceCatalogClient.swift index 26721effe55..4b8b97ecf39 100644 --- a/Sources/Services/AWSServiceCatalog/ServiceCatalogClient.swift +++ b/Sources/Services/AWSServiceCatalog/ServiceCatalogClient.swift @@ -51,6 +51,35 @@ extension ServiceCatalogClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ServiceCatalogClient.ServiceCatalogClientConfiguration { + let clientConfiguration = try await ServiceCatalogClient.ServiceCatalogClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ServiceCatalogClient { + let configuration = try await resolve(plugins: self.plugins) + return ServiceCatalogClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ServiceCatalogClient.ServiceCatalogClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ServiceCatalogClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSServiceCatalogAppRegistry/ServiceCatalogAppRegistryClient.swift b/Sources/Services/AWSServiceCatalogAppRegistry/ServiceCatalogAppRegistryClient.swift index e0d0c2afa1b..e60c0f1d98f 100644 --- a/Sources/Services/AWSServiceCatalogAppRegistry/ServiceCatalogAppRegistryClient.swift +++ b/Sources/Services/AWSServiceCatalogAppRegistry/ServiceCatalogAppRegistryClient.swift @@ -51,6 +51,35 @@ extension ServiceCatalogAppRegistryClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ServiceCatalogAppRegistryClient.ServiceCatalogAppRegistryClientConfiguration { + let clientConfiguration = try await ServiceCatalogAppRegistryClient.ServiceCatalogAppRegistryClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ServiceCatalogAppRegistryClient { + let configuration = try await resolve(plugins: self.plugins) + return ServiceCatalogAppRegistryClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ServiceCatalogAppRegistryClient.ServiceCatalogAppRegistryClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ServiceCatalogAppRegistryClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSServiceDiscovery/ServiceDiscoveryClient.swift b/Sources/Services/AWSServiceDiscovery/ServiceDiscoveryClient.swift index 1cbdea45b63..7b2069c6489 100644 --- a/Sources/Services/AWSServiceDiscovery/ServiceDiscoveryClient.swift +++ b/Sources/Services/AWSServiceDiscovery/ServiceDiscoveryClient.swift @@ -51,6 +51,35 @@ extension ServiceDiscoveryClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ServiceDiscoveryClient.ServiceDiscoveryClientConfiguration { + let clientConfiguration = try await ServiceDiscoveryClient.ServiceDiscoveryClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ServiceDiscoveryClient { + let configuration = try await resolve(plugins: self.plugins) + return ServiceDiscoveryClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ServiceDiscoveryClient.ServiceDiscoveryClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ServiceDiscoveryClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSServiceQuotas/ServiceQuotasClient.swift b/Sources/Services/AWSServiceQuotas/ServiceQuotasClient.swift index b20de03422e..141ed30370e 100644 --- a/Sources/Services/AWSServiceQuotas/ServiceQuotasClient.swift +++ b/Sources/Services/AWSServiceQuotas/ServiceQuotasClient.swift @@ -51,6 +51,35 @@ extension ServiceQuotasClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ServiceQuotasClient.ServiceQuotasClientConfiguration { + let clientConfiguration = try await ServiceQuotasClient.ServiceQuotasClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ServiceQuotasClient { + let configuration = try await resolve(plugins: self.plugins) + return ServiceQuotasClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ServiceQuotasClient.ServiceQuotasClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ServiceQuotasClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSShield/ShieldClient.swift b/Sources/Services/AWSShield/ShieldClient.swift index 57a46f557b4..9088fefa0a0 100644 --- a/Sources/Services/AWSShield/ShieldClient.swift +++ b/Sources/Services/AWSShield/ShieldClient.swift @@ -51,6 +51,35 @@ extension ShieldClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> ShieldClient.ShieldClientConfiguration { + let clientConfiguration = try await ShieldClient.ShieldClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> ShieldClient { + let configuration = try await resolve(plugins: self.plugins) + return ShieldClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension ShieldClient.ShieldClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct ShieldClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSigner/SignerClient.swift b/Sources/Services/AWSSigner/SignerClient.swift index 50a4fbd04b1..441e2edbba8 100644 --- a/Sources/Services/AWSSigner/SignerClient.swift +++ b/Sources/Services/AWSSigner/SignerClient.swift @@ -51,6 +51,35 @@ extension SignerClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SignerClient.SignerClientConfiguration { + let clientConfiguration = try await SignerClient.SignerClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SignerClient { + let configuration = try await resolve(plugins: self.plugins) + return SignerClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SignerClient.SignerClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SignerClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSimSpaceWeaver/SimSpaceWeaverClient.swift b/Sources/Services/AWSSimSpaceWeaver/SimSpaceWeaverClient.swift index a214d989e21..0b8e9a57071 100644 --- a/Sources/Services/AWSSimSpaceWeaver/SimSpaceWeaverClient.swift +++ b/Sources/Services/AWSSimSpaceWeaver/SimSpaceWeaverClient.swift @@ -51,6 +51,35 @@ extension SimSpaceWeaverClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SimSpaceWeaverClient.SimSpaceWeaverClientConfiguration { + let clientConfiguration = try await SimSpaceWeaverClient.SimSpaceWeaverClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SimSpaceWeaverClient { + let configuration = try await resolve(plugins: self.plugins) + return SimSpaceWeaverClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SimSpaceWeaverClient.SimSpaceWeaverClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SimSpaceWeaverClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSnowDeviceManagement/SnowDeviceManagementClient.swift b/Sources/Services/AWSSnowDeviceManagement/SnowDeviceManagementClient.swift index fc2f33e5ebb..67018086743 100644 --- a/Sources/Services/AWSSnowDeviceManagement/SnowDeviceManagementClient.swift +++ b/Sources/Services/AWSSnowDeviceManagement/SnowDeviceManagementClient.swift @@ -51,6 +51,35 @@ extension SnowDeviceManagementClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SnowDeviceManagementClient.SnowDeviceManagementClientConfiguration { + let clientConfiguration = try await SnowDeviceManagementClient.SnowDeviceManagementClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SnowDeviceManagementClient { + let configuration = try await resolve(plugins: self.plugins) + return SnowDeviceManagementClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SnowDeviceManagementClient.SnowDeviceManagementClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SnowDeviceManagementClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSnowball/SnowballClient.swift b/Sources/Services/AWSSnowball/SnowballClient.swift index d06e37ad5d7..56e3761c4f3 100644 --- a/Sources/Services/AWSSnowball/SnowballClient.swift +++ b/Sources/Services/AWSSnowball/SnowballClient.swift @@ -51,6 +51,35 @@ extension SnowballClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SnowballClient.SnowballClientConfiguration { + let clientConfiguration = try await SnowballClient.SnowballClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SnowballClient { + let configuration = try await resolve(plugins: self.plugins) + return SnowballClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SnowballClient.SnowballClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SnowballClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSsmSap/SsmSapClient.swift b/Sources/Services/AWSSsmSap/SsmSapClient.swift index 9fc2b214b13..e15c3a66db4 100644 --- a/Sources/Services/AWSSsmSap/SsmSapClient.swift +++ b/Sources/Services/AWSSsmSap/SsmSapClient.swift @@ -51,6 +51,35 @@ extension SsmSapClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SsmSapClient.SsmSapClientConfiguration { + let clientConfiguration = try await SsmSapClient.SsmSapClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SsmSapClient { + let configuration = try await resolve(plugins: self.plugins) + return SsmSapClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SsmSapClient.SsmSapClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SsmSapClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSStorageGateway/StorageGatewayClient.swift b/Sources/Services/AWSStorageGateway/StorageGatewayClient.swift index efe784dda49..a94626d780f 100644 --- a/Sources/Services/AWSStorageGateway/StorageGatewayClient.swift +++ b/Sources/Services/AWSStorageGateway/StorageGatewayClient.swift @@ -51,6 +51,35 @@ extension StorageGatewayClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> StorageGatewayClient.StorageGatewayClientConfiguration { + let clientConfiguration = try await StorageGatewayClient.StorageGatewayClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> StorageGatewayClient { + let configuration = try await resolve(plugins: self.plugins) + return StorageGatewayClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension StorageGatewayClient.StorageGatewayClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct StorageGatewayClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSupport/SupportClient.swift b/Sources/Services/AWSSupport/SupportClient.swift index bdb86598f00..710a3d416e1 100644 --- a/Sources/Services/AWSSupport/SupportClient.swift +++ b/Sources/Services/AWSSupport/SupportClient.swift @@ -51,6 +51,35 @@ extension SupportClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SupportClient.SupportClientConfiguration { + let clientConfiguration = try await SupportClient.SupportClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SupportClient { + let configuration = try await resolve(plugins: self.plugins) + return SupportClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SupportClient.SupportClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SupportClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSupportApp/SupportAppClient.swift b/Sources/Services/AWSSupportApp/SupportAppClient.swift index 6a74a306024..c4258db2b85 100644 --- a/Sources/Services/AWSSupportApp/SupportAppClient.swift +++ b/Sources/Services/AWSSupportApp/SupportAppClient.swift @@ -51,6 +51,35 @@ extension SupportAppClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SupportAppClient.SupportAppClientConfiguration { + let clientConfiguration = try await SupportAppClient.SupportAppClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SupportAppClient { + let configuration = try await resolve(plugins: self.plugins) + return SupportAppClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SupportAppClient.SupportAppClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SupportAppClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSSynthetics/SyntheticsClient.swift b/Sources/Services/AWSSynthetics/SyntheticsClient.swift index f629f726b12..dba3e9cbf0e 100644 --- a/Sources/Services/AWSSynthetics/SyntheticsClient.swift +++ b/Sources/Services/AWSSynthetics/SyntheticsClient.swift @@ -51,6 +51,35 @@ extension SyntheticsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> SyntheticsClient.SyntheticsClientConfiguration { + let clientConfiguration = try await SyntheticsClient.SyntheticsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> SyntheticsClient { + let configuration = try await resolve(plugins: self.plugins) + return SyntheticsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension SyntheticsClient.SyntheticsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct SyntheticsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSTextract/TextractClient.swift b/Sources/Services/AWSTextract/TextractClient.swift index 42544cf29ff..e231f510a57 100644 --- a/Sources/Services/AWSTextract/TextractClient.swift +++ b/Sources/Services/AWSTextract/TextractClient.swift @@ -51,6 +51,35 @@ extension TextractClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> TextractClient.TextractClientConfiguration { + let clientConfiguration = try await TextractClient.TextractClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> TextractClient { + let configuration = try await resolve(plugins: self.plugins) + return TextractClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension TextractClient.TextractClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct TextractClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSTimestreamQuery/TimestreamQueryClient.swift b/Sources/Services/AWSTimestreamQuery/TimestreamQueryClient.swift index 30271c18ecc..2a37489f8b0 100644 --- a/Sources/Services/AWSTimestreamQuery/TimestreamQueryClient.swift +++ b/Sources/Services/AWSTimestreamQuery/TimestreamQueryClient.swift @@ -51,6 +51,35 @@ extension TimestreamQueryClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> TimestreamQueryClient.TimestreamQueryClientConfiguration { + let clientConfiguration = try await TimestreamQueryClient.TimestreamQueryClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> TimestreamQueryClient { + let configuration = try await resolve(plugins: self.plugins) + return TimestreamQueryClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension TimestreamQueryClient.TimestreamQueryClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct TimestreamQueryClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSTimestreamWrite/TimestreamWriteClient.swift b/Sources/Services/AWSTimestreamWrite/TimestreamWriteClient.swift index 0d9c7304e63..c89c397711f 100644 --- a/Sources/Services/AWSTimestreamWrite/TimestreamWriteClient.swift +++ b/Sources/Services/AWSTimestreamWrite/TimestreamWriteClient.swift @@ -51,6 +51,35 @@ extension TimestreamWriteClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> TimestreamWriteClient.TimestreamWriteClientConfiguration { + let clientConfiguration = try await TimestreamWriteClient.TimestreamWriteClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> TimestreamWriteClient { + let configuration = try await resolve(plugins: self.plugins) + return TimestreamWriteClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension TimestreamWriteClient.TimestreamWriteClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct TimestreamWriteClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSTnb/TnbClient.swift b/Sources/Services/AWSTnb/TnbClient.swift index 7e6360e2c82..31804a2fbba 100644 --- a/Sources/Services/AWSTnb/TnbClient.swift +++ b/Sources/Services/AWSTnb/TnbClient.swift @@ -51,6 +51,35 @@ extension TnbClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> TnbClient.TnbClientConfiguration { + let clientConfiguration = try await TnbClient.TnbClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> TnbClient { + let configuration = try await resolve(plugins: self.plugins) + return TnbClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension TnbClient.TnbClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct TnbClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSTranscribe/TranscribeClient.swift b/Sources/Services/AWSTranscribe/TranscribeClient.swift index 97aa625f12b..d5ddc6fc631 100644 --- a/Sources/Services/AWSTranscribe/TranscribeClient.swift +++ b/Sources/Services/AWSTranscribe/TranscribeClient.swift @@ -51,6 +51,35 @@ extension TranscribeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> TranscribeClient.TranscribeClientConfiguration { + let clientConfiguration = try await TranscribeClient.TranscribeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> TranscribeClient { + let configuration = try await resolve(plugins: self.plugins) + return TranscribeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension TranscribeClient.TranscribeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct TranscribeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSTranscribeStreaming/TranscribeStreamingClient.swift b/Sources/Services/AWSTranscribeStreaming/TranscribeStreamingClient.swift index f6c6bf40306..b972c4a067f 100644 --- a/Sources/Services/AWSTranscribeStreaming/TranscribeStreamingClient.swift +++ b/Sources/Services/AWSTranscribeStreaming/TranscribeStreamingClient.swift @@ -51,6 +51,35 @@ extension TranscribeStreamingClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> TranscribeStreamingClient.TranscribeStreamingClientConfiguration { + let clientConfiguration = try await TranscribeStreamingClient.TranscribeStreamingClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> TranscribeStreamingClient { + let configuration = try await resolve(plugins: self.plugins) + return TranscribeStreamingClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension TranscribeStreamingClient.TranscribeStreamingClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct TranscribeStreamingClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSTransfer/TransferClient.swift b/Sources/Services/AWSTransfer/TransferClient.swift index 14511d578ab..1bd5d36ef2f 100644 --- a/Sources/Services/AWSTransfer/TransferClient.swift +++ b/Sources/Services/AWSTransfer/TransferClient.swift @@ -51,6 +51,35 @@ extension TransferClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> TransferClient.TransferClientConfiguration { + let clientConfiguration = try await TransferClient.TransferClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> TransferClient { + let configuration = try await resolve(plugins: self.plugins) + return TransferClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension TransferClient.TransferClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct TransferClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSTranslate/TranslateClient.swift b/Sources/Services/AWSTranslate/TranslateClient.swift index 2e5862158f7..dcae3f6c705 100644 --- a/Sources/Services/AWSTranslate/TranslateClient.swift +++ b/Sources/Services/AWSTranslate/TranslateClient.swift @@ -51,6 +51,35 @@ extension TranslateClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> TranslateClient.TranslateClientConfiguration { + let clientConfiguration = try await TranslateClient.TranslateClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> TranslateClient { + let configuration = try await resolve(plugins: self.plugins) + return TranslateClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension TranslateClient.TranslateClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct TranslateClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSTrustedAdvisor/TrustedAdvisorClient.swift b/Sources/Services/AWSTrustedAdvisor/TrustedAdvisorClient.swift index 02003c20139..803ecd0df62 100644 --- a/Sources/Services/AWSTrustedAdvisor/TrustedAdvisorClient.swift +++ b/Sources/Services/AWSTrustedAdvisor/TrustedAdvisorClient.swift @@ -51,6 +51,35 @@ extension TrustedAdvisorClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> TrustedAdvisorClient.TrustedAdvisorClientConfiguration { + let clientConfiguration = try await TrustedAdvisorClient.TrustedAdvisorClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> TrustedAdvisorClient { + let configuration = try await resolve(plugins: self.plugins) + return TrustedAdvisorClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension TrustedAdvisorClient.TrustedAdvisorClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct TrustedAdvisorClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSVPCLattice/VPCLatticeClient.swift b/Sources/Services/AWSVPCLattice/VPCLatticeClient.swift index ac62b1db68b..a63f1555ee5 100644 --- a/Sources/Services/AWSVPCLattice/VPCLatticeClient.swift +++ b/Sources/Services/AWSVPCLattice/VPCLatticeClient.swift @@ -51,6 +51,35 @@ extension VPCLatticeClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> VPCLatticeClient.VPCLatticeClientConfiguration { + let clientConfiguration = try await VPCLatticeClient.VPCLatticeClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> VPCLatticeClient { + let configuration = try await resolve(plugins: self.plugins) + return VPCLatticeClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension VPCLatticeClient.VPCLatticeClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct VPCLatticeClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSVerifiedPermissions/VerifiedPermissionsClient.swift b/Sources/Services/AWSVerifiedPermissions/VerifiedPermissionsClient.swift index 7533d1cb352..83faadc8211 100644 --- a/Sources/Services/AWSVerifiedPermissions/VerifiedPermissionsClient.swift +++ b/Sources/Services/AWSVerifiedPermissions/VerifiedPermissionsClient.swift @@ -51,6 +51,35 @@ extension VerifiedPermissionsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> VerifiedPermissionsClient.VerifiedPermissionsClientConfiguration { + let clientConfiguration = try await VerifiedPermissionsClient.VerifiedPermissionsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> VerifiedPermissionsClient { + let configuration = try await resolve(plugins: self.plugins) + return VerifiedPermissionsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension VerifiedPermissionsClient.VerifiedPermissionsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct VerifiedPermissionsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSVoiceID/VoiceIDClient.swift b/Sources/Services/AWSVoiceID/VoiceIDClient.swift index f1b53dc0b5a..bdaddd9b3a1 100644 --- a/Sources/Services/AWSVoiceID/VoiceIDClient.swift +++ b/Sources/Services/AWSVoiceID/VoiceIDClient.swift @@ -51,6 +51,35 @@ extension VoiceIDClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> VoiceIDClient.VoiceIDClientConfiguration { + let clientConfiguration = try await VoiceIDClient.VoiceIDClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> VoiceIDClient { + let configuration = try await resolve(plugins: self.plugins) + return VoiceIDClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension VoiceIDClient.VoiceIDClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct VoiceIDClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSWAF/WAFClient.swift b/Sources/Services/AWSWAF/WAFClient.swift index 5200a0b8180..52540c74428 100644 --- a/Sources/Services/AWSWAF/WAFClient.swift +++ b/Sources/Services/AWSWAF/WAFClient.swift @@ -51,6 +51,35 @@ extension WAFClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> WAFClient.WAFClientConfiguration { + let clientConfiguration = try await WAFClient.WAFClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> WAFClient { + let configuration = try await resolve(plugins: self.plugins) + return WAFClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension WAFClient.WAFClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct WAFClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSWAFRegional/WAFRegionalClient.swift b/Sources/Services/AWSWAFRegional/WAFRegionalClient.swift index bdffd97556e..09fd3b4f404 100644 --- a/Sources/Services/AWSWAFRegional/WAFRegionalClient.swift +++ b/Sources/Services/AWSWAFRegional/WAFRegionalClient.swift @@ -51,6 +51,35 @@ extension WAFRegionalClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> WAFRegionalClient.WAFRegionalClientConfiguration { + let clientConfiguration = try await WAFRegionalClient.WAFRegionalClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> WAFRegionalClient { + let configuration = try await resolve(plugins: self.plugins) + return WAFRegionalClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension WAFRegionalClient.WAFRegionalClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct WAFRegionalClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSWAFV2/WAFV2Client.swift b/Sources/Services/AWSWAFV2/WAFV2Client.swift index 61923681e00..882697cf403 100644 --- a/Sources/Services/AWSWAFV2/WAFV2Client.swift +++ b/Sources/Services/AWSWAFV2/WAFV2Client.swift @@ -51,6 +51,35 @@ extension WAFV2Client { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> WAFV2Client.WAFV2ClientConfiguration { + let clientConfiguration = try await WAFV2Client.WAFV2ClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> WAFV2Client { + let configuration = try await resolve(plugins: self.plugins) + return WAFV2Client(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension WAFV2Client.WAFV2ClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct WAFV2ClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSWellArchitected/WellArchitectedClient.swift b/Sources/Services/AWSWellArchitected/WellArchitectedClient.swift index 5b1bab9d0b8..37154dcadf0 100644 --- a/Sources/Services/AWSWellArchitected/WellArchitectedClient.swift +++ b/Sources/Services/AWSWellArchitected/WellArchitectedClient.swift @@ -51,6 +51,35 @@ extension WellArchitectedClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> WellArchitectedClient.WellArchitectedClientConfiguration { + let clientConfiguration = try await WellArchitectedClient.WellArchitectedClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> WellArchitectedClient { + let configuration = try await resolve(plugins: self.plugins) + return WellArchitectedClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension WellArchitectedClient.WellArchitectedClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct WellArchitectedClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSWisdom/WisdomClient.swift b/Sources/Services/AWSWisdom/WisdomClient.swift index 7821ce71f77..1c6f4e74b7b 100644 --- a/Sources/Services/AWSWisdom/WisdomClient.swift +++ b/Sources/Services/AWSWisdom/WisdomClient.swift @@ -51,6 +51,35 @@ extension WisdomClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> WisdomClient.WisdomClientConfiguration { + let clientConfiguration = try await WisdomClient.WisdomClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> WisdomClient { + let configuration = try await resolve(plugins: self.plugins) + return WisdomClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension WisdomClient.WisdomClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct WisdomClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSWorkDocs/WorkDocsClient.swift b/Sources/Services/AWSWorkDocs/WorkDocsClient.swift index 753f0871fb9..a81aaf30c02 100644 --- a/Sources/Services/AWSWorkDocs/WorkDocsClient.swift +++ b/Sources/Services/AWSWorkDocs/WorkDocsClient.swift @@ -51,6 +51,35 @@ extension WorkDocsClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> WorkDocsClient.WorkDocsClientConfiguration { + let clientConfiguration = try await WorkDocsClient.WorkDocsClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> WorkDocsClient { + let configuration = try await resolve(plugins: self.plugins) + return WorkDocsClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension WorkDocsClient.WorkDocsClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct WorkDocsClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSWorkLink/WorkLinkClient.swift b/Sources/Services/AWSWorkLink/WorkLinkClient.swift index 0984d679397..de4071b20e8 100644 --- a/Sources/Services/AWSWorkLink/WorkLinkClient.swift +++ b/Sources/Services/AWSWorkLink/WorkLinkClient.swift @@ -51,6 +51,35 @@ extension WorkLinkClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> WorkLinkClient.WorkLinkClientConfiguration { + let clientConfiguration = try await WorkLinkClient.WorkLinkClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> WorkLinkClient { + let configuration = try await resolve(plugins: self.plugins) + return WorkLinkClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension WorkLinkClient.WorkLinkClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct WorkLinkClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSWorkMail/WorkMailClient.swift b/Sources/Services/AWSWorkMail/WorkMailClient.swift index 0e2606b5581..a910850a3d3 100644 --- a/Sources/Services/AWSWorkMail/WorkMailClient.swift +++ b/Sources/Services/AWSWorkMail/WorkMailClient.swift @@ -51,6 +51,35 @@ extension WorkMailClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> WorkMailClient.WorkMailClientConfiguration { + let clientConfiguration = try await WorkMailClient.WorkMailClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> WorkMailClient { + let configuration = try await resolve(plugins: self.plugins) + return WorkMailClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension WorkMailClient.WorkMailClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct WorkMailClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSWorkMailMessageFlow/WorkMailMessageFlowClient.swift b/Sources/Services/AWSWorkMailMessageFlow/WorkMailMessageFlowClient.swift index 88b151b4db3..c305fc4de9e 100644 --- a/Sources/Services/AWSWorkMailMessageFlow/WorkMailMessageFlowClient.swift +++ b/Sources/Services/AWSWorkMailMessageFlow/WorkMailMessageFlowClient.swift @@ -51,6 +51,35 @@ extension WorkMailMessageFlowClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> WorkMailMessageFlowClient.WorkMailMessageFlowClientConfiguration { + let clientConfiguration = try await WorkMailMessageFlowClient.WorkMailMessageFlowClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> WorkMailMessageFlowClient { + let configuration = try await resolve(plugins: self.plugins) + return WorkMailMessageFlowClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension WorkMailMessageFlowClient.WorkMailMessageFlowClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct WorkMailMessageFlowClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSWorkSpaces/WorkSpacesClient.swift b/Sources/Services/AWSWorkSpaces/WorkSpacesClient.swift index cb48266c459..5cc7e5c075a 100644 --- a/Sources/Services/AWSWorkSpaces/WorkSpacesClient.swift +++ b/Sources/Services/AWSWorkSpaces/WorkSpacesClient.swift @@ -51,6 +51,35 @@ extension WorkSpacesClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> WorkSpacesClient.WorkSpacesClientConfiguration { + let clientConfiguration = try await WorkSpacesClient.WorkSpacesClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> WorkSpacesClient { + let configuration = try await resolve(plugins: self.plugins) + return WorkSpacesClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension WorkSpacesClient.WorkSpacesClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct WorkSpacesClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSWorkSpacesThinClient/WorkSpacesThinClientClient.swift b/Sources/Services/AWSWorkSpacesThinClient/WorkSpacesThinClientClient.swift index 8f5ae6e3642..46733cc7b22 100644 --- a/Sources/Services/AWSWorkSpacesThinClient/WorkSpacesThinClientClient.swift +++ b/Sources/Services/AWSWorkSpacesThinClient/WorkSpacesThinClientClient.swift @@ -51,6 +51,35 @@ extension WorkSpacesThinClientClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> WorkSpacesThinClientClient.WorkSpacesThinClientClientConfiguration { + let clientConfiguration = try await WorkSpacesThinClientClient.WorkSpacesThinClientClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> WorkSpacesThinClientClient { + let configuration = try await resolve(plugins: self.plugins) + return WorkSpacesThinClientClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension WorkSpacesThinClientClient.WorkSpacesThinClientClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct WorkSpacesThinClientClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSWorkSpacesWeb/WorkSpacesWebClient.swift b/Sources/Services/AWSWorkSpacesWeb/WorkSpacesWebClient.swift index a12a15b343d..e56462fddcd 100644 --- a/Sources/Services/AWSWorkSpacesWeb/WorkSpacesWebClient.swift +++ b/Sources/Services/AWSWorkSpacesWeb/WorkSpacesWebClient.swift @@ -51,6 +51,35 @@ extension WorkSpacesWebClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> WorkSpacesWebClient.WorkSpacesWebClientConfiguration { + let clientConfiguration = try await WorkSpacesWebClient.WorkSpacesWebClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> WorkSpacesWebClient { + let configuration = try await resolve(plugins: self.plugins) + return WorkSpacesWebClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension WorkSpacesWebClient.WorkSpacesWebClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct WorkSpacesWebClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory { diff --git a/Sources/Services/AWSXRay/XRayClient.swift b/Sources/Services/AWSXRay/XRayClient.swift index f5674493b2c..d8598cdb829 100644 --- a/Sources/Services/AWSXRay/XRayClient.swift +++ b/Sources/Services/AWSXRay/XRayClient.swift @@ -51,6 +51,35 @@ extension XRayClient { self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver() } } + + static func resolve(plugins: [any Plugin]) async throws -> XRayClient.XRayClientConfiguration { + let clientConfiguration = try await XRayClient.XRayClientConfiguration() + for plugin in plugins { + try await plugin.configureClient(clientConfiguration: clientConfiguration) + } + return clientConfiguration + } + + public class Builder { + private var plugins: [Plugin] + public init(defaultPlugins: [Plugin] = []) { + self.plugins = defaultPlugins + } + public func withPlugin(plugin: any Plugin) { + self.plugins.append(plugin) + } + public func build() async throws -> XRayClient { + let configuration = try await resolve(plugins: self.plugins) + return XRayClient(config: configuration) + } + } + + public static func builder() -> Builder { + return Builder(defaultPlugins: [DefaultClientPlugin()]) + } +} + +extension XRayClient.XRayClientConfiguration: AwsDefaultClientConfiguration & AwsRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration { } public struct XRayClientLogHandlerFactory: ClientRuntime.SDKLogHandlerFactory {