Skip to content

Commit

Permalink
fix rfc paths for smithy clients
Browse files Browse the repository at this point in the history
  • Loading branch information
sbera87 committed Jan 8, 2025
1 parent 22c5b10 commit 9c042fa
Show file tree
Hide file tree
Showing 17 changed files with 1,133 additions and 2,985 deletions.
690 changes: 169 additions & 521 deletions generated/src/aws-cpp-sdk-appconfig/source/AppConfigClient.cpp

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,8 @@ GetLatestConfigurationOutcome AppConfigDataClient::GetLatestConfiguration(const
smithy::components::tracing::SpanKind::CLIENT);
return TracingUtils::MakeCallWithTiming<GetLatestConfigurationOutcome>(
[&]()-> GetLatestConfigurationOutcome {
Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides;
endpointOverrides.AddPathSegment("/configuration");
return GetLatestConfigurationOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [& , endpointOverrides ](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
for(const auto& pathSegment : endpointOverrides.pathSegments)
{
resolvedEndpoint.AddPathSegment(pathSegment);
}
resolvedEndpoint.SetRfc3986Encoded(endpointOverrides.setRfc3986Encoded);
resolvedEndpoint.SetQueryString(endpointOverrides.queryString);
AWS_UNREFERENCED_PARAM(resolvedEndpoint);
return GetLatestConfigurationOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
resolvedEndpoint.AddPathSegments("/configuration");
}));
},
TracingUtils::SMITHY_CLIENT_DURATION_METRIC,
Expand All @@ -220,16 +212,8 @@ StartConfigurationSessionOutcome AppConfigDataClient::StartConfigurationSession(
smithy::components::tracing::SpanKind::CLIENT);
return TracingUtils::MakeCallWithTiming<StartConfigurationSessionOutcome>(
[&]()-> StartConfigurationSessionOutcome {
Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides;
endpointOverrides.AddPathSegment("/configurationsessions");
return StartConfigurationSessionOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [& , endpointOverrides ](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
for(const auto& pathSegment : endpointOverrides.pathSegments)
{
resolvedEndpoint.AddPathSegment(pathSegment);
}
resolvedEndpoint.SetRfc3986Encoded(endpointOverrides.setRfc3986Encoded);
resolvedEndpoint.SetQueryString(endpointOverrides.queryString);
AWS_UNREFERENCED_PARAM(resolvedEndpoint);
return StartConfigurationSessionOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
resolvedEndpoint.AddPathSegments("/configurationsessions");
}));
},
TracingUtils::SMITHY_CLIENT_DURATION_METRIC,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,20 +202,12 @@ ApplyGuardrailOutcome BedrockRuntimeClient::ApplyGuardrail(const ApplyGuardrailR
smithy::components::tracing::SpanKind::CLIENT);
return TracingUtils::MakeCallWithTiming<ApplyGuardrailOutcome>(
[&]()-> ApplyGuardrailOutcome {
Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides;
endpointOverrides.AddPathSegment("/guardrail/");
endpointOverrides.AddPathSegment(request.GetGuardrailIdentifier());
endpointOverrides.AddPathSegment("/version/");
endpointOverrides.AddPathSegment(request.GetGuardrailVersion());
endpointOverrides.AddPathSegment("/apply");
return ApplyGuardrailOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [& , endpointOverrides ](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
for(const auto& pathSegment : endpointOverrides.pathSegments)
{
resolvedEndpoint.AddPathSegment(pathSegment);
}
resolvedEndpoint.SetRfc3986Encoded(endpointOverrides.setRfc3986Encoded);
resolvedEndpoint.SetQueryString(endpointOverrides.queryString);
AWS_UNREFERENCED_PARAM(resolvedEndpoint);
return ApplyGuardrailOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
resolvedEndpoint.AddPathSegments("/guardrail/");
resolvedEndpoint.AddPathSegment(request.GetGuardrailIdentifier());
resolvedEndpoint.AddPathSegments("/version/");
resolvedEndpoint.AddPathSegment(request.GetGuardrailVersion());
resolvedEndpoint.AddPathSegments("/apply");
}));
},
TracingUtils::SMITHY_CLIENT_DURATION_METRIC,
Expand All @@ -241,18 +233,10 @@ ConverseOutcome BedrockRuntimeClient::Converse(const ConverseRequest& request) c
smithy::components::tracing::SpanKind::CLIENT);
return TracingUtils::MakeCallWithTiming<ConverseOutcome>(
[&]()-> ConverseOutcome {
Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides;
endpointOverrides.AddPathSegment("/model/");
endpointOverrides.AddPathSegment(request.GetModelId());
endpointOverrides.AddPathSegment("/converse");
return ConverseOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [& , endpointOverrides ](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
for(const auto& pathSegment : endpointOverrides.pathSegments)
{
resolvedEndpoint.AddPathSegment(pathSegment);
}
resolvedEndpoint.SetRfc3986Encoded(endpointOverrides.setRfc3986Encoded);
resolvedEndpoint.SetQueryString(endpointOverrides.queryString);
AWS_UNREFERENCED_PARAM(resolvedEndpoint);
return ConverseOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
resolvedEndpoint.AddPathSegments("/model/");
resolvedEndpoint.AddPathSegment(request.GetModelId());
resolvedEndpoint.AddPathSegments("/converse");
}));
},
TracingUtils::SMITHY_CLIENT_DURATION_METRIC,
Expand All @@ -278,21 +262,13 @@ ConverseStreamOutcome BedrockRuntimeClient::ConverseStream(ConverseStreamRequest
smithy::components::tracing::SpanKind::CLIENT);
return TracingUtils::MakeCallWithTiming<ConverseStreamOutcome>(
[&]()-> ConverseStreamOutcome {
Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides;
endpointOverrides.AddPathSegment("/model/");
endpointOverrides.AddPathSegment(request.GetModelId());
endpointOverrides.AddPathSegment("/converse-stream");
request.SetResponseStreamFactory(
[&] { request.GetEventStreamDecoder().Reset(); return Aws::New<Aws::Utils::Event::EventDecoderStream>(ALLOCATION_TAG, request.GetEventStreamDecoder()); }
);
return ConverseStreamOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [& , endpointOverrides ](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
for(const auto& pathSegment : endpointOverrides.pathSegments)
{
resolvedEndpoint.AddPathSegment(pathSegment);
}
resolvedEndpoint.SetRfc3986Encoded(endpointOverrides.setRfc3986Encoded);
resolvedEndpoint.SetQueryString(endpointOverrides.queryString);
AWS_UNREFERENCED_PARAM(resolvedEndpoint);
return ConverseStreamOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
resolvedEndpoint.AddPathSegments("/model/");
resolvedEndpoint.AddPathSegment(request.GetModelId());
resolvedEndpoint.AddPathSegments("/converse-stream");
}));
},
TracingUtils::SMITHY_CLIENT_DURATION_METRIC,
Expand All @@ -318,17 +294,9 @@ GetAsyncInvokeOutcome BedrockRuntimeClient::GetAsyncInvoke(const GetAsyncInvokeR
smithy::components::tracing::SpanKind::CLIENT);
return TracingUtils::MakeCallWithTiming<GetAsyncInvokeOutcome>(
[&]()-> GetAsyncInvokeOutcome {
Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides;
endpointOverrides.AddPathSegment("/async-invoke/");
endpointOverrides.AddPathSegment(request.GetInvocationArn());
return GetAsyncInvokeOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [& , endpointOverrides ](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
for(const auto& pathSegment : endpointOverrides.pathSegments)
{
resolvedEndpoint.AddPathSegment(pathSegment);
}
resolvedEndpoint.SetRfc3986Encoded(endpointOverrides.setRfc3986Encoded);
resolvedEndpoint.SetQueryString(endpointOverrides.queryString);
AWS_UNREFERENCED_PARAM(resolvedEndpoint);
return GetAsyncInvokeOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
resolvedEndpoint.AddPathSegments("/async-invoke/");
resolvedEndpoint.AddPathSegment(request.GetInvocationArn());
}));
},
TracingUtils::SMITHY_CLIENT_DURATION_METRIC,
Expand All @@ -354,18 +322,10 @@ InvokeModelOutcome BedrockRuntimeClient::InvokeModel(const InvokeModelRequest& r
smithy::components::tracing::SpanKind::CLIENT);
return TracingUtils::MakeCallWithTiming<InvokeModelOutcome>(
[&]()-> InvokeModelOutcome {
Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides;
endpointOverrides.AddPathSegment("/model/");
endpointOverrides.AddPathSegment(request.GetModelId());
endpointOverrides.AddPathSegment("/invoke");
return InvokeModelOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [& , endpointOverrides ](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
for(const auto& pathSegment : endpointOverrides.pathSegments)
{
resolvedEndpoint.AddPathSegment(pathSegment);
}
resolvedEndpoint.SetRfc3986Encoded(endpointOverrides.setRfc3986Encoded);
resolvedEndpoint.SetQueryString(endpointOverrides.queryString);
AWS_UNREFERENCED_PARAM(resolvedEndpoint);
return InvokeModelOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
resolvedEndpoint.AddPathSegments("/model/");
resolvedEndpoint.AddPathSegment(request.GetModelId());
resolvedEndpoint.AddPathSegments("/invoke");
}));
},
TracingUtils::SMITHY_CLIENT_DURATION_METRIC,
Expand All @@ -391,21 +351,13 @@ InvokeModelWithResponseStreamOutcome BedrockRuntimeClient::InvokeModelWithRespon
smithy::components::tracing::SpanKind::CLIENT);
return TracingUtils::MakeCallWithTiming<InvokeModelWithResponseStreamOutcome>(
[&]()-> InvokeModelWithResponseStreamOutcome {
Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides;
endpointOverrides.AddPathSegment("/model/");
endpointOverrides.AddPathSegment(request.GetModelId());
endpointOverrides.AddPathSegment("/invoke-with-response-stream");
request.SetResponseStreamFactory(
[&] { request.GetEventStreamDecoder().Reset(); return Aws::New<Aws::Utils::Event::EventDecoderStream>(ALLOCATION_TAG, request.GetEventStreamDecoder()); }
);
return InvokeModelWithResponseStreamOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [& , endpointOverrides ](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
for(const auto& pathSegment : endpointOverrides.pathSegments)
{
resolvedEndpoint.AddPathSegment(pathSegment);
}
resolvedEndpoint.SetRfc3986Encoded(endpointOverrides.setRfc3986Encoded);
resolvedEndpoint.SetQueryString(endpointOverrides.queryString);
AWS_UNREFERENCED_PARAM(resolvedEndpoint);
return InvokeModelWithResponseStreamOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
resolvedEndpoint.AddPathSegments("/model/");
resolvedEndpoint.AddPathSegment(request.GetModelId());
resolvedEndpoint.AddPathSegments("/invoke-with-response-stream");
}));
},
TracingUtils::SMITHY_CLIENT_DURATION_METRIC,
Expand All @@ -426,16 +378,8 @@ ListAsyncInvokesOutcome BedrockRuntimeClient::ListAsyncInvokes(const ListAsyncIn
smithy::components::tracing::SpanKind::CLIENT);
return TracingUtils::MakeCallWithTiming<ListAsyncInvokesOutcome>(
[&]()-> ListAsyncInvokesOutcome {
Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides;
endpointOverrides.AddPathSegment("/async-invoke");
return ListAsyncInvokesOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [& , endpointOverrides ](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
for(const auto& pathSegment : endpointOverrides.pathSegments)
{
resolvedEndpoint.AddPathSegment(pathSegment);
}
resolvedEndpoint.SetRfc3986Encoded(endpointOverrides.setRfc3986Encoded);
resolvedEndpoint.SetQueryString(endpointOverrides.queryString);
AWS_UNREFERENCED_PARAM(resolvedEndpoint);
return ListAsyncInvokesOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
resolvedEndpoint.AddPathSegments("/async-invoke");
}));
},
TracingUtils::SMITHY_CLIENT_DURATION_METRIC,
Expand All @@ -456,16 +400,8 @@ StartAsyncInvokeOutcome BedrockRuntimeClient::StartAsyncInvoke(const StartAsyncI
smithy::components::tracing::SpanKind::CLIENT);
return TracingUtils::MakeCallWithTiming<StartAsyncInvokeOutcome>(
[&]()-> StartAsyncInvokeOutcome {
Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides;
endpointOverrides.AddPathSegment("/async-invoke");
return StartAsyncInvokeOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [& , endpointOverrides ](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
for(const auto& pathSegment : endpointOverrides.pathSegments)
{
resolvedEndpoint.AddPathSegment(pathSegment);
}
resolvedEndpoint.SetRfc3986Encoded(endpointOverrides.setRfc3986Encoded);
resolvedEndpoint.SetQueryString(endpointOverrides.queryString);
AWS_UNREFERENCED_PARAM(resolvedEndpoint);
return StartAsyncInvokeOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void {
resolvedEndpoint.AddPathSegments("/async-invoke");
}));
},
TracingUtils::SMITHY_CLIENT_DURATION_METRIC,
Expand Down
Loading

0 comments on commit 9c042fa

Please sign in to comment.