lib/aws-sdk-translate/endpoints.rb in aws-sdk-translate-1.72.0 vs lib/aws-sdk-translate/endpoints.rb in aws-sdk-translate-1.73.0

- old
+ new

@@ -12,269 +12,212 @@ # @api private module Endpoints class CreateParallelData def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class DeleteParallelData def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class DeleteTerminology def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class DescribeTextTranslationJob def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class GetParallelData def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class GetTerminology def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class ImportTerminology def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class ListLanguages def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class ListParallelData def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class ListTagsForResource def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class ListTerminologies def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class ListTextTranslationJobs def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class StartTextTranslationJob def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class StopTextTranslationJob def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class TagResource def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class TranslateDocument def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class TranslateText def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class UntagResource def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end class UpdateParallelData def self.build(context) - unless context.config.regional_endpoint - endpoint = context.config.endpoint.to_s - end Aws::Translate::EndpointParameters.new( region: context.config.region, use_dual_stack: context.config.use_dualstack_endpoint, use_fips: context.config.use_fips_endpoint, - endpoint: endpoint, + endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s, ) end end end