@@ -146,153 +146,63 @@ void BedrockDataAutomationRuntimeClient::OverrideEndpoint(const Aws::String& end
146146 m_clientConfiguration.endpointOverride = endpoint;
147147 m_endpointProvider->OverrideEndpoint (endpoint);
148148}
149- GetDataAutomationStatusOutcome BedrockDataAutomationRuntimeClient::GetDataAutomationStatus (
150- const GetDataAutomationStatusRequest& request) const {
151- AWS_OPERATION_GUARD (GetDataAutomationStatus);
152- AWS_OPERATION_CHECK_PTR (m_endpointProvider, GetDataAutomationStatus, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE);
153- AWS_OPERATION_CHECK_PTR (m_clientConfiguration.telemetryProvider , GetDataAutomationStatus, CoreErrors, CoreErrors::NOT_INITIALIZED);
154- auto tracer = m_clientConfiguration.telemetryProvider ->getTracer (this ->GetServiceClientName (), {});
155- auto meter = m_clientConfiguration.telemetryProvider ->getMeter (this ->GetServiceClientName (), {});
156- AWS_OPERATION_CHECK_PTR (meter, GetDataAutomationStatus, CoreErrors, CoreErrors::NOT_INITIALIZED);
157- auto span = tracer->CreateSpan (Aws::String (this ->GetServiceClientName ()) + " .GetDataAutomationStatus" ,
158- {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName ()},
159- {TracingUtils::SMITHY_SERVICE_DIMENSION, this ->GetServiceClientName ()},
149+ BedrockDataAutomationRuntimeClient::InvokeOperationOutcome BedrockDataAutomationRuntimeClient::InvokeServiceOperation (
150+ const AmazonWebServiceRequest& request, Aws::Http::HttpMethod httpMethod) const {
151+ auto operationName = request.GetServiceRequestName ();
152+ auto serviceName = GetServiceClientName ();
153+
154+ AWS_OPERATION_GUARD_DYNAMIC (operationName);
155+
156+ AWS_OPERATION_CHECK_PTR_DYNAMIC (m_clientConfiguration.telemetryProvider , operationName, CoreErrors, CoreErrors::NOT_INITIALIZED);
157+
158+ auto tracer = m_clientConfiguration.telemetryProvider ->getTracer (serviceName, {});
159+ auto meter = m_clientConfiguration.telemetryProvider ->getMeter (serviceName, {});
160+ AWS_OPERATION_CHECK_PTR_DYNAMIC (meter, operationName, CoreErrors, CoreErrors::NOT_INITIALIZED);
161+
162+ auto span = tracer->CreateSpan (Aws::String (serviceName) + " ." + operationName,
163+ {{TracingUtils::SMITHY_METHOD_DIMENSION, operationName},
164+ {TracingUtils::SMITHY_SERVICE_DIMENSION, serviceName},
160165 {TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE}},
161166 smithy::components::tracing::SpanKind::CLIENT);
162- return TracingUtils::MakeCallWithTiming<GetDataAutomationStatusOutcome>(
163- [&]() -> GetDataAutomationStatusOutcome {
167+
168+ return TracingUtils::MakeCallWithTiming<InvokeOperationOutcome>(
169+ [&]() -> InvokeOperationOutcome {
164170 auto result =
165- MakeRequestDeserialize (&request, request. GetServiceRequestName (), Aws::Http::HttpMethod::HTTP_POST ,
171+ MakeRequestDeserialize (&request, operationName, httpMethod ,
166172 [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { AWS_UNREFERENCED_PARAM (resolvedEndpoint); });
167- return result.IsSuccess () ? GetDataAutomationStatusOutcome (result.GetResultWithOwnership ())
168- : GetDataAutomationStatusOutcome (std::move (result.GetError ()));
173+ return result.IsSuccess () ? InvokeOperationOutcome (result.GetResultWithOwnership ())
174+ : InvokeOperationOutcome (std::move (result.GetError ()));
169175 },
170176 TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter,
171- {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName ()},
172- {TracingUtils::SMITHY_SERVICE_DIMENSION, this ->GetServiceClientName ()}});
177+ {{TracingUtils::SMITHY_METHOD_DIMENSION, operationName}, {TracingUtils::SMITHY_SERVICE_DIMENSION, serviceName}});
178+ }
179+ GetDataAutomationStatusOutcome BedrockDataAutomationRuntimeClient::GetDataAutomationStatus (
180+ const GetDataAutomationStatusRequest& request) const {
181+ auto result = InvokeServiceOperation (request, Aws::Http::HttpMethod::HTTP_POST);
182+ return result.IsSuccess () ? GetDataAutomationStatusOutcome (result.GetResultWithOwnership ())
183+ : GetDataAutomationStatusOutcome (std::move (result.GetError ()));
173184}
174-
175185InvokeDataAutomationOutcome BedrockDataAutomationRuntimeClient::InvokeDataAutomation (const InvokeDataAutomationRequest& request) const {
176- AWS_OPERATION_GUARD (InvokeDataAutomation);
177- AWS_OPERATION_CHECK_PTR (m_endpointProvider, InvokeDataAutomation, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE);
178- AWS_OPERATION_CHECK_PTR (m_clientConfiguration.telemetryProvider , InvokeDataAutomation, CoreErrors, CoreErrors::NOT_INITIALIZED);
179- auto tracer = m_clientConfiguration.telemetryProvider ->getTracer (this ->GetServiceClientName (), {});
180- auto meter = m_clientConfiguration.telemetryProvider ->getMeter (this ->GetServiceClientName (), {});
181- AWS_OPERATION_CHECK_PTR (meter, InvokeDataAutomation, CoreErrors, CoreErrors::NOT_INITIALIZED);
182- auto span = tracer->CreateSpan (Aws::String (this ->GetServiceClientName ()) + " .InvokeDataAutomation" ,
183- {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName ()},
184- {TracingUtils::SMITHY_SERVICE_DIMENSION, this ->GetServiceClientName ()},
185- {TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE}},
186- smithy::components::tracing::SpanKind::CLIENT);
187- return TracingUtils::MakeCallWithTiming<InvokeDataAutomationOutcome>(
188- [&]() -> InvokeDataAutomationOutcome {
189- auto result =
190- MakeRequestDeserialize (&request, request.GetServiceRequestName (), Aws::Http::HttpMethod::HTTP_POST,
191- [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { AWS_UNREFERENCED_PARAM (resolvedEndpoint); });
192- return result.IsSuccess () ? InvokeDataAutomationOutcome (result.GetResultWithOwnership ())
193- : InvokeDataAutomationOutcome (std::move (result.GetError ()));
194- },
195- TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter,
196- {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName ()},
197- {TracingUtils::SMITHY_SERVICE_DIMENSION, this ->GetServiceClientName ()}});
186+ auto result = InvokeServiceOperation (request, Aws::Http::HttpMethod::HTTP_POST);
187+ return result.IsSuccess () ? InvokeDataAutomationOutcome (result.GetResultWithOwnership ())
188+ : InvokeDataAutomationOutcome (std::move (result.GetError ()));
198189}
199-
200190InvokeDataAutomationAsyncOutcome BedrockDataAutomationRuntimeClient::InvokeDataAutomationAsync (
201191 const InvokeDataAutomationAsyncRequest& request) const {
202- AWS_OPERATION_GUARD (InvokeDataAutomationAsync);
203- AWS_OPERATION_CHECK_PTR (m_endpointProvider, InvokeDataAutomationAsync, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE);
204- AWS_OPERATION_CHECK_PTR (m_clientConfiguration.telemetryProvider , InvokeDataAutomationAsync, CoreErrors, CoreErrors::NOT_INITIALIZED);
205- auto tracer = m_clientConfiguration.telemetryProvider ->getTracer (this ->GetServiceClientName (), {});
206- auto meter = m_clientConfiguration.telemetryProvider ->getMeter (this ->GetServiceClientName (), {});
207- AWS_OPERATION_CHECK_PTR (meter, InvokeDataAutomationAsync, CoreErrors, CoreErrors::NOT_INITIALIZED);
208- auto span = tracer->CreateSpan (Aws::String (this ->GetServiceClientName ()) + " .InvokeDataAutomationAsync" ,
209- {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName ()},
210- {TracingUtils::SMITHY_SERVICE_DIMENSION, this ->GetServiceClientName ()},
211- {TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE}},
212- smithy::components::tracing::SpanKind::CLIENT);
213- return TracingUtils::MakeCallWithTiming<InvokeDataAutomationAsyncOutcome>(
214- [&]() -> InvokeDataAutomationAsyncOutcome {
215- auto result =
216- MakeRequestDeserialize (&request, request.GetServiceRequestName (), Aws::Http::HttpMethod::HTTP_POST,
217- [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { AWS_UNREFERENCED_PARAM (resolvedEndpoint); });
218- return result.IsSuccess () ? InvokeDataAutomationAsyncOutcome (result.GetResultWithOwnership ())
219- : InvokeDataAutomationAsyncOutcome (std::move (result.GetError ()));
220- },
221- TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter,
222- {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName ()},
223- {TracingUtils::SMITHY_SERVICE_DIMENSION, this ->GetServiceClientName ()}});
192+ auto result = InvokeServiceOperation (request, Aws::Http::HttpMethod::HTTP_POST);
193+ return result.IsSuccess () ? InvokeDataAutomationAsyncOutcome (result.GetResultWithOwnership ())
194+ : InvokeDataAutomationAsyncOutcome (std::move (result.GetError ()));
224195}
225-
226196ListTagsForResourceOutcome BedrockDataAutomationRuntimeClient::ListTagsForResource (const ListTagsForResourceRequest& request) const {
227- AWS_OPERATION_GUARD (ListTagsForResource);
228- AWS_OPERATION_CHECK_PTR (m_endpointProvider, ListTagsForResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE);
229- AWS_OPERATION_CHECK_PTR (m_clientConfiguration.telemetryProvider , ListTagsForResource, CoreErrors, CoreErrors::NOT_INITIALIZED);
230- auto tracer = m_clientConfiguration.telemetryProvider ->getTracer (this ->GetServiceClientName (), {});
231- auto meter = m_clientConfiguration.telemetryProvider ->getMeter (this ->GetServiceClientName (), {});
232- AWS_OPERATION_CHECK_PTR (meter, ListTagsForResource, CoreErrors, CoreErrors::NOT_INITIALIZED);
233- auto span = tracer->CreateSpan (Aws::String (this ->GetServiceClientName ()) + " .ListTagsForResource" ,
234- {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName ()},
235- {TracingUtils::SMITHY_SERVICE_DIMENSION, this ->GetServiceClientName ()},
236- {TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE}},
237- smithy::components::tracing::SpanKind::CLIENT);
238- return TracingUtils::MakeCallWithTiming<ListTagsForResourceOutcome>(
239- [&]() -> ListTagsForResourceOutcome {
240- auto result =
241- MakeRequestDeserialize (&request, request.GetServiceRequestName (), Aws::Http::HttpMethod::HTTP_POST,
242- [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { AWS_UNREFERENCED_PARAM (resolvedEndpoint); });
243- return result.IsSuccess () ? ListTagsForResourceOutcome (result.GetResultWithOwnership ())
244- : ListTagsForResourceOutcome (std::move (result.GetError ()));
245- },
246- TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter,
247- {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName ()},
248- {TracingUtils::SMITHY_SERVICE_DIMENSION, this ->GetServiceClientName ()}});
197+ auto result = InvokeServiceOperation (request, Aws::Http::HttpMethod::HTTP_POST);
198+ return result.IsSuccess () ? ListTagsForResourceOutcome (result.GetResultWithOwnership ())
199+ : ListTagsForResourceOutcome (std::move (result.GetError ()));
249200}
250-
251201TagResourceOutcome BedrockDataAutomationRuntimeClient::TagResource (const TagResourceRequest& request) const {
252- AWS_OPERATION_GUARD (TagResource);
253- AWS_OPERATION_CHECK_PTR (m_endpointProvider, TagResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE);
254- AWS_OPERATION_CHECK_PTR (m_clientConfiguration.telemetryProvider , TagResource, CoreErrors, CoreErrors::NOT_INITIALIZED);
255- auto tracer = m_clientConfiguration.telemetryProvider ->getTracer (this ->GetServiceClientName (), {});
256- auto meter = m_clientConfiguration.telemetryProvider ->getMeter (this ->GetServiceClientName (), {});
257- AWS_OPERATION_CHECK_PTR (meter, TagResource, CoreErrors, CoreErrors::NOT_INITIALIZED);
258- auto span = tracer->CreateSpan (Aws::String (this ->GetServiceClientName ()) + " .TagResource" ,
259- {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName ()},
260- {TracingUtils::SMITHY_SERVICE_DIMENSION, this ->GetServiceClientName ()},
261- {TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE}},
262- smithy::components::tracing::SpanKind::CLIENT);
263- return TracingUtils::MakeCallWithTiming<TagResourceOutcome>(
264- [&]() -> TagResourceOutcome {
265- auto result =
266- MakeRequestDeserialize (&request, request.GetServiceRequestName (), Aws::Http::HttpMethod::HTTP_POST,
267- [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { AWS_UNREFERENCED_PARAM (resolvedEndpoint); });
268- return result.IsSuccess () ? TagResourceOutcome (result.GetResultWithOwnership ()) : TagResourceOutcome (std::move (result.GetError ()));
269- },
270- TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter,
271- {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName ()},
272- {TracingUtils::SMITHY_SERVICE_DIMENSION, this ->GetServiceClientName ()}});
202+ auto result = InvokeServiceOperation (request, Aws::Http::HttpMethod::HTTP_POST);
203+ return result.IsSuccess () ? TagResourceOutcome (result.GetResultWithOwnership ()) : TagResourceOutcome (std::move (result.GetError ()));
273204}
274-
275205UntagResourceOutcome BedrockDataAutomationRuntimeClient::UntagResource (const UntagResourceRequest& request) const {
276- AWS_OPERATION_GUARD (UntagResource);
277- AWS_OPERATION_CHECK_PTR (m_endpointProvider, UntagResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE);
278- AWS_OPERATION_CHECK_PTR (m_clientConfiguration.telemetryProvider , UntagResource, CoreErrors, CoreErrors::NOT_INITIALIZED);
279- auto tracer = m_clientConfiguration.telemetryProvider ->getTracer (this ->GetServiceClientName (), {});
280- auto meter = m_clientConfiguration.telemetryProvider ->getMeter (this ->GetServiceClientName (), {});
281- AWS_OPERATION_CHECK_PTR (meter, UntagResource, CoreErrors, CoreErrors::NOT_INITIALIZED);
282- auto span = tracer->CreateSpan (Aws::String (this ->GetServiceClientName ()) + " .UntagResource" ,
283- {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName ()},
284- {TracingUtils::SMITHY_SERVICE_DIMENSION, this ->GetServiceClientName ()},
285- {TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE}},
286- smithy::components::tracing::SpanKind::CLIENT);
287- return TracingUtils::MakeCallWithTiming<UntagResourceOutcome>(
288- [&]() -> UntagResourceOutcome {
289- auto result =
290- MakeRequestDeserialize (&request, request.GetServiceRequestName (), Aws::Http::HttpMethod::HTTP_POST,
291- [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { AWS_UNREFERENCED_PARAM (resolvedEndpoint); });
292- return result.IsSuccess () ? UntagResourceOutcome (result.GetResultWithOwnership ())
293- : UntagResourceOutcome (std::move (result.GetError ()));
294- },
295- TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter,
296- {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName ()},
297- {TracingUtils::SMITHY_SERVICE_DIMENSION, this ->GetServiceClientName ()}});
206+ auto result = InvokeServiceOperation (request, Aws::Http::HttpMethod::HTTP_POST);
207+ return result.IsSuccess () ? UntagResourceOutcome (result.GetResultWithOwnership ()) : UntagResourceOutcome (std::move (result.GetError ()));
298208}
0 commit comments