|
| 1 | +/** |
| 2 | + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 3 | + * SPDX-License-Identifier: Apache-2.0. |
| 4 | + */ |
| 5 | + |
| 6 | +#pragma once |
| 7 | +#include <aws/account/Account_EXPORTS.h> |
| 8 | +#include <aws/account/AccountErrors.h> |
| 9 | +#include <aws/core/client/AWSError.h> |
| 10 | +#include <aws/core/client/ClientConfiguration.h> |
| 11 | +#include <aws/core/client/AWSClient.h> |
| 12 | +#include <aws/core/utils/memory/stl/AWSString.h> |
| 13 | +#include <aws/core/utils/json/JsonSerializer.h> |
| 14 | +#include <aws/account/model/GetAlternateContactResult.h> |
| 15 | +#include <aws/core/NoResult.h> |
| 16 | +#include <aws/core/client/AsyncCallerContext.h> |
| 17 | +#include <aws/core/http/HttpTypes.h> |
| 18 | +#include <future> |
| 19 | +#include <functional> |
| 20 | + |
| 21 | +namespace Aws |
| 22 | +{ |
| 23 | + |
| 24 | +namespace Http |
| 25 | +{ |
| 26 | + class HttpClient; |
| 27 | + class HttpClientFactory; |
| 28 | +} // namespace Http |
| 29 | + |
| 30 | +namespace Utils |
| 31 | +{ |
| 32 | + template< typename R, typename E> class Outcome; |
| 33 | +namespace Threading |
| 34 | +{ |
| 35 | + class Executor; |
| 36 | +} // namespace Threading |
| 37 | +} // namespace Utils |
| 38 | + |
| 39 | +namespace Auth |
| 40 | +{ |
| 41 | + class AWSCredentials; |
| 42 | + class AWSCredentialsProvider; |
| 43 | +} // namespace Auth |
| 44 | + |
| 45 | +namespace Client |
| 46 | +{ |
| 47 | + class RetryStrategy; |
| 48 | +} // namespace Client |
| 49 | + |
| 50 | +namespace Account |
| 51 | +{ |
| 52 | + |
| 53 | +namespace Model |
| 54 | +{ |
| 55 | + class DeleteAlternateContactRequest; |
| 56 | + class GetAlternateContactRequest; |
| 57 | + class PutAlternateContactRequest; |
| 58 | + |
| 59 | + typedef Aws::Utils::Outcome<Aws::NoResult, AccountError> DeleteAlternateContactOutcome; |
| 60 | + typedef Aws::Utils::Outcome<GetAlternateContactResult, AccountError> GetAlternateContactOutcome; |
| 61 | + typedef Aws::Utils::Outcome<Aws::NoResult, AccountError> PutAlternateContactOutcome; |
| 62 | + |
| 63 | + typedef std::future<DeleteAlternateContactOutcome> DeleteAlternateContactOutcomeCallable; |
| 64 | + typedef std::future<GetAlternateContactOutcome> GetAlternateContactOutcomeCallable; |
| 65 | + typedef std::future<PutAlternateContactOutcome> PutAlternateContactOutcomeCallable; |
| 66 | +} // namespace Model |
| 67 | + |
| 68 | + class AccountClient; |
| 69 | + |
| 70 | + typedef std::function<void(const AccountClient*, const Model::DeleteAlternateContactRequest&, const Model::DeleteAlternateContactOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteAlternateContactResponseReceivedHandler; |
| 71 | + typedef std::function<void(const AccountClient*, const Model::GetAlternateContactRequest&, const Model::GetAlternateContactOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetAlternateContactResponseReceivedHandler; |
| 72 | + typedef std::function<void(const AccountClient*, const Model::PutAlternateContactRequest&, const Model::PutAlternateContactOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > PutAlternateContactResponseReceivedHandler; |
| 73 | + |
| 74 | + /** |
| 75 | + * <p>Operations for Amazon Web Services Account Management</p> |
| 76 | + */ |
| 77 | + class AWS_ACCOUNT_API AccountClient : public Aws::Client::AWSJsonClient |
| 78 | + { |
| 79 | + public: |
| 80 | + typedef Aws::Client::AWSJsonClient BASECLASS; |
| 81 | + |
| 82 | + /** |
| 83 | + * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config |
| 84 | + * is not specified, it will be initialized to default values. |
| 85 | + */ |
| 86 | + AccountClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration()); |
| 87 | + |
| 88 | + /** |
| 89 | + * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config |
| 90 | + * is not specified, it will be initialized to default values. |
| 91 | + */ |
| 92 | + AccountClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration()); |
| 93 | + |
| 94 | + /** |
| 95 | + * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, |
| 96 | + * the default http client factory will be used |
| 97 | + */ |
| 98 | + AccountClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider, |
| 99 | + const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration()); |
| 100 | + |
| 101 | + virtual ~AccountClient(); |
| 102 | + |
| 103 | + |
| 104 | + /** |
| 105 | + * <p>Deletes the specified alternate contact from an Amazon Web Services |
| 106 | + * account.</p> <p>For complete details about how to use the alternate contact |
| 107 | + * operations, see <a |
| 108 | + * href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html">Access |
| 109 | + * or updating the alternate contacts</a>.</p><p><h3>See Also:</h3> <a |
| 110 | + * href="http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/DeleteAlternateContact">AWS |
| 111 | + * API Reference</a></p> |
| 112 | + */ |
| 113 | + virtual Model::DeleteAlternateContactOutcome DeleteAlternateContact(const Model::DeleteAlternateContactRequest& request) const; |
| 114 | + |
| 115 | + /** |
| 116 | + * <p>Deletes the specified alternate contact from an Amazon Web Services |
| 117 | + * account.</p> <p>For complete details about how to use the alternate contact |
| 118 | + * operations, see <a |
| 119 | + * href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html">Access |
| 120 | + * or updating the alternate contacts</a>.</p><p><h3>See Also:</h3> <a |
| 121 | + * href="http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/DeleteAlternateContact">AWS |
| 122 | + * API Reference</a></p> |
| 123 | + * |
| 124 | + * returns a future to the operation so that it can be executed in parallel to other requests. |
| 125 | + */ |
| 126 | + virtual Model::DeleteAlternateContactOutcomeCallable DeleteAlternateContactCallable(const Model::DeleteAlternateContactRequest& request) const; |
| 127 | + |
| 128 | + /** |
| 129 | + * <p>Deletes the specified alternate contact from an Amazon Web Services |
| 130 | + * account.</p> <p>For complete details about how to use the alternate contact |
| 131 | + * operations, see <a |
| 132 | + * href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html">Access |
| 133 | + * or updating the alternate contacts</a>.</p><p><h3>See Also:</h3> <a |
| 134 | + * href="http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/DeleteAlternateContact">AWS |
| 135 | + * API Reference</a></p> |
| 136 | + * |
| 137 | + * Queues the request into a thread executor and triggers associated callback when operation has finished. |
| 138 | + */ |
| 139 | + virtual void DeleteAlternateContactAsync(const Model::DeleteAlternateContactRequest& request, const DeleteAlternateContactResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const; |
| 140 | + |
| 141 | + /** |
| 142 | + * <p>Retrieves the specified alternate contact attached to an Amazon Web Services |
| 143 | + * account.</p> <p>For complete details about how to use the alternate contact |
| 144 | + * operations, see <a |
| 145 | + * href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html">Access |
| 146 | + * or updating the alternate contacts</a>.</p><p><h3>See Also:</h3> <a |
| 147 | + * href="http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/GetAlternateContact">AWS |
| 148 | + * API Reference</a></p> |
| 149 | + */ |
| 150 | + virtual Model::GetAlternateContactOutcome GetAlternateContact(const Model::GetAlternateContactRequest& request) const; |
| 151 | + |
| 152 | + /** |
| 153 | + * <p>Retrieves the specified alternate contact attached to an Amazon Web Services |
| 154 | + * account.</p> <p>For complete details about how to use the alternate contact |
| 155 | + * operations, see <a |
| 156 | + * href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html">Access |
| 157 | + * or updating the alternate contacts</a>.</p><p><h3>See Also:</h3> <a |
| 158 | + * href="http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/GetAlternateContact">AWS |
| 159 | + * API Reference</a></p> |
| 160 | + * |
| 161 | + * returns a future to the operation so that it can be executed in parallel to other requests. |
| 162 | + */ |
| 163 | + virtual Model::GetAlternateContactOutcomeCallable GetAlternateContactCallable(const Model::GetAlternateContactRequest& request) const; |
| 164 | + |
| 165 | + /** |
| 166 | + * <p>Retrieves the specified alternate contact attached to an Amazon Web Services |
| 167 | + * account.</p> <p>For complete details about how to use the alternate contact |
| 168 | + * operations, see <a |
| 169 | + * href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html">Access |
| 170 | + * or updating the alternate contacts</a>.</p><p><h3>See Also:</h3> <a |
| 171 | + * href="http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/GetAlternateContact">AWS |
| 172 | + * API Reference</a></p> |
| 173 | + * |
| 174 | + * Queues the request into a thread executor and triggers associated callback when operation has finished. |
| 175 | + */ |
| 176 | + virtual void GetAlternateContactAsync(const Model::GetAlternateContactRequest& request, const GetAlternateContactResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const; |
| 177 | + |
| 178 | + /** |
| 179 | + * <p>Modifies the specified alternate contact attached to an Amazon Web Services |
| 180 | + * account.</p> <p>For complete details about how to use the alternate contact |
| 181 | + * operations, see <a |
| 182 | + * href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html">Access |
| 183 | + * or updating the alternate contacts</a>.</p><p><h3>See Also:</h3> <a |
| 184 | + * href="http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/PutAlternateContact">AWS |
| 185 | + * API Reference</a></p> |
| 186 | + */ |
| 187 | + virtual Model::PutAlternateContactOutcome PutAlternateContact(const Model::PutAlternateContactRequest& request) const; |
| 188 | + |
| 189 | + /** |
| 190 | + * <p>Modifies the specified alternate contact attached to an Amazon Web Services |
| 191 | + * account.</p> <p>For complete details about how to use the alternate contact |
| 192 | + * operations, see <a |
| 193 | + * href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html">Access |
| 194 | + * or updating the alternate contacts</a>.</p><p><h3>See Also:</h3> <a |
| 195 | + * href="http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/PutAlternateContact">AWS |
| 196 | + * API Reference</a></p> |
| 197 | + * |
| 198 | + * returns a future to the operation so that it can be executed in parallel to other requests. |
| 199 | + */ |
| 200 | + virtual Model::PutAlternateContactOutcomeCallable PutAlternateContactCallable(const Model::PutAlternateContactRequest& request) const; |
| 201 | + |
| 202 | + /** |
| 203 | + * <p>Modifies the specified alternate contact attached to an Amazon Web Services |
| 204 | + * account.</p> <p>For complete details about how to use the alternate contact |
| 205 | + * operations, see <a |
| 206 | + * href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html">Access |
| 207 | + * or updating the alternate contacts</a>.</p><p><h3>See Also:</h3> <a |
| 208 | + * href="http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/PutAlternateContact">AWS |
| 209 | + * API Reference</a></p> |
| 210 | + * |
| 211 | + * Queues the request into a thread executor and triggers associated callback when operation has finished. |
| 212 | + */ |
| 213 | + virtual void PutAlternateContactAsync(const Model::PutAlternateContactRequest& request, const PutAlternateContactResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const; |
| 214 | + |
| 215 | + |
| 216 | + void OverrideEndpoint(const Aws::String& endpoint); |
| 217 | + private: |
| 218 | + void init(const Aws::Client::ClientConfiguration& clientConfiguration); |
| 219 | + void DeleteAlternateContactAsyncHelper(const Model::DeleteAlternateContactRequest& request, const DeleteAlternateContactResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const; |
| 220 | + void GetAlternateContactAsyncHelper(const Model::GetAlternateContactRequest& request, const GetAlternateContactResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const; |
| 221 | + void PutAlternateContactAsyncHelper(const Model::PutAlternateContactRequest& request, const PutAlternateContactResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const; |
| 222 | + |
| 223 | + Aws::String m_uri; |
| 224 | + Aws::String m_configScheme; |
| 225 | + std::shared_ptr<Aws::Utils::Threading::Executor> m_executor; |
| 226 | + }; |
| 227 | + |
| 228 | +} // namespace Account |
| 229 | +} // namespace Aws |
0 commit comments