Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add empty requests for apis without input for rest-json services #2738

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <aws/core/client/AWSClientAsyncCRTP.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/backup/BackupServiceClientModel.h>
#include <aws/backup/model/GetSupportedResourceTypesRequest.h>

namespace Aws
{
Expand Down Expand Up @@ -1151,25 +1152,26 @@ namespace Backup
* href="http://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetSupportedResourceTypes">AWS
* API Reference</a></p>
*/
virtual Model::GetSupportedResourceTypesOutcome GetSupportedResourceTypes() const;
virtual Model::GetSupportedResourceTypesOutcome GetSupportedResourceTypes(const Model::GetSupportedResourceTypesRequest& request = {}) const;

/**
* A Callable wrapper for GetSupportedResourceTypes that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template<typename = void>
Model::GetSupportedResourceTypesOutcomeCallable GetSupportedResourceTypesCallable() const
template<typename GetSupportedResourceTypesRequestT = Model::GetSupportedResourceTypesRequest>
Model::GetSupportedResourceTypesOutcomeCallable GetSupportedResourceTypesCallable(const GetSupportedResourceTypesRequestT& request = {}) const
{
return SubmitCallable(&BackupClient::GetSupportedResourceTypes);
return SubmitCallable(&BackupClient::GetSupportedResourceTypes, request);
}

/**
* An Async wrapper for GetSupportedResourceTypes that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template<typename = void>
void GetSupportedResourceTypesAsync(const GetSupportedResourceTypesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const
template<typename GetSupportedResourceTypesRequestT = Model::GetSupportedResourceTypesRequest>
void GetSupportedResourceTypesAsync(const GetSupportedResourceTypesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr, const GetSupportedResourceTypesRequestT& request = {}) const
{
return SubmitAsync(&BackupClient::GetSupportedResourceTypes, handler, context);
return SubmitAsync(&BackupClient::GetSupportedResourceTypes, request, handler, context);
}

/**
* <p>Returns a list of existing backup jobs for an authenticated account for the
* last 30 days. For a longer period of time, consider using these <a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ namespace Aws
class GetBackupVaultNotificationsRequest;
class GetLegalHoldRequest;
class GetRecoveryPointRestoreMetadataRequest;
class GetSupportedResourceTypesRequest;
class ListBackupJobsRequest;
class ListBackupPlanTemplatesRequest;
class ListBackupPlanVersionsRequest;
Expand Down Expand Up @@ -387,7 +388,7 @@ namespace Aws
typedef std::function<void(const BackupClient*, const Model::GetBackupVaultNotificationsRequest&, const Model::GetBackupVaultNotificationsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetBackupVaultNotificationsResponseReceivedHandler;
typedef std::function<void(const BackupClient*, const Model::GetLegalHoldRequest&, const Model::GetLegalHoldOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetLegalHoldResponseReceivedHandler;
typedef std::function<void(const BackupClient*, const Model::GetRecoveryPointRestoreMetadataRequest&, const Model::GetRecoveryPointRestoreMetadataOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetRecoveryPointRestoreMetadataResponseReceivedHandler;
typedef std::function<void(const BackupClient*, const Model::GetSupportedResourceTypesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetSupportedResourceTypesResponseReceivedHandler;
typedef std::function<void(const BackupClient*, const Model::GetSupportedResourceTypesRequest&, const Model::GetSupportedResourceTypesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetSupportedResourceTypesResponseReceivedHandler;
typedef std::function<void(const BackupClient*, const Model::ListBackupJobsRequest&, const Model::ListBackupJobsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListBackupJobsResponseReceivedHandler;
typedef std::function<void(const BackupClient*, const Model::ListBackupPlanTemplatesRequest&, const Model::ListBackupPlanTemplatesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListBackupPlanTemplatesResponseReceivedHandler;
typedef std::function<void(const BackupClient*, const Model::ListBackupPlanVersionsRequest&, const Model::ListBackupPlanVersionsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListBackupPlanVersionsResponseReceivedHandler;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

#pragma once
#include <aws/backup/Backup_EXPORTS.h>
#include <aws/backup/BackupRequest.h>

namespace Aws
{
namespace Backup
{
namespace Model
{

/**
*/
class GetSupportedResourceTypesRequest : public BackupRequest
{
public:
AWS_BACKUP_API GetSupportedResourceTypesRequest();

// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "GetSupportedResourceTypes"; }

AWS_BACKUP_API Aws::String SerializePayload() const override;

};

} // namespace Model
} // namespace Backup
} // namespace Aws
27 changes: 13 additions & 14 deletions generated/src/aws-cpp-sdk-backup/source/BackupClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#include <aws/backup/model/GetBackupVaultNotificationsRequest.h>
#include <aws/backup/model/GetLegalHoldRequest.h>
#include <aws/backup/model/GetRecoveryPointRestoreMetadataRequest.h>
#include <aws/backup/model/GetSupportedResourceTypesRequest.h>
#include <aws/backup/model/ListBackupJobsRequest.h>
#include <aws/backup/model/ListBackupPlanTemplatesRequest.h>
#include <aws/backup/model/ListBackupPlanVersionsRequest.h>
Expand Down Expand Up @@ -1537,33 +1538,31 @@ GetRecoveryPointRestoreMetadataOutcome BackupClient::GetRecoveryPointRestoreMeta
{{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
}

GetSupportedResourceTypesOutcome BackupClient::GetSupportedResourceTypes() const
GetSupportedResourceTypesOutcome BackupClient::GetSupportedResourceTypes(const GetSupportedResourceTypesRequest& request) const
{
AWS_OPERATION_GUARD(GetSupportedResourceTypes);
AWS_OPERATION_GUARD(GetSupportedResourceTypes);
AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetSupportedResourceTypes, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE);
AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetSupportedResourceTypes, CoreErrors, CoreErrors::NOT_INITIALIZED);
auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {});
auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {});
AWS_OPERATION_CHECK_PTR(meter, GetSupportedResourceTypes, CoreErrors, CoreErrors::NOT_INITIALIZED);
auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetSupportedResourceTypes",
{{ TracingUtils::SMITHY_METHOD_DIMENSION, "GetSupportedResourceTypes" }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }},
{{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }},
smithy::components::tracing::SpanKind::CLIENT);
return TracingUtils::MakeCallWithTiming<GetSupportedResourceTypesOutcome>(
[&]()-> GetSupportedResourceTypesOutcome {

AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetSupportedResourceTypes, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE);
const Aws::Vector<Aws::Endpoint::EndpointParameter> staticEndpointParameters;
auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming<ResolveEndpointOutcome>(
[&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(staticEndpointParameters); },
TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC,
*meter,
{{TracingUtils::SMITHY_METHOD_DIMENSION, "GetSupportedResourceTypes"}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetSupportedResourceTypes, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage());
auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming<ResolveEndpointOutcome>(
[&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); },
TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC,
*meter,
{{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetSupportedResourceTypes, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage());
endpointResolutionOutcome.GetResult().AddPathSegments("/supported-resource-types");
return GetSupportedResourceTypesOutcome(MakeRequest(endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER, "GetSupportedResourceTypes"));
return GetSupportedResourceTypesOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
},
TracingUtils::SMITHY_CLIENT_DURATION_METRIC,
*meter,
{{TracingUtils::SMITHY_METHOD_DIMENSION, "GetSupportedResourceTypes"}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
{{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
}

ListBackupJobsOutcome BackupClient::ListBackupJobs(const ListBackupJobsRequest& request) const
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

#include <aws/backup/model/GetSupportedResourceTypesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

using namespace Aws::Backup::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;

GetSupportedResourceTypesRequest::GetSupportedResourceTypesRequest()
{
}

Aws::String GetSupportedResourceTypesRequest::SerializePayload() const
{
return {};
}




Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#include <aws/core/client/AWSClientAsyncCRTP.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/chime-sdk-voice/ChimeSDKVoiceServiceClientModel.h>
#include <aws/chime-sdk-voice/model/GetPhoneNumberSettingsRequest.h>
#include <aws/chime-sdk-voice/model/ListAvailableVoiceConnectorRegionsRequest.h>
#include <aws/chime-sdk-voice/model/GetGlobalSettingsRequest.h>

namespace Aws
{
Expand Down Expand Up @@ -879,25 +882,26 @@ namespace ChimeSDKVoice
* href="http://docs.aws.amazon.com/goto/WebAPI/chime-sdk-voice-2022-08-03/GetGlobalSettings">AWS
* API Reference</a></p>
*/
virtual Model::GetGlobalSettingsOutcome GetGlobalSettings() const;
virtual Model::GetGlobalSettingsOutcome GetGlobalSettings(const Model::GetGlobalSettingsRequest& request = {}) const;

/**
* A Callable wrapper for GetGlobalSettings that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template<typename = void>
Model::GetGlobalSettingsOutcomeCallable GetGlobalSettingsCallable() const
template<typename GetGlobalSettingsRequestT = Model::GetGlobalSettingsRequest>
Model::GetGlobalSettingsOutcomeCallable GetGlobalSettingsCallable(const GetGlobalSettingsRequestT& request = {}) const
{
return SubmitCallable(&ChimeSDKVoiceClient::GetGlobalSettings);
return SubmitCallable(&ChimeSDKVoiceClient::GetGlobalSettings, request);
}

/**
* An Async wrapper for GetGlobalSettings that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template<typename = void>
void GetGlobalSettingsAsync(const GetGlobalSettingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const
template<typename GetGlobalSettingsRequestT = Model::GetGlobalSettingsRequest>
void GetGlobalSettingsAsync(const GetGlobalSettingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr, const GetGlobalSettingsRequestT& request = {}) const
{
return SubmitAsync(&ChimeSDKVoiceClient::GetGlobalSettings, handler, context);
return SubmitAsync(&ChimeSDKVoiceClient::GetGlobalSettings, request, handler, context);
}

/**
* <p>Retrieves details for the specified phone number ID, such as associations,
* capabilities, and product type.</p><p><h3>See Also:</h3> <a
Expand Down Expand Up @@ -957,25 +961,26 @@ namespace ChimeSDKVoice
* href="http://docs.aws.amazon.com/goto/WebAPI/chime-sdk-voice-2022-08-03/GetPhoneNumberSettings">AWS
* API Reference</a></p>
*/
virtual Model::GetPhoneNumberSettingsOutcome GetPhoneNumberSettings() const;
virtual Model::GetPhoneNumberSettingsOutcome GetPhoneNumberSettings(const Model::GetPhoneNumberSettingsRequest& request = {}) const;

/**
* A Callable wrapper for GetPhoneNumberSettings that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template<typename = void>
Model::GetPhoneNumberSettingsOutcomeCallable GetPhoneNumberSettingsCallable() const
template<typename GetPhoneNumberSettingsRequestT = Model::GetPhoneNumberSettingsRequest>
Model::GetPhoneNumberSettingsOutcomeCallable GetPhoneNumberSettingsCallable(const GetPhoneNumberSettingsRequestT& request = {}) const
{
return SubmitCallable(&ChimeSDKVoiceClient::GetPhoneNumberSettings);
return SubmitCallable(&ChimeSDKVoiceClient::GetPhoneNumberSettings, request);
}

/**
* An Async wrapper for GetPhoneNumberSettings that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template<typename = void>
void GetPhoneNumberSettingsAsync(const GetPhoneNumberSettingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const
template<typename GetPhoneNumberSettingsRequestT = Model::GetPhoneNumberSettingsRequest>
void GetPhoneNumberSettingsAsync(const GetPhoneNumberSettingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr, const GetPhoneNumberSettingsRequestT& request = {}) const
{
return SubmitAsync(&ChimeSDKVoiceClient::GetPhoneNumberSettings, handler, context);
return SubmitAsync(&ChimeSDKVoiceClient::GetPhoneNumberSettings, request, handler, context);
}

/**
* <p>Retrieves the specified proxy session details for the specified Amazon Chime
* SDK Voice Connector.</p><p><h3>See Also:</h3> <a
Expand Down Expand Up @@ -1456,25 +1461,26 @@ namespace ChimeSDKVoice
* href="http://docs.aws.amazon.com/goto/WebAPI/chime-sdk-voice-2022-08-03/ListAvailableVoiceConnectorRegions">AWS
* API Reference</a></p>
*/
virtual Model::ListAvailableVoiceConnectorRegionsOutcome ListAvailableVoiceConnectorRegions() const;
virtual Model::ListAvailableVoiceConnectorRegionsOutcome ListAvailableVoiceConnectorRegions(const Model::ListAvailableVoiceConnectorRegionsRequest& request = {}) const;

/**
* A Callable wrapper for ListAvailableVoiceConnectorRegions that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template<typename = void>
Model::ListAvailableVoiceConnectorRegionsOutcomeCallable ListAvailableVoiceConnectorRegionsCallable() const
template<typename ListAvailableVoiceConnectorRegionsRequestT = Model::ListAvailableVoiceConnectorRegionsRequest>
Model::ListAvailableVoiceConnectorRegionsOutcomeCallable ListAvailableVoiceConnectorRegionsCallable(const ListAvailableVoiceConnectorRegionsRequestT& request = {}) const
{
return SubmitCallable(&ChimeSDKVoiceClient::ListAvailableVoiceConnectorRegions);
return SubmitCallable(&ChimeSDKVoiceClient::ListAvailableVoiceConnectorRegions, request);
}

/**
* An Async wrapper for ListAvailableVoiceConnectorRegions that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template<typename = void>
void ListAvailableVoiceConnectorRegionsAsync(const ListAvailableVoiceConnectorRegionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const
template<typename ListAvailableVoiceConnectorRegionsRequestT = Model::ListAvailableVoiceConnectorRegionsRequest>
void ListAvailableVoiceConnectorRegionsAsync(const ListAvailableVoiceConnectorRegionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr, const ListAvailableVoiceConnectorRegionsRequestT& request = {}) const
{
return SubmitAsync(&ChimeSDKVoiceClient::ListAvailableVoiceConnectorRegions, handler, context);
return SubmitAsync(&ChimeSDKVoiceClient::ListAvailableVoiceConnectorRegions, request, handler, context);
}

/**
* <p>Lists the phone numbers for an administrator's Amazon Chime SDK
* account.</p><p><h3>See Also:</h3> <a
Expand Down
Loading
Loading