feat(hos_client_create, hos_client_destory): 多次调用destory不会导致重复释放

This commit is contained in:
彭宣正
2020-12-14 17:24:58 +08:00
parent 505d529c32
commit 10b370e486
55976 changed files with 8544395 additions and 2 deletions

View File

@@ -0,0 +1,226 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/sso-oidc/SSOOIDCErrors.h>
#include <aws/core/client/AWSError.h>
#include <aws/core/client/ClientConfiguration.h>
#include <aws/core/client/AWSClient.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/sso-oidc/model/CreateTokenResult.h>
#include <aws/sso-oidc/model/RegisterClientResult.h>
#include <aws/sso-oidc/model/StartDeviceAuthorizationResult.h>
#include <aws/core/client/AsyncCallerContext.h>
#include <aws/core/http/HttpTypes.h>
#include <future>
#include <functional>
namespace Aws
{
namespace Http
{
class HttpClient;
class HttpClientFactory;
} // namespace Http
namespace Utils
{
template< typename R, typename E> class Outcome;
namespace Threading
{
class Executor;
} // namespace Threading
} // namespace Utils
namespace Auth
{
class AWSCredentials;
class AWSCredentialsProvider;
} // namespace Auth
namespace Client
{
class RetryStrategy;
} // namespace Client
namespace SSOOIDC
{
namespace Model
{
class CreateTokenRequest;
class RegisterClientRequest;
class StartDeviceAuthorizationRequest;
typedef Aws::Utils::Outcome<CreateTokenResult, SSOOIDCError> CreateTokenOutcome;
typedef Aws::Utils::Outcome<RegisterClientResult, SSOOIDCError> RegisterClientOutcome;
typedef Aws::Utils::Outcome<StartDeviceAuthorizationResult, SSOOIDCError> StartDeviceAuthorizationOutcome;
typedef std::future<CreateTokenOutcome> CreateTokenOutcomeCallable;
typedef std::future<RegisterClientOutcome> RegisterClientOutcomeCallable;
typedef std::future<StartDeviceAuthorizationOutcome> StartDeviceAuthorizationOutcomeCallable;
} // namespace Model
class SSOOIDCClient;
typedef std::function<void(const SSOOIDCClient*, const Model::CreateTokenRequest&, const Model::CreateTokenOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateTokenResponseReceivedHandler;
typedef std::function<void(const SSOOIDCClient*, const Model::RegisterClientRequest&, const Model::RegisterClientOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > RegisterClientResponseReceivedHandler;
typedef std::function<void(const SSOOIDCClient*, const Model::StartDeviceAuthorizationRequest&, const Model::StartDeviceAuthorizationOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > StartDeviceAuthorizationResponseReceivedHandler;
/**
* <p>AWS Single Sign-On (SSO) OpenID Connect (OIDC) is a web service that enables
* a client (such as AWS CLI or a native application) to register with AWS SSO. The
* service also enables the client to fetch the users access token upon successful
* authentication and authorization with AWS SSO. This service conforms with the
* OAuth 2.0 based implementation of the device authorization grant standard (<a
* href="https://tools.ietf.org/html/rfc8628">https://tools.ietf.org/html/rfc8628</a>).</p>
* <p>For general information about AWS SSO, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html">What
* is AWS Single Sign-On?</a> in the <i>AWS SSO User Guide</i>.</p> <p>This API
* reference guide describes the AWS SSO OIDC operations that you can call
* programatically and includes detailed information on data types and errors.</p>
* <p>AWS provides SDKs that consist of libraries and sample code for
* various programming languages and platforms such as Java, Ruby, .Net, iOS, and
* Android. The SDKs provide a convenient way to create programmatic access to AWS
* SSO and other AWS services. For more information about the AWS SDKs, including
* how to download and install them, see <a
* href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>.</p>
*
*/
class AWS_SSOOIDC_API SSOOIDCClient : public Aws::Client::AWSJsonClient
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
SSOOIDCClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
SSOOIDCClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
SSOOIDCClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~SSOOIDCClient();
/**
* <p>Creates and returns an access token for the authorized client. The access
* token issued will be used to fetch short-term credentials for the assigned roles
* in the AWS account.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateToken">AWS
* API Reference</a></p>
*/
virtual Model::CreateTokenOutcome CreateToken(const Model::CreateTokenRequest& request) const;
/**
* <p>Creates and returns an access token for the authorized client. The access
* token issued will be used to fetch short-term credentials for the assigned roles
* in the AWS account.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateToken">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::CreateTokenOutcomeCallable CreateTokenCallable(const Model::CreateTokenRequest& request) const;
/**
* <p>Creates and returns an access token for the authorized client. The access
* token issued will be used to fetch short-term credentials for the assigned roles
* in the AWS account.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateToken">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void CreateTokenAsync(const Model::CreateTokenRequest& request, const CreateTokenResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Registers a client with AWS SSO. This allows clients to initiate device
* authorization. The output should be persisted for reuse through many
* authentication requests.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/RegisterClient">AWS
* API Reference</a></p>
*/
virtual Model::RegisterClientOutcome RegisterClient(const Model::RegisterClientRequest& request) const;
/**
* <p>Registers a client with AWS SSO. This allows clients to initiate device
* authorization. The output should be persisted for reuse through many
* authentication requests.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/RegisterClient">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::RegisterClientOutcomeCallable RegisterClientCallable(const Model::RegisterClientRequest& request) const;
/**
* <p>Registers a client with AWS SSO. This allows clients to initiate device
* authorization. The output should be persisted for reuse through many
* authentication requests.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/RegisterClient">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void RegisterClientAsync(const Model::RegisterClientRequest& request, const RegisterClientResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Initiates device authorization by requesting a pair of verification codes
* from the authorization service.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/StartDeviceAuthorization">AWS
* API Reference</a></p>
*/
virtual Model::StartDeviceAuthorizationOutcome StartDeviceAuthorization(const Model::StartDeviceAuthorizationRequest& request) const;
/**
* <p>Initiates device authorization by requesting a pair of verification codes
* from the authorization service.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/StartDeviceAuthorization">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::StartDeviceAuthorizationOutcomeCallable StartDeviceAuthorizationCallable(const Model::StartDeviceAuthorizationRequest& request) const;
/**
* <p>Initiates device authorization by requesting a pair of verification codes
* from the authorization service.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/StartDeviceAuthorization">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void StartDeviceAuthorizationAsync(const Model::StartDeviceAuthorizationRequest& request, const StartDeviceAuthorizationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void CreateTokenAsyncHelper(const Model::CreateTokenRequest& request, const CreateTokenResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void RegisterClientAsyncHelper(const Model::RegisterClientRequest& request, const RegisterClientResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void StartDeviceAuthorizationAsyncHelper(const Model::StartDeviceAuthorizationRequest& request, const StartDeviceAuthorizationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr<Aws::Utils::Threading::Executor> m_executor;
};
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,21 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/Region.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SSOOIDC
{
namespace SSOOIDCEndpoint
{
AWS_SSOOIDC_API Aws::String ForRegion(const Aws::String& regionName, bool useDualStack = false);
} // namespace SSOOIDCEndpoint
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,23 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/client/AWSErrorMarshaller.h>
namespace Aws
{
namespace Client
{
class AWS_SSOOIDC_API SSOOIDCErrorMarshaller : public Aws::Client::JsonErrorMarshaller
{
public:
Aws::Client::AWSError<Aws::Client::CoreErrors> FindErrorByName(const char* exceptionName) const override;
};
} // namespace Client
} // namespace Aws

View File

@@ -0,0 +1,81 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/core/client/AWSError.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
namespace Aws
{
namespace SSOOIDC
{
enum class SSOOIDCErrors
{
//From Core//
//////////////////////////////////////////////////////////////////////////////////////////
INCOMPLETE_SIGNATURE = 0,
INTERNAL_FAILURE = 1,
INVALID_ACTION = 2,
INVALID_CLIENT_TOKEN_ID = 3,
INVALID_PARAMETER_COMBINATION = 4,
INVALID_QUERY_PARAMETER = 5,
INVALID_PARAMETER_VALUE = 6,
MISSING_ACTION = 7, // SDK should never allow
MISSING_AUTHENTICATION_TOKEN = 8, // SDK should never allow
MISSING_PARAMETER = 9, // SDK should never allow
OPT_IN_REQUIRED = 10,
REQUEST_EXPIRED = 11,
SERVICE_UNAVAILABLE = 12,
THROTTLING = 13,
VALIDATION = 14,
ACCESS_DENIED = 15,
RESOURCE_NOT_FOUND = 16,
UNRECOGNIZED_CLIENT = 17,
MALFORMED_QUERY_STRING = 18,
SLOW_DOWN = 19,
REQUEST_TIME_TOO_SKEWED = 20,
INVALID_SIGNATURE = 21,
SIGNATURE_DOES_NOT_MATCH = 22,
INVALID_ACCESS_KEY_ID = 23,
REQUEST_TIMEOUT = 24,
NETWORK_CONNECTION = 99,
UNKNOWN = 100,
///////////////////////////////////////////////////////////////////////////////////////////
AUTHORIZATION_PENDING= static_cast<int>(Aws::Client::CoreErrors::SERVICE_EXTENSION_START_RANGE) + 1,
EXPIRED_TOKEN,
INTERNAL_SERVER,
INVALID_CLIENT,
INVALID_CLIENT_METADATA,
INVALID_GRANT,
INVALID_REQUEST,
INVALID_SCOPE,
UNAUTHORIZED_CLIENT,
UNSUPPORTED_GRANT_TYPE
};
class AWS_SSOOIDC_API SSOOIDCError : public Aws::Client::AWSError<SSOOIDCErrors>
{
public:
SSOOIDCError() {}
SSOOIDCError(const Aws::Client::AWSError<Aws::Client::CoreErrors>& rhs) : Aws::Client::AWSError<SSOOIDCErrors>(rhs) {}
SSOOIDCError(Aws::Client::AWSError<Aws::Client::CoreErrors>&& rhs) : Aws::Client::AWSError<SSOOIDCErrors>(rhs) {}
SSOOIDCError(const Aws::Client::AWSError<SSOOIDCErrors>& rhs) : Aws::Client::AWSError<SSOOIDCErrors>(rhs) {}
SSOOIDCError(Aws::Client::AWSError<SSOOIDCErrors>&& rhs) : Aws::Client::AWSError<SSOOIDCErrors>(rhs) {}
template <typename T>
T GetModeledError();
};
namespace SSOOIDCErrorMapper
{
AWS_SSOOIDC_API Aws::Client::AWSError<Aws::Client::CoreErrors> GetErrorForName(const char* errorName);
}
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,42 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/AmazonSerializableWebServiceRequest.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <aws/core/http/HttpRequest.h>
namespace Aws
{
namespace SSOOIDC
{
class AWS_SSOOIDC_API SSOOIDCRequest : public Aws::AmazonSerializableWebServiceRequest
{
public:
virtual ~SSOOIDCRequest () {}
void AddParametersToRequest(Aws::Http::HttpRequest& httpRequest) const { AWS_UNREFERENCED_PARAM(httpRequest); }
inline Aws::Http::HeaderValueCollection GetHeaders() const override
{
auto headers = GetRequestSpecificHeaders();
if(headers.size() == 0 || (headers.size() > 0 && headers.count(Aws::Http::CONTENT_TYPE_HEADER) == 0))
{
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::CONTENT_TYPE_HEADER, Aws::AMZN_JSON_CONTENT_TYPE_1_1 ));
}
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::API_VERSION_HEADER, "2019-06-10"));
return headers;
}
protected:
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const { return Aws::Http::HeaderValueCollection(); }
};
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,29 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#ifdef _MSC_VER
//disable windows complaining about max template size.
#pragma warning (disable : 4503)
#endif // _MSC_VER
#if defined (USE_WINDOWS_DLL_SEMANTICS) || defined (_WIN32)
#ifdef _MSC_VER
#pragma warning(disable : 4251)
#endif // _MSC_VER
#ifdef USE_IMPORT_EXPORT
#ifdef AWS_SSOOIDC_EXPORTS
#define AWS_SSOOIDC_API __declspec(dllexport)
#else
#define AWS_SSOOIDC_API __declspec(dllimport)
#endif /* AWS_SSOOIDC_EXPORTS */
#else
#define AWS_SSOOIDC_API
#endif // USE_IMPORT_EXPORT
#else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
#define AWS_SSOOIDC_API
#endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)

View File

@@ -0,0 +1,101 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SSOOIDC
{
namespace Model
{
/**
* <p>You do not have sufficient access to perform this action.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/AccessDeniedException">AWS
* API Reference</a></p>
*/
class AWS_SSOOIDC_API AccessDeniedException
{
public:
AccessDeniedException();
AccessDeniedException(Aws::Utils::Json::JsonView jsonValue);
AccessDeniedException& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
inline const Aws::String& GetError() const{ return m_error; }
inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
inline void SetError(const Aws::String& value) { m_errorHasBeenSet = true; m_error = value; }
inline void SetError(Aws::String&& value) { m_errorHasBeenSet = true; m_error = std::move(value); }
inline void SetError(const char* value) { m_errorHasBeenSet = true; m_error.assign(value); }
inline AccessDeniedException& WithError(const Aws::String& value) { SetError(value); return *this;}
inline AccessDeniedException& WithError(Aws::String&& value) { SetError(std::move(value)); return *this;}
inline AccessDeniedException& WithError(const char* value) { SetError(value); return *this;}
inline const Aws::String& GetError_description() const{ return m_error_description; }
inline bool Error_descriptionHasBeenSet() const { return m_error_descriptionHasBeenSet; }
inline void SetError_description(const Aws::String& value) { m_error_descriptionHasBeenSet = true; m_error_description = value; }
inline void SetError_description(Aws::String&& value) { m_error_descriptionHasBeenSet = true; m_error_description = std::move(value); }
inline void SetError_description(const char* value) { m_error_descriptionHasBeenSet = true; m_error_description.assign(value); }
inline AccessDeniedException& WithError_description(const Aws::String& value) { SetError_description(value); return *this;}
inline AccessDeniedException& WithError_description(Aws::String&& value) { SetError_description(std::move(value)); return *this;}
inline AccessDeniedException& WithError_description(const char* value) { SetError_description(value); return *this;}
private:
Aws::String m_error;
bool m_errorHasBeenSet;
Aws::String m_error_description;
bool m_error_descriptionHasBeenSet;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,101 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SSOOIDC
{
namespace Model
{
/**
* <p>Indicates that a request to authorize a client with an access user session
* token is pending.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/AuthorizationPendingException">AWS
* API Reference</a></p>
*/
class AWS_SSOOIDC_API AuthorizationPendingException
{
public:
AuthorizationPendingException();
AuthorizationPendingException(Aws::Utils::Json::JsonView jsonValue);
AuthorizationPendingException& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
inline const Aws::String& GetError() const{ return m_error; }
inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
inline void SetError(const Aws::String& value) { m_errorHasBeenSet = true; m_error = value; }
inline void SetError(Aws::String&& value) { m_errorHasBeenSet = true; m_error = std::move(value); }
inline void SetError(const char* value) { m_errorHasBeenSet = true; m_error.assign(value); }
inline AuthorizationPendingException& WithError(const Aws::String& value) { SetError(value); return *this;}
inline AuthorizationPendingException& WithError(Aws::String&& value) { SetError(std::move(value)); return *this;}
inline AuthorizationPendingException& WithError(const char* value) { SetError(value); return *this;}
inline const Aws::String& GetError_description() const{ return m_error_description; }
inline bool Error_descriptionHasBeenSet() const { return m_error_descriptionHasBeenSet; }
inline void SetError_description(const Aws::String& value) { m_error_descriptionHasBeenSet = true; m_error_description = value; }
inline void SetError_description(Aws::String&& value) { m_error_descriptionHasBeenSet = true; m_error_description = std::move(value); }
inline void SetError_description(const char* value) { m_error_descriptionHasBeenSet = true; m_error_description.assign(value); }
inline AuthorizationPendingException& WithError_description(const Aws::String& value) { SetError_description(value); return *this;}
inline AuthorizationPendingException& WithError_description(Aws::String&& value) { SetError_description(std::move(value)); return *this;}
inline AuthorizationPendingException& WithError_description(const char* value) { SetError_description(value); return *this;}
private:
Aws::String m_error;
bool m_errorHasBeenSet;
Aws::String m_error_description;
bool m_error_descriptionHasBeenSet;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,486 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/sso-oidc/SSOOIDCRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <utility>
namespace Aws
{
namespace SSOOIDC
{
namespace Model
{
/**
*/
class AWS_SSOOIDC_API CreateTokenRequest : public SSOOIDCRequest
{
public:
CreateTokenRequest();
// 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 "CreateToken"; }
Aws::String SerializePayload() const override;
/**
* <p>The unique identifier string for each client. This value should come from the
* persisted result of the <a>RegisterClient</a> API.</p>
*/
inline const Aws::String& GetClientId() const{ return m_clientId; }
/**
* <p>The unique identifier string for each client. This value should come from the
* persisted result of the <a>RegisterClient</a> API.</p>
*/
inline bool ClientIdHasBeenSet() const { return m_clientIdHasBeenSet; }
/**
* <p>The unique identifier string for each client. This value should come from the
* persisted result of the <a>RegisterClient</a> API.</p>
*/
inline void SetClientId(const Aws::String& value) { m_clientIdHasBeenSet = true; m_clientId = value; }
/**
* <p>The unique identifier string for each client. This value should come from the
* persisted result of the <a>RegisterClient</a> API.</p>
*/
inline void SetClientId(Aws::String&& value) { m_clientIdHasBeenSet = true; m_clientId = std::move(value); }
/**
* <p>The unique identifier string for each client. This value should come from the
* persisted result of the <a>RegisterClient</a> API.</p>
*/
inline void SetClientId(const char* value) { m_clientIdHasBeenSet = true; m_clientId.assign(value); }
/**
* <p>The unique identifier string for each client. This value should come from the
* persisted result of the <a>RegisterClient</a> API.</p>
*/
inline CreateTokenRequest& WithClientId(const Aws::String& value) { SetClientId(value); return *this;}
/**
* <p>The unique identifier string for each client. This value should come from the
* persisted result of the <a>RegisterClient</a> API.</p>
*/
inline CreateTokenRequest& WithClientId(Aws::String&& value) { SetClientId(std::move(value)); return *this;}
/**
* <p>The unique identifier string for each client. This value should come from the
* persisted result of the <a>RegisterClient</a> API.</p>
*/
inline CreateTokenRequest& WithClientId(const char* value) { SetClientId(value); return *this;}
/**
* <p>A secret string generated for the client. This value should come from the
* persisted result of the <a>RegisterClient</a> API.</p>
*/
inline const Aws::String& GetClientSecret() const{ return m_clientSecret; }
/**
* <p>A secret string generated for the client. This value should come from the
* persisted result of the <a>RegisterClient</a> API.</p>
*/
inline bool ClientSecretHasBeenSet() const { return m_clientSecretHasBeenSet; }
/**
* <p>A secret string generated for the client. This value should come from the
* persisted result of the <a>RegisterClient</a> API.</p>
*/
inline void SetClientSecret(const Aws::String& value) { m_clientSecretHasBeenSet = true; m_clientSecret = value; }
/**
* <p>A secret string generated for the client. This value should come from the
* persisted result of the <a>RegisterClient</a> API.</p>
*/
inline void SetClientSecret(Aws::String&& value) { m_clientSecretHasBeenSet = true; m_clientSecret = std::move(value); }
/**
* <p>A secret string generated for the client. This value should come from the
* persisted result of the <a>RegisterClient</a> API.</p>
*/
inline void SetClientSecret(const char* value) { m_clientSecretHasBeenSet = true; m_clientSecret.assign(value); }
/**
* <p>A secret string generated for the client. This value should come from the
* persisted result of the <a>RegisterClient</a> API.</p>
*/
inline CreateTokenRequest& WithClientSecret(const Aws::String& value) { SetClientSecret(value); return *this;}
/**
* <p>A secret string generated for the client. This value should come from the
* persisted result of the <a>RegisterClient</a> API.</p>
*/
inline CreateTokenRequest& WithClientSecret(Aws::String&& value) { SetClientSecret(std::move(value)); return *this;}
/**
* <p>A secret string generated for the client. This value should come from the
* persisted result of the <a>RegisterClient</a> API.</p>
*/
inline CreateTokenRequest& WithClientSecret(const char* value) { SetClientSecret(value); return *this;}
/**
* <p>Supports grant types for authorization code, refresh token, and device code
* request.</p>
*/
inline const Aws::String& GetGrantType() const{ return m_grantType; }
/**
* <p>Supports grant types for authorization code, refresh token, and device code
* request.</p>
*/
inline bool GrantTypeHasBeenSet() const { return m_grantTypeHasBeenSet; }
/**
* <p>Supports grant types for authorization code, refresh token, and device code
* request.</p>
*/
inline void SetGrantType(const Aws::String& value) { m_grantTypeHasBeenSet = true; m_grantType = value; }
/**
* <p>Supports grant types for authorization code, refresh token, and device code
* request.</p>
*/
inline void SetGrantType(Aws::String&& value) { m_grantTypeHasBeenSet = true; m_grantType = std::move(value); }
/**
* <p>Supports grant types for authorization code, refresh token, and device code
* request.</p>
*/
inline void SetGrantType(const char* value) { m_grantTypeHasBeenSet = true; m_grantType.assign(value); }
/**
* <p>Supports grant types for authorization code, refresh token, and device code
* request.</p>
*/
inline CreateTokenRequest& WithGrantType(const Aws::String& value) { SetGrantType(value); return *this;}
/**
* <p>Supports grant types for authorization code, refresh token, and device code
* request.</p>
*/
inline CreateTokenRequest& WithGrantType(Aws::String&& value) { SetGrantType(std::move(value)); return *this;}
/**
* <p>Supports grant types for authorization code, refresh token, and device code
* request.</p>
*/
inline CreateTokenRequest& WithGrantType(const char* value) { SetGrantType(value); return *this;}
/**
* <p>Used only when calling this API for the device code grant type. This
* short-term code is used to identify this authentication attempt. This should
* come from an in-memory reference to the result of the
* <a>StartDeviceAuthorization</a> API.</p>
*/
inline const Aws::String& GetDeviceCode() const{ return m_deviceCode; }
/**
* <p>Used only when calling this API for the device code grant type. This
* short-term code is used to identify this authentication attempt. This should
* come from an in-memory reference to the result of the
* <a>StartDeviceAuthorization</a> API.</p>
*/
inline bool DeviceCodeHasBeenSet() const { return m_deviceCodeHasBeenSet; }
/**
* <p>Used only when calling this API for the device code grant type. This
* short-term code is used to identify this authentication attempt. This should
* come from an in-memory reference to the result of the
* <a>StartDeviceAuthorization</a> API.</p>
*/
inline void SetDeviceCode(const Aws::String& value) { m_deviceCodeHasBeenSet = true; m_deviceCode = value; }
/**
* <p>Used only when calling this API for the device code grant type. This
* short-term code is used to identify this authentication attempt. This should
* come from an in-memory reference to the result of the
* <a>StartDeviceAuthorization</a> API.</p>
*/
inline void SetDeviceCode(Aws::String&& value) { m_deviceCodeHasBeenSet = true; m_deviceCode = std::move(value); }
/**
* <p>Used only when calling this API for the device code grant type. This
* short-term code is used to identify this authentication attempt. This should
* come from an in-memory reference to the result of the
* <a>StartDeviceAuthorization</a> API.</p>
*/
inline void SetDeviceCode(const char* value) { m_deviceCodeHasBeenSet = true; m_deviceCode.assign(value); }
/**
* <p>Used only when calling this API for the device code grant type. This
* short-term code is used to identify this authentication attempt. This should
* come from an in-memory reference to the result of the
* <a>StartDeviceAuthorization</a> API.</p>
*/
inline CreateTokenRequest& WithDeviceCode(const Aws::String& value) { SetDeviceCode(value); return *this;}
/**
* <p>Used only when calling this API for the device code grant type. This
* short-term code is used to identify this authentication attempt. This should
* come from an in-memory reference to the result of the
* <a>StartDeviceAuthorization</a> API.</p>
*/
inline CreateTokenRequest& WithDeviceCode(Aws::String&& value) { SetDeviceCode(std::move(value)); return *this;}
/**
* <p>Used only when calling this API for the device code grant type. This
* short-term code is used to identify this authentication attempt. This should
* come from an in-memory reference to the result of the
* <a>StartDeviceAuthorization</a> API.</p>
*/
inline CreateTokenRequest& WithDeviceCode(const char* value) { SetDeviceCode(value); return *this;}
/**
* <p>The authorization code received from the authorization service. This
* parameter is required to perform an authorization grant request to get access to
* a token.</p>
*/
inline const Aws::String& GetCode() const{ return m_code; }
/**
* <p>The authorization code received from the authorization service. This
* parameter is required to perform an authorization grant request to get access to
* a token.</p>
*/
inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; }
/**
* <p>The authorization code received from the authorization service. This
* parameter is required to perform an authorization grant request to get access to
* a token.</p>
*/
inline void SetCode(const Aws::String& value) { m_codeHasBeenSet = true; m_code = value; }
/**
* <p>The authorization code received from the authorization service. This
* parameter is required to perform an authorization grant request to get access to
* a token.</p>
*/
inline void SetCode(Aws::String&& value) { m_codeHasBeenSet = true; m_code = std::move(value); }
/**
* <p>The authorization code received from the authorization service. This
* parameter is required to perform an authorization grant request to get access to
* a token.</p>
*/
inline void SetCode(const char* value) { m_codeHasBeenSet = true; m_code.assign(value); }
/**
* <p>The authorization code received from the authorization service. This
* parameter is required to perform an authorization grant request to get access to
* a token.</p>
*/
inline CreateTokenRequest& WithCode(const Aws::String& value) { SetCode(value); return *this;}
/**
* <p>The authorization code received from the authorization service. This
* parameter is required to perform an authorization grant request to get access to
* a token.</p>
*/
inline CreateTokenRequest& WithCode(Aws::String&& value) { SetCode(std::move(value)); return *this;}
/**
* <p>The authorization code received from the authorization service. This
* parameter is required to perform an authorization grant request to get access to
* a token.</p>
*/
inline CreateTokenRequest& WithCode(const char* value) { SetCode(value); return *this;}
/**
* <p>The token used to obtain an access token in the event that the access token
* is invalid or expired. This token is not issued by the service.</p>
*/
inline const Aws::String& GetRefreshToken() const{ return m_refreshToken; }
/**
* <p>The token used to obtain an access token in the event that the access token
* is invalid or expired. This token is not issued by the service.</p>
*/
inline bool RefreshTokenHasBeenSet() const { return m_refreshTokenHasBeenSet; }
/**
* <p>The token used to obtain an access token in the event that the access token
* is invalid or expired. This token is not issued by the service.</p>
*/
inline void SetRefreshToken(const Aws::String& value) { m_refreshTokenHasBeenSet = true; m_refreshToken = value; }
/**
* <p>The token used to obtain an access token in the event that the access token
* is invalid or expired. This token is not issued by the service.</p>
*/
inline void SetRefreshToken(Aws::String&& value) { m_refreshTokenHasBeenSet = true; m_refreshToken = std::move(value); }
/**
* <p>The token used to obtain an access token in the event that the access token
* is invalid or expired. This token is not issued by the service.</p>
*/
inline void SetRefreshToken(const char* value) { m_refreshTokenHasBeenSet = true; m_refreshToken.assign(value); }
/**
* <p>The token used to obtain an access token in the event that the access token
* is invalid or expired. This token is not issued by the service.</p>
*/
inline CreateTokenRequest& WithRefreshToken(const Aws::String& value) { SetRefreshToken(value); return *this;}
/**
* <p>The token used to obtain an access token in the event that the access token
* is invalid or expired. This token is not issued by the service.</p>
*/
inline CreateTokenRequest& WithRefreshToken(Aws::String&& value) { SetRefreshToken(std::move(value)); return *this;}
/**
* <p>The token used to obtain an access token in the event that the access token
* is invalid or expired. This token is not issued by the service.</p>
*/
inline CreateTokenRequest& WithRefreshToken(const char* value) { SetRefreshToken(value); return *this;}
/**
* <p>The list of scopes that is defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline const Aws::Vector<Aws::String>& GetScope() const{ return m_scope; }
/**
* <p>The list of scopes that is defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline bool ScopeHasBeenSet() const { return m_scopeHasBeenSet; }
/**
* <p>The list of scopes that is defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline void SetScope(const Aws::Vector<Aws::String>& value) { m_scopeHasBeenSet = true; m_scope = value; }
/**
* <p>The list of scopes that is defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline void SetScope(Aws::Vector<Aws::String>&& value) { m_scopeHasBeenSet = true; m_scope = std::move(value); }
/**
* <p>The list of scopes that is defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline CreateTokenRequest& WithScope(const Aws::Vector<Aws::String>& value) { SetScope(value); return *this;}
/**
* <p>The list of scopes that is defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline CreateTokenRequest& WithScope(Aws::Vector<Aws::String>&& value) { SetScope(std::move(value)); return *this;}
/**
* <p>The list of scopes that is defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline CreateTokenRequest& AddScope(const Aws::String& value) { m_scopeHasBeenSet = true; m_scope.push_back(value); return *this; }
/**
* <p>The list of scopes that is defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline CreateTokenRequest& AddScope(Aws::String&& value) { m_scopeHasBeenSet = true; m_scope.push_back(std::move(value)); return *this; }
/**
* <p>The list of scopes that is defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline CreateTokenRequest& AddScope(const char* value) { m_scopeHasBeenSet = true; m_scope.push_back(value); return *this; }
/**
* <p>The location of the application that will receive the authorization code.
* Users authorize the service to send the request to this location.</p>
*/
inline const Aws::String& GetRedirectUri() const{ return m_redirectUri; }
/**
* <p>The location of the application that will receive the authorization code.
* Users authorize the service to send the request to this location.</p>
*/
inline bool RedirectUriHasBeenSet() const { return m_redirectUriHasBeenSet; }
/**
* <p>The location of the application that will receive the authorization code.
* Users authorize the service to send the request to this location.</p>
*/
inline void SetRedirectUri(const Aws::String& value) { m_redirectUriHasBeenSet = true; m_redirectUri = value; }
/**
* <p>The location of the application that will receive the authorization code.
* Users authorize the service to send the request to this location.</p>
*/
inline void SetRedirectUri(Aws::String&& value) { m_redirectUriHasBeenSet = true; m_redirectUri = std::move(value); }
/**
* <p>The location of the application that will receive the authorization code.
* Users authorize the service to send the request to this location.</p>
*/
inline void SetRedirectUri(const char* value) { m_redirectUriHasBeenSet = true; m_redirectUri.assign(value); }
/**
* <p>The location of the application that will receive the authorization code.
* Users authorize the service to send the request to this location.</p>
*/
inline CreateTokenRequest& WithRedirectUri(const Aws::String& value) { SetRedirectUri(value); return *this;}
/**
* <p>The location of the application that will receive the authorization code.
* Users authorize the service to send the request to this location.</p>
*/
inline CreateTokenRequest& WithRedirectUri(Aws::String&& value) { SetRedirectUri(std::move(value)); return *this;}
/**
* <p>The location of the application that will receive the authorization code.
* Users authorize the service to send the request to this location.</p>
*/
inline CreateTokenRequest& WithRedirectUri(const char* value) { SetRedirectUri(value); return *this;}
private:
Aws::String m_clientId;
bool m_clientIdHasBeenSet;
Aws::String m_clientSecret;
bool m_clientSecretHasBeenSet;
Aws::String m_grantType;
bool m_grantTypeHasBeenSet;
Aws::String m_deviceCode;
bool m_deviceCodeHasBeenSet;
Aws::String m_code;
bool m_codeHasBeenSet;
Aws::String m_refreshToken;
bool m_refreshTokenHasBeenSet;
Aws::Vector<Aws::String> m_scope;
bool m_scopeHasBeenSet;
Aws::String m_redirectUri;
bool m_redirectUriHasBeenSet;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,230 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SSOOIDC
{
namespace Model
{
class AWS_SSOOIDC_API CreateTokenResult
{
public:
CreateTokenResult();
CreateTokenResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
CreateTokenResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>An opaque token to access AWS SSO resources assigned to a user.</p>
*/
inline const Aws::String& GetAccessToken() const{ return m_accessToken; }
/**
* <p>An opaque token to access AWS SSO resources assigned to a user.</p>
*/
inline void SetAccessToken(const Aws::String& value) { m_accessToken = value; }
/**
* <p>An opaque token to access AWS SSO resources assigned to a user.</p>
*/
inline void SetAccessToken(Aws::String&& value) { m_accessToken = std::move(value); }
/**
* <p>An opaque token to access AWS SSO resources assigned to a user.</p>
*/
inline void SetAccessToken(const char* value) { m_accessToken.assign(value); }
/**
* <p>An opaque token to access AWS SSO resources assigned to a user.</p>
*/
inline CreateTokenResult& WithAccessToken(const Aws::String& value) { SetAccessToken(value); return *this;}
/**
* <p>An opaque token to access AWS SSO resources assigned to a user.</p>
*/
inline CreateTokenResult& WithAccessToken(Aws::String&& value) { SetAccessToken(std::move(value)); return *this;}
/**
* <p>An opaque token to access AWS SSO resources assigned to a user.</p>
*/
inline CreateTokenResult& WithAccessToken(const char* value) { SetAccessToken(value); return *this;}
/**
* <p>Used to notify the client that the returned token is an access token. The
* supported type is <code>BearerToken</code>.</p>
*/
inline const Aws::String& GetTokenType() const{ return m_tokenType; }
/**
* <p>Used to notify the client that the returned token is an access token. The
* supported type is <code>BearerToken</code>.</p>
*/
inline void SetTokenType(const Aws::String& value) { m_tokenType = value; }
/**
* <p>Used to notify the client that the returned token is an access token. The
* supported type is <code>BearerToken</code>.</p>
*/
inline void SetTokenType(Aws::String&& value) { m_tokenType = std::move(value); }
/**
* <p>Used to notify the client that the returned token is an access token. The
* supported type is <code>BearerToken</code>.</p>
*/
inline void SetTokenType(const char* value) { m_tokenType.assign(value); }
/**
* <p>Used to notify the client that the returned token is an access token. The
* supported type is <code>BearerToken</code>.</p>
*/
inline CreateTokenResult& WithTokenType(const Aws::String& value) { SetTokenType(value); return *this;}
/**
* <p>Used to notify the client that the returned token is an access token. The
* supported type is <code>BearerToken</code>.</p>
*/
inline CreateTokenResult& WithTokenType(Aws::String&& value) { SetTokenType(std::move(value)); return *this;}
/**
* <p>Used to notify the client that the returned token is an access token. The
* supported type is <code>BearerToken</code>.</p>
*/
inline CreateTokenResult& WithTokenType(const char* value) { SetTokenType(value); return *this;}
/**
* <p>Indicates the time in seconds when an access token will expire.</p>
*/
inline int GetExpiresIn() const{ return m_expiresIn; }
/**
* <p>Indicates the time in seconds when an access token will expire.</p>
*/
inline void SetExpiresIn(int value) { m_expiresIn = value; }
/**
* <p>Indicates the time in seconds when an access token will expire.</p>
*/
inline CreateTokenResult& WithExpiresIn(int value) { SetExpiresIn(value); return *this;}
/**
* <p>A token that, if present, can be used to refresh a previously issued access
* token that might have expired.</p>
*/
inline const Aws::String& GetRefreshToken() const{ return m_refreshToken; }
/**
* <p>A token that, if present, can be used to refresh a previously issued access
* token that might have expired.</p>
*/
inline void SetRefreshToken(const Aws::String& value) { m_refreshToken = value; }
/**
* <p>A token that, if present, can be used to refresh a previously issued access
* token that might have expired.</p>
*/
inline void SetRefreshToken(Aws::String&& value) { m_refreshToken = std::move(value); }
/**
* <p>A token that, if present, can be used to refresh a previously issued access
* token that might have expired.</p>
*/
inline void SetRefreshToken(const char* value) { m_refreshToken.assign(value); }
/**
* <p>A token that, if present, can be used to refresh a previously issued access
* token that might have expired.</p>
*/
inline CreateTokenResult& WithRefreshToken(const Aws::String& value) { SetRefreshToken(value); return *this;}
/**
* <p>A token that, if present, can be used to refresh a previously issued access
* token that might have expired.</p>
*/
inline CreateTokenResult& WithRefreshToken(Aws::String&& value) { SetRefreshToken(std::move(value)); return *this;}
/**
* <p>A token that, if present, can be used to refresh a previously issued access
* token that might have expired.</p>
*/
inline CreateTokenResult& WithRefreshToken(const char* value) { SetRefreshToken(value); return *this;}
/**
* <p>The identifier of the user that associated with the access token, if
* present.</p>
*/
inline const Aws::String& GetIdToken() const{ return m_idToken; }
/**
* <p>The identifier of the user that associated with the access token, if
* present.</p>
*/
inline void SetIdToken(const Aws::String& value) { m_idToken = value; }
/**
* <p>The identifier of the user that associated with the access token, if
* present.</p>
*/
inline void SetIdToken(Aws::String&& value) { m_idToken = std::move(value); }
/**
* <p>The identifier of the user that associated with the access token, if
* present.</p>
*/
inline void SetIdToken(const char* value) { m_idToken.assign(value); }
/**
* <p>The identifier of the user that associated with the access token, if
* present.</p>
*/
inline CreateTokenResult& WithIdToken(const Aws::String& value) { SetIdToken(value); return *this;}
/**
* <p>The identifier of the user that associated with the access token, if
* present.</p>
*/
inline CreateTokenResult& WithIdToken(Aws::String&& value) { SetIdToken(std::move(value)); return *this;}
/**
* <p>The identifier of the user that associated with the access token, if
* present.</p>
*/
inline CreateTokenResult& WithIdToken(const char* value) { SetIdToken(value); return *this;}
private:
Aws::String m_accessToken;
Aws::String m_tokenType;
int m_expiresIn;
Aws::String m_refreshToken;
Aws::String m_idToken;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,101 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SSOOIDC
{
namespace Model
{
/**
* <p>Indicates that the token issued by the service is expired and is no longer
* valid.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/ExpiredTokenException">AWS
* API Reference</a></p>
*/
class AWS_SSOOIDC_API ExpiredTokenException
{
public:
ExpiredTokenException();
ExpiredTokenException(Aws::Utils::Json::JsonView jsonValue);
ExpiredTokenException& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
inline const Aws::String& GetError() const{ return m_error; }
inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
inline void SetError(const Aws::String& value) { m_errorHasBeenSet = true; m_error = value; }
inline void SetError(Aws::String&& value) { m_errorHasBeenSet = true; m_error = std::move(value); }
inline void SetError(const char* value) { m_errorHasBeenSet = true; m_error.assign(value); }
inline ExpiredTokenException& WithError(const Aws::String& value) { SetError(value); return *this;}
inline ExpiredTokenException& WithError(Aws::String&& value) { SetError(std::move(value)); return *this;}
inline ExpiredTokenException& WithError(const char* value) { SetError(value); return *this;}
inline const Aws::String& GetError_description() const{ return m_error_description; }
inline bool Error_descriptionHasBeenSet() const { return m_error_descriptionHasBeenSet; }
inline void SetError_description(const Aws::String& value) { m_error_descriptionHasBeenSet = true; m_error_description = value; }
inline void SetError_description(Aws::String&& value) { m_error_descriptionHasBeenSet = true; m_error_description = std::move(value); }
inline void SetError_description(const char* value) { m_error_descriptionHasBeenSet = true; m_error_description.assign(value); }
inline ExpiredTokenException& WithError_description(const Aws::String& value) { SetError_description(value); return *this;}
inline ExpiredTokenException& WithError_description(Aws::String&& value) { SetError_description(std::move(value)); return *this;}
inline ExpiredTokenException& WithError_description(const char* value) { SetError_description(value); return *this;}
private:
Aws::String m_error;
bool m_errorHasBeenSet;
Aws::String m_error_description;
bool m_error_descriptionHasBeenSet;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,101 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SSOOIDC
{
namespace Model
{
/**
* <p>Indicates that an error from the service occurred while trying to process a
* request.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InternalServerException">AWS
* API Reference</a></p>
*/
class AWS_SSOOIDC_API InternalServerException
{
public:
InternalServerException();
InternalServerException(Aws::Utils::Json::JsonView jsonValue);
InternalServerException& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
inline const Aws::String& GetError() const{ return m_error; }
inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
inline void SetError(const Aws::String& value) { m_errorHasBeenSet = true; m_error = value; }
inline void SetError(Aws::String&& value) { m_errorHasBeenSet = true; m_error = std::move(value); }
inline void SetError(const char* value) { m_errorHasBeenSet = true; m_error.assign(value); }
inline InternalServerException& WithError(const Aws::String& value) { SetError(value); return *this;}
inline InternalServerException& WithError(Aws::String&& value) { SetError(std::move(value)); return *this;}
inline InternalServerException& WithError(const char* value) { SetError(value); return *this;}
inline const Aws::String& GetError_description() const{ return m_error_description; }
inline bool Error_descriptionHasBeenSet() const { return m_error_descriptionHasBeenSet; }
inline void SetError_description(const Aws::String& value) { m_error_descriptionHasBeenSet = true; m_error_description = value; }
inline void SetError_description(Aws::String&& value) { m_error_descriptionHasBeenSet = true; m_error_description = std::move(value); }
inline void SetError_description(const char* value) { m_error_descriptionHasBeenSet = true; m_error_description.assign(value); }
inline InternalServerException& WithError_description(const Aws::String& value) { SetError_description(value); return *this;}
inline InternalServerException& WithError_description(Aws::String&& value) { SetError_description(std::move(value)); return *this;}
inline InternalServerException& WithError_description(const char* value) { SetError_description(value); return *this;}
private:
Aws::String m_error;
bool m_errorHasBeenSet;
Aws::String m_error_description;
bool m_error_descriptionHasBeenSet;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,103 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SSOOIDC
{
namespace Model
{
/**
* <p>Indicates that the <code>clientId</code> or <code>clientSecret</code> in the
* request is invalid. For example, this can occur when a client sends an incorrect
* <code>clientId</code> or an expired <code>clientSecret</code>.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InvalidClientException">AWS
* API Reference</a></p>
*/
class AWS_SSOOIDC_API InvalidClientException
{
public:
InvalidClientException();
InvalidClientException(Aws::Utils::Json::JsonView jsonValue);
InvalidClientException& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
inline const Aws::String& GetError() const{ return m_error; }
inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
inline void SetError(const Aws::String& value) { m_errorHasBeenSet = true; m_error = value; }
inline void SetError(Aws::String&& value) { m_errorHasBeenSet = true; m_error = std::move(value); }
inline void SetError(const char* value) { m_errorHasBeenSet = true; m_error.assign(value); }
inline InvalidClientException& WithError(const Aws::String& value) { SetError(value); return *this;}
inline InvalidClientException& WithError(Aws::String&& value) { SetError(std::move(value)); return *this;}
inline InvalidClientException& WithError(const char* value) { SetError(value); return *this;}
inline const Aws::String& GetError_description() const{ return m_error_description; }
inline bool Error_descriptionHasBeenSet() const { return m_error_descriptionHasBeenSet; }
inline void SetError_description(const Aws::String& value) { m_error_descriptionHasBeenSet = true; m_error_description = value; }
inline void SetError_description(Aws::String&& value) { m_error_descriptionHasBeenSet = true; m_error_description = std::move(value); }
inline void SetError_description(const char* value) { m_error_descriptionHasBeenSet = true; m_error_description.assign(value); }
inline InvalidClientException& WithError_description(const Aws::String& value) { SetError_description(value); return *this;}
inline InvalidClientException& WithError_description(Aws::String&& value) { SetError_description(std::move(value)); return *this;}
inline InvalidClientException& WithError_description(const char* value) { SetError_description(value); return *this;}
private:
Aws::String m_error;
bool m_errorHasBeenSet;
Aws::String m_error_description;
bool m_error_descriptionHasBeenSet;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,101 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SSOOIDC
{
namespace Model
{
/**
* <p>Indicates that the client information sent in the request during registration
* is invalid.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InvalidClientMetadataException">AWS
* API Reference</a></p>
*/
class AWS_SSOOIDC_API InvalidClientMetadataException
{
public:
InvalidClientMetadataException();
InvalidClientMetadataException(Aws::Utils::Json::JsonView jsonValue);
InvalidClientMetadataException& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
inline const Aws::String& GetError() const{ return m_error; }
inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
inline void SetError(const Aws::String& value) { m_errorHasBeenSet = true; m_error = value; }
inline void SetError(Aws::String&& value) { m_errorHasBeenSet = true; m_error = std::move(value); }
inline void SetError(const char* value) { m_errorHasBeenSet = true; m_error.assign(value); }
inline InvalidClientMetadataException& WithError(const Aws::String& value) { SetError(value); return *this;}
inline InvalidClientMetadataException& WithError(Aws::String&& value) { SetError(std::move(value)); return *this;}
inline InvalidClientMetadataException& WithError(const char* value) { SetError(value); return *this;}
inline const Aws::String& GetError_description() const{ return m_error_description; }
inline bool Error_descriptionHasBeenSet() const { return m_error_descriptionHasBeenSet; }
inline void SetError_description(const Aws::String& value) { m_error_descriptionHasBeenSet = true; m_error_description = value; }
inline void SetError_description(Aws::String&& value) { m_error_descriptionHasBeenSet = true; m_error_description = std::move(value); }
inline void SetError_description(const char* value) { m_error_descriptionHasBeenSet = true; m_error_description.assign(value); }
inline InvalidClientMetadataException& WithError_description(const Aws::String& value) { SetError_description(value); return *this;}
inline InvalidClientMetadataException& WithError_description(Aws::String&& value) { SetError_description(std::move(value)); return *this;}
inline InvalidClientMetadataException& WithError_description(const char* value) { SetError_description(value); return *this;}
private:
Aws::String m_error;
bool m_errorHasBeenSet;
Aws::String m_error_description;
bool m_error_descriptionHasBeenSet;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,102 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SSOOIDC
{
namespace Model
{
/**
* <p>Indicates that a request contains an invalid grant. This can occur if a
* client makes a <a>CreateToken</a> request with an invalid grant
* type.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InvalidGrantException">AWS
* API Reference</a></p>
*/
class AWS_SSOOIDC_API InvalidGrantException
{
public:
InvalidGrantException();
InvalidGrantException(Aws::Utils::Json::JsonView jsonValue);
InvalidGrantException& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
inline const Aws::String& GetError() const{ return m_error; }
inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
inline void SetError(const Aws::String& value) { m_errorHasBeenSet = true; m_error = value; }
inline void SetError(Aws::String&& value) { m_errorHasBeenSet = true; m_error = std::move(value); }
inline void SetError(const char* value) { m_errorHasBeenSet = true; m_error.assign(value); }
inline InvalidGrantException& WithError(const Aws::String& value) { SetError(value); return *this;}
inline InvalidGrantException& WithError(Aws::String&& value) { SetError(std::move(value)); return *this;}
inline InvalidGrantException& WithError(const char* value) { SetError(value); return *this;}
inline const Aws::String& GetError_description() const{ return m_error_description; }
inline bool Error_descriptionHasBeenSet() const { return m_error_descriptionHasBeenSet; }
inline void SetError_description(const Aws::String& value) { m_error_descriptionHasBeenSet = true; m_error_description = value; }
inline void SetError_description(Aws::String&& value) { m_error_descriptionHasBeenSet = true; m_error_description = std::move(value); }
inline void SetError_description(const char* value) { m_error_descriptionHasBeenSet = true; m_error_description.assign(value); }
inline InvalidGrantException& WithError_description(const Aws::String& value) { SetError_description(value); return *this;}
inline InvalidGrantException& WithError_description(Aws::String&& value) { SetError_description(std::move(value)); return *this;}
inline InvalidGrantException& WithError_description(const char* value) { SetError_description(value); return *this;}
private:
Aws::String m_error;
bool m_errorHasBeenSet;
Aws::String m_error_description;
bool m_error_descriptionHasBeenSet;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,102 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SSOOIDC
{
namespace Model
{
/**
* <p>Indicates that something is wrong with the input to the request. For example,
* a required parameter might be missing or out of range.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InvalidRequestException">AWS
* API Reference</a></p>
*/
class AWS_SSOOIDC_API InvalidRequestException
{
public:
InvalidRequestException();
InvalidRequestException(Aws::Utils::Json::JsonView jsonValue);
InvalidRequestException& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
inline const Aws::String& GetError() const{ return m_error; }
inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
inline void SetError(const Aws::String& value) { m_errorHasBeenSet = true; m_error = value; }
inline void SetError(Aws::String&& value) { m_errorHasBeenSet = true; m_error = std::move(value); }
inline void SetError(const char* value) { m_errorHasBeenSet = true; m_error.assign(value); }
inline InvalidRequestException& WithError(const Aws::String& value) { SetError(value); return *this;}
inline InvalidRequestException& WithError(Aws::String&& value) { SetError(std::move(value)); return *this;}
inline InvalidRequestException& WithError(const char* value) { SetError(value); return *this;}
inline const Aws::String& GetError_description() const{ return m_error_description; }
inline bool Error_descriptionHasBeenSet() const { return m_error_descriptionHasBeenSet; }
inline void SetError_description(const Aws::String& value) { m_error_descriptionHasBeenSet = true; m_error_description = value; }
inline void SetError_description(Aws::String&& value) { m_error_descriptionHasBeenSet = true; m_error_description = std::move(value); }
inline void SetError_description(const char* value) { m_error_descriptionHasBeenSet = true; m_error_description.assign(value); }
inline InvalidRequestException& WithError_description(const Aws::String& value) { SetError_description(value); return *this;}
inline InvalidRequestException& WithError_description(Aws::String&& value) { SetError_description(std::move(value)); return *this;}
inline InvalidRequestException& WithError_description(const char* value) { SetError_description(value); return *this;}
private:
Aws::String m_error;
bool m_errorHasBeenSet;
Aws::String m_error_description;
bool m_error_descriptionHasBeenSet;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,101 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SSOOIDC
{
namespace Model
{
/**
* <p>Indicates that the scope provided in the request is invalid.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InvalidScopeException">AWS
* API Reference</a></p>
*/
class AWS_SSOOIDC_API InvalidScopeException
{
public:
InvalidScopeException();
InvalidScopeException(Aws::Utils::Json::JsonView jsonValue);
InvalidScopeException& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
inline const Aws::String& GetError() const{ return m_error; }
inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
inline void SetError(const Aws::String& value) { m_errorHasBeenSet = true; m_error = value; }
inline void SetError(Aws::String&& value) { m_errorHasBeenSet = true; m_error = std::move(value); }
inline void SetError(const char* value) { m_errorHasBeenSet = true; m_error.assign(value); }
inline InvalidScopeException& WithError(const Aws::String& value) { SetError(value); return *this;}
inline InvalidScopeException& WithError(Aws::String&& value) { SetError(std::move(value)); return *this;}
inline InvalidScopeException& WithError(const char* value) { SetError(value); return *this;}
inline const Aws::String& GetError_description() const{ return m_error_description; }
inline bool Error_descriptionHasBeenSet() const { return m_error_descriptionHasBeenSet; }
inline void SetError_description(const Aws::String& value) { m_error_descriptionHasBeenSet = true; m_error_description = value; }
inline void SetError_description(Aws::String&& value) { m_error_descriptionHasBeenSet = true; m_error_description = std::move(value); }
inline void SetError_description(const char* value) { m_error_descriptionHasBeenSet = true; m_error_description.assign(value); }
inline InvalidScopeException& WithError_description(const Aws::String& value) { SetError_description(value); return *this;}
inline InvalidScopeException& WithError_description(Aws::String&& value) { SetError_description(std::move(value)); return *this;}
inline InvalidScopeException& WithError_description(const char* value) { SetError_description(value); return *this;}
private:
Aws::String m_error;
bool m_errorHasBeenSet;
Aws::String m_error_description;
bool m_error_descriptionHasBeenSet;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,194 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/sso-oidc/SSOOIDCRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <utility>
namespace Aws
{
namespace SSOOIDC
{
namespace Model
{
/**
*/
class AWS_SSOOIDC_API RegisterClientRequest : public SSOOIDCRequest
{
public:
RegisterClientRequest();
// 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 "RegisterClient"; }
Aws::String SerializePayload() const override;
/**
* <p>The friendly name of the client.</p>
*/
inline const Aws::String& GetClientName() const{ return m_clientName; }
/**
* <p>The friendly name of the client.</p>
*/
inline bool ClientNameHasBeenSet() const { return m_clientNameHasBeenSet; }
/**
* <p>The friendly name of the client.</p>
*/
inline void SetClientName(const Aws::String& value) { m_clientNameHasBeenSet = true; m_clientName = value; }
/**
* <p>The friendly name of the client.</p>
*/
inline void SetClientName(Aws::String&& value) { m_clientNameHasBeenSet = true; m_clientName = std::move(value); }
/**
* <p>The friendly name of the client.</p>
*/
inline void SetClientName(const char* value) { m_clientNameHasBeenSet = true; m_clientName.assign(value); }
/**
* <p>The friendly name of the client.</p>
*/
inline RegisterClientRequest& WithClientName(const Aws::String& value) { SetClientName(value); return *this;}
/**
* <p>The friendly name of the client.</p>
*/
inline RegisterClientRequest& WithClientName(Aws::String&& value) { SetClientName(std::move(value)); return *this;}
/**
* <p>The friendly name of the client.</p>
*/
inline RegisterClientRequest& WithClientName(const char* value) { SetClientName(value); return *this;}
/**
* <p>The type of client. The service supports only <code>public</code> as a client
* type. Anything other than public will be rejected by the service.</p>
*/
inline const Aws::String& GetClientType() const{ return m_clientType; }
/**
* <p>The type of client. The service supports only <code>public</code> as a client
* type. Anything other than public will be rejected by the service.</p>
*/
inline bool ClientTypeHasBeenSet() const { return m_clientTypeHasBeenSet; }
/**
* <p>The type of client. The service supports only <code>public</code> as a client
* type. Anything other than public will be rejected by the service.</p>
*/
inline void SetClientType(const Aws::String& value) { m_clientTypeHasBeenSet = true; m_clientType = value; }
/**
* <p>The type of client. The service supports only <code>public</code> as a client
* type. Anything other than public will be rejected by the service.</p>
*/
inline void SetClientType(Aws::String&& value) { m_clientTypeHasBeenSet = true; m_clientType = std::move(value); }
/**
* <p>The type of client. The service supports only <code>public</code> as a client
* type. Anything other than public will be rejected by the service.</p>
*/
inline void SetClientType(const char* value) { m_clientTypeHasBeenSet = true; m_clientType.assign(value); }
/**
* <p>The type of client. The service supports only <code>public</code> as a client
* type. Anything other than public will be rejected by the service.</p>
*/
inline RegisterClientRequest& WithClientType(const Aws::String& value) { SetClientType(value); return *this;}
/**
* <p>The type of client. The service supports only <code>public</code> as a client
* type. Anything other than public will be rejected by the service.</p>
*/
inline RegisterClientRequest& WithClientType(Aws::String&& value) { SetClientType(std::move(value)); return *this;}
/**
* <p>The type of client. The service supports only <code>public</code> as a client
* type. Anything other than public will be rejected by the service.</p>
*/
inline RegisterClientRequest& WithClientType(const char* value) { SetClientType(value); return *this;}
/**
* <p>The list of scopes that are defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline const Aws::Vector<Aws::String>& GetScopes() const{ return m_scopes; }
/**
* <p>The list of scopes that are defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline bool ScopesHasBeenSet() const { return m_scopesHasBeenSet; }
/**
* <p>The list of scopes that are defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline void SetScopes(const Aws::Vector<Aws::String>& value) { m_scopesHasBeenSet = true; m_scopes = value; }
/**
* <p>The list of scopes that are defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline void SetScopes(Aws::Vector<Aws::String>&& value) { m_scopesHasBeenSet = true; m_scopes = std::move(value); }
/**
* <p>The list of scopes that are defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline RegisterClientRequest& WithScopes(const Aws::Vector<Aws::String>& value) { SetScopes(value); return *this;}
/**
* <p>The list of scopes that are defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline RegisterClientRequest& WithScopes(Aws::Vector<Aws::String>&& value) { SetScopes(std::move(value)); return *this;}
/**
* <p>The list of scopes that are defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline RegisterClientRequest& AddScopes(const Aws::String& value) { m_scopesHasBeenSet = true; m_scopes.push_back(value); return *this; }
/**
* <p>The list of scopes that are defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline RegisterClientRequest& AddScopes(Aws::String&& value) { m_scopesHasBeenSet = true; m_scopes.push_back(std::move(value)); return *this; }
/**
* <p>The list of scopes that are defined by the client. Upon authorization, this
* list is used to restrict permissions when granting an access token.</p>
*/
inline RegisterClientRequest& AddScopes(const char* value) { m_scopesHasBeenSet = true; m_scopes.push_back(value); return *this; }
private:
Aws::String m_clientName;
bool m_clientNameHasBeenSet;
Aws::String m_clientType;
bool m_clientTypeHasBeenSet;
Aws::Vector<Aws::String> m_scopes;
bool m_scopesHasBeenSet;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,247 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SSOOIDC
{
namespace Model
{
class AWS_SSOOIDC_API RegisterClientResult
{
public:
RegisterClientResult();
RegisterClientResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
RegisterClientResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The unique identifier string for each client. This client uses this
* identifier to get authenticated by the service in subsequent calls.</p>
*/
inline const Aws::String& GetClientId() const{ return m_clientId; }
/**
* <p>The unique identifier string for each client. This client uses this
* identifier to get authenticated by the service in subsequent calls.</p>
*/
inline void SetClientId(const Aws::String& value) { m_clientId = value; }
/**
* <p>The unique identifier string for each client. This client uses this
* identifier to get authenticated by the service in subsequent calls.</p>
*/
inline void SetClientId(Aws::String&& value) { m_clientId = std::move(value); }
/**
* <p>The unique identifier string for each client. This client uses this
* identifier to get authenticated by the service in subsequent calls.</p>
*/
inline void SetClientId(const char* value) { m_clientId.assign(value); }
/**
* <p>The unique identifier string for each client. This client uses this
* identifier to get authenticated by the service in subsequent calls.</p>
*/
inline RegisterClientResult& WithClientId(const Aws::String& value) { SetClientId(value); return *this;}
/**
* <p>The unique identifier string for each client. This client uses this
* identifier to get authenticated by the service in subsequent calls.</p>
*/
inline RegisterClientResult& WithClientId(Aws::String&& value) { SetClientId(std::move(value)); return *this;}
/**
* <p>The unique identifier string for each client. This client uses this
* identifier to get authenticated by the service in subsequent calls.</p>
*/
inline RegisterClientResult& WithClientId(const char* value) { SetClientId(value); return *this;}
/**
* <p>A secret string generated for the client. The client will use this string to
* get authenticated by the service in subsequent calls.</p>
*/
inline const Aws::String& GetClientSecret() const{ return m_clientSecret; }
/**
* <p>A secret string generated for the client. The client will use this string to
* get authenticated by the service in subsequent calls.</p>
*/
inline void SetClientSecret(const Aws::String& value) { m_clientSecret = value; }
/**
* <p>A secret string generated for the client. The client will use this string to
* get authenticated by the service in subsequent calls.</p>
*/
inline void SetClientSecret(Aws::String&& value) { m_clientSecret = std::move(value); }
/**
* <p>A secret string generated for the client. The client will use this string to
* get authenticated by the service in subsequent calls.</p>
*/
inline void SetClientSecret(const char* value) { m_clientSecret.assign(value); }
/**
* <p>A secret string generated for the client. The client will use this string to
* get authenticated by the service in subsequent calls.</p>
*/
inline RegisterClientResult& WithClientSecret(const Aws::String& value) { SetClientSecret(value); return *this;}
/**
* <p>A secret string generated for the client. The client will use this string to
* get authenticated by the service in subsequent calls.</p>
*/
inline RegisterClientResult& WithClientSecret(Aws::String&& value) { SetClientSecret(std::move(value)); return *this;}
/**
* <p>A secret string generated for the client. The client will use this string to
* get authenticated by the service in subsequent calls.</p>
*/
inline RegisterClientResult& WithClientSecret(const char* value) { SetClientSecret(value); return *this;}
/**
* <p>Indicates the time at which the <code>clientId</code> and
* <code>clientSecret</code> were issued.</p>
*/
inline long long GetClientIdIssuedAt() const{ return m_clientIdIssuedAt; }
/**
* <p>Indicates the time at which the <code>clientId</code> and
* <code>clientSecret</code> were issued.</p>
*/
inline void SetClientIdIssuedAt(long long value) { m_clientIdIssuedAt = value; }
/**
* <p>Indicates the time at which the <code>clientId</code> and
* <code>clientSecret</code> were issued.</p>
*/
inline RegisterClientResult& WithClientIdIssuedAt(long long value) { SetClientIdIssuedAt(value); return *this;}
/**
* <p>Indicates the time at which the <code>clientId</code> and
* <code>clientSecret</code> will become invalid.</p>
*/
inline long long GetClientSecretExpiresAt() const{ return m_clientSecretExpiresAt; }
/**
* <p>Indicates the time at which the <code>clientId</code> and
* <code>clientSecret</code> will become invalid.</p>
*/
inline void SetClientSecretExpiresAt(long long value) { m_clientSecretExpiresAt = value; }
/**
* <p>Indicates the time at which the <code>clientId</code> and
* <code>clientSecret</code> will become invalid.</p>
*/
inline RegisterClientResult& WithClientSecretExpiresAt(long long value) { SetClientSecretExpiresAt(value); return *this;}
/**
* <p>The endpoint where the client can request authorization.</p>
*/
inline const Aws::String& GetAuthorizationEndpoint() const{ return m_authorizationEndpoint; }
/**
* <p>The endpoint where the client can request authorization.</p>
*/
inline void SetAuthorizationEndpoint(const Aws::String& value) { m_authorizationEndpoint = value; }
/**
* <p>The endpoint where the client can request authorization.</p>
*/
inline void SetAuthorizationEndpoint(Aws::String&& value) { m_authorizationEndpoint = std::move(value); }
/**
* <p>The endpoint where the client can request authorization.</p>
*/
inline void SetAuthorizationEndpoint(const char* value) { m_authorizationEndpoint.assign(value); }
/**
* <p>The endpoint where the client can request authorization.</p>
*/
inline RegisterClientResult& WithAuthorizationEndpoint(const Aws::String& value) { SetAuthorizationEndpoint(value); return *this;}
/**
* <p>The endpoint where the client can request authorization.</p>
*/
inline RegisterClientResult& WithAuthorizationEndpoint(Aws::String&& value) { SetAuthorizationEndpoint(std::move(value)); return *this;}
/**
* <p>The endpoint where the client can request authorization.</p>
*/
inline RegisterClientResult& WithAuthorizationEndpoint(const char* value) { SetAuthorizationEndpoint(value); return *this;}
/**
* <p>The endpoint where the client can get an access token.</p>
*/
inline const Aws::String& GetTokenEndpoint() const{ return m_tokenEndpoint; }
/**
* <p>The endpoint where the client can get an access token.</p>
*/
inline void SetTokenEndpoint(const Aws::String& value) { m_tokenEndpoint = value; }
/**
* <p>The endpoint where the client can get an access token.</p>
*/
inline void SetTokenEndpoint(Aws::String&& value) { m_tokenEndpoint = std::move(value); }
/**
* <p>The endpoint where the client can get an access token.</p>
*/
inline void SetTokenEndpoint(const char* value) { m_tokenEndpoint.assign(value); }
/**
* <p>The endpoint where the client can get an access token.</p>
*/
inline RegisterClientResult& WithTokenEndpoint(const Aws::String& value) { SetTokenEndpoint(value); return *this;}
/**
* <p>The endpoint where the client can get an access token.</p>
*/
inline RegisterClientResult& WithTokenEndpoint(Aws::String&& value) { SetTokenEndpoint(std::move(value)); return *this;}
/**
* <p>The endpoint where the client can get an access token.</p>
*/
inline RegisterClientResult& WithTokenEndpoint(const char* value) { SetTokenEndpoint(value); return *this;}
private:
Aws::String m_clientId;
Aws::String m_clientSecret;
long long m_clientIdIssuedAt;
long long m_clientSecretExpiresAt;
Aws::String m_authorizationEndpoint;
Aws::String m_tokenEndpoint;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,101 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SSOOIDC
{
namespace Model
{
/**
* <p>Indicates that the client is making the request too frequently and is more
* than the service can handle. </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/SlowDownException">AWS
* API Reference</a></p>
*/
class AWS_SSOOIDC_API SlowDownException
{
public:
SlowDownException();
SlowDownException(Aws::Utils::Json::JsonView jsonValue);
SlowDownException& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
inline const Aws::String& GetError() const{ return m_error; }
inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
inline void SetError(const Aws::String& value) { m_errorHasBeenSet = true; m_error = value; }
inline void SetError(Aws::String&& value) { m_errorHasBeenSet = true; m_error = std::move(value); }
inline void SetError(const char* value) { m_errorHasBeenSet = true; m_error.assign(value); }
inline SlowDownException& WithError(const Aws::String& value) { SetError(value); return *this;}
inline SlowDownException& WithError(Aws::String&& value) { SetError(std::move(value)); return *this;}
inline SlowDownException& WithError(const char* value) { SetError(value); return *this;}
inline const Aws::String& GetError_description() const{ return m_error_description; }
inline bool Error_descriptionHasBeenSet() const { return m_error_descriptionHasBeenSet; }
inline void SetError_description(const Aws::String& value) { m_error_descriptionHasBeenSet = true; m_error_description = value; }
inline void SetError_description(Aws::String&& value) { m_error_descriptionHasBeenSet = true; m_error_description = std::move(value); }
inline void SetError_description(const char* value) { m_error_descriptionHasBeenSet = true; m_error_description.assign(value); }
inline SlowDownException& WithError_description(const Aws::String& value) { SetError_description(value); return *this;}
inline SlowDownException& WithError_description(Aws::String&& value) { SetError_description(std::move(value)); return *this;}
inline SlowDownException& WithError_description(const char* value) { SetError_description(value); return *this;}
private:
Aws::String m_error;
bool m_errorHasBeenSet;
Aws::String m_error_description;
bool m_error_descriptionHasBeenSet;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,211 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/sso-oidc/SSOOIDCRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace SSOOIDC
{
namespace Model
{
/**
*/
class AWS_SSOOIDC_API StartDeviceAuthorizationRequest : public SSOOIDCRequest
{
public:
StartDeviceAuthorizationRequest();
// 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 "StartDeviceAuthorization"; }
Aws::String SerializePayload() const override;
/**
* <p>The unique identifier string for the client that is registered with AWS SSO.
* This value should come from the persisted result of the <a>RegisterClient</a>
* API operation.</p>
*/
inline const Aws::String& GetClientId() const{ return m_clientId; }
/**
* <p>The unique identifier string for the client that is registered with AWS SSO.
* This value should come from the persisted result of the <a>RegisterClient</a>
* API operation.</p>
*/
inline bool ClientIdHasBeenSet() const { return m_clientIdHasBeenSet; }
/**
* <p>The unique identifier string for the client that is registered with AWS SSO.
* This value should come from the persisted result of the <a>RegisterClient</a>
* API operation.</p>
*/
inline void SetClientId(const Aws::String& value) { m_clientIdHasBeenSet = true; m_clientId = value; }
/**
* <p>The unique identifier string for the client that is registered with AWS SSO.
* This value should come from the persisted result of the <a>RegisterClient</a>
* API operation.</p>
*/
inline void SetClientId(Aws::String&& value) { m_clientIdHasBeenSet = true; m_clientId = std::move(value); }
/**
* <p>The unique identifier string for the client that is registered with AWS SSO.
* This value should come from the persisted result of the <a>RegisterClient</a>
* API operation.</p>
*/
inline void SetClientId(const char* value) { m_clientIdHasBeenSet = true; m_clientId.assign(value); }
/**
* <p>The unique identifier string for the client that is registered with AWS SSO.
* This value should come from the persisted result of the <a>RegisterClient</a>
* API operation.</p>
*/
inline StartDeviceAuthorizationRequest& WithClientId(const Aws::String& value) { SetClientId(value); return *this;}
/**
* <p>The unique identifier string for the client that is registered with AWS SSO.
* This value should come from the persisted result of the <a>RegisterClient</a>
* API operation.</p>
*/
inline StartDeviceAuthorizationRequest& WithClientId(Aws::String&& value) { SetClientId(std::move(value)); return *this;}
/**
* <p>The unique identifier string for the client that is registered with AWS SSO.
* This value should come from the persisted result of the <a>RegisterClient</a>
* API operation.</p>
*/
inline StartDeviceAuthorizationRequest& WithClientId(const char* value) { SetClientId(value); return *this;}
/**
* <p>A secret string that is generated for the client. This value should come from
* the persisted result of the <a>RegisterClient</a> API operation.</p>
*/
inline const Aws::String& GetClientSecret() const{ return m_clientSecret; }
/**
* <p>A secret string that is generated for the client. This value should come from
* the persisted result of the <a>RegisterClient</a> API operation.</p>
*/
inline bool ClientSecretHasBeenSet() const { return m_clientSecretHasBeenSet; }
/**
* <p>A secret string that is generated for the client. This value should come from
* the persisted result of the <a>RegisterClient</a> API operation.</p>
*/
inline void SetClientSecret(const Aws::String& value) { m_clientSecretHasBeenSet = true; m_clientSecret = value; }
/**
* <p>A secret string that is generated for the client. This value should come from
* the persisted result of the <a>RegisterClient</a> API operation.</p>
*/
inline void SetClientSecret(Aws::String&& value) { m_clientSecretHasBeenSet = true; m_clientSecret = std::move(value); }
/**
* <p>A secret string that is generated for the client. This value should come from
* the persisted result of the <a>RegisterClient</a> API operation.</p>
*/
inline void SetClientSecret(const char* value) { m_clientSecretHasBeenSet = true; m_clientSecret.assign(value); }
/**
* <p>A secret string that is generated for the client. This value should come from
* the persisted result of the <a>RegisterClient</a> API operation.</p>
*/
inline StartDeviceAuthorizationRequest& WithClientSecret(const Aws::String& value) { SetClientSecret(value); return *this;}
/**
* <p>A secret string that is generated for the client. This value should come from
* the persisted result of the <a>RegisterClient</a> API operation.</p>
*/
inline StartDeviceAuthorizationRequest& WithClientSecret(Aws::String&& value) { SetClientSecret(std::move(value)); return *this;}
/**
* <p>A secret string that is generated for the client. This value should come from
* the persisted result of the <a>RegisterClient</a> API operation.</p>
*/
inline StartDeviceAuthorizationRequest& WithClientSecret(const char* value) { SetClientSecret(value); return *this;}
/**
* <p>The URL for the AWS SSO user portal. For more information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html">Using
* the User Portal</a> in the <i>AWS Single Sign-On User Guide</i>.</p>
*/
inline const Aws::String& GetStartUrl() const{ return m_startUrl; }
/**
* <p>The URL for the AWS SSO user portal. For more information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html">Using
* the User Portal</a> in the <i>AWS Single Sign-On User Guide</i>.</p>
*/
inline bool StartUrlHasBeenSet() const { return m_startUrlHasBeenSet; }
/**
* <p>The URL for the AWS SSO user portal. For more information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html">Using
* the User Portal</a> in the <i>AWS Single Sign-On User Guide</i>.</p>
*/
inline void SetStartUrl(const Aws::String& value) { m_startUrlHasBeenSet = true; m_startUrl = value; }
/**
* <p>The URL for the AWS SSO user portal. For more information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html">Using
* the User Portal</a> in the <i>AWS Single Sign-On User Guide</i>.</p>
*/
inline void SetStartUrl(Aws::String&& value) { m_startUrlHasBeenSet = true; m_startUrl = std::move(value); }
/**
* <p>The URL for the AWS SSO user portal. For more information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html">Using
* the User Portal</a> in the <i>AWS Single Sign-On User Guide</i>.</p>
*/
inline void SetStartUrl(const char* value) { m_startUrlHasBeenSet = true; m_startUrl.assign(value); }
/**
* <p>The URL for the AWS SSO user portal. For more information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html">Using
* the User Portal</a> in the <i>AWS Single Sign-On User Guide</i>.</p>
*/
inline StartDeviceAuthorizationRequest& WithStartUrl(const Aws::String& value) { SetStartUrl(value); return *this;}
/**
* <p>The URL for the AWS SSO user portal. For more information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html">Using
* the User Portal</a> in the <i>AWS Single Sign-On User Guide</i>.</p>
*/
inline StartDeviceAuthorizationRequest& WithStartUrl(Aws::String&& value) { SetStartUrl(std::move(value)); return *this;}
/**
* <p>The URL for the AWS SSO user portal. For more information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html">Using
* the User Portal</a> in the <i>AWS Single Sign-On User Guide</i>.</p>
*/
inline StartDeviceAuthorizationRequest& WithStartUrl(const char* value) { SetStartUrl(value); return *this;}
private:
Aws::String m_clientId;
bool m_clientIdHasBeenSet;
Aws::String m_clientSecret;
bool m_clientSecretHasBeenSet;
Aws::String m_startUrl;
bool m_startUrlHasBeenSet;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,268 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SSOOIDC
{
namespace Model
{
class AWS_SSOOIDC_API StartDeviceAuthorizationResult
{
public:
StartDeviceAuthorizationResult();
StartDeviceAuthorizationResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
StartDeviceAuthorizationResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The short-lived code that is used by the device when polling for a session
* token.</p>
*/
inline const Aws::String& GetDeviceCode() const{ return m_deviceCode; }
/**
* <p>The short-lived code that is used by the device when polling for a session
* token.</p>
*/
inline void SetDeviceCode(const Aws::String& value) { m_deviceCode = value; }
/**
* <p>The short-lived code that is used by the device when polling for a session
* token.</p>
*/
inline void SetDeviceCode(Aws::String&& value) { m_deviceCode = std::move(value); }
/**
* <p>The short-lived code that is used by the device when polling for a session
* token.</p>
*/
inline void SetDeviceCode(const char* value) { m_deviceCode.assign(value); }
/**
* <p>The short-lived code that is used by the device when polling for a session
* token.</p>
*/
inline StartDeviceAuthorizationResult& WithDeviceCode(const Aws::String& value) { SetDeviceCode(value); return *this;}
/**
* <p>The short-lived code that is used by the device when polling for a session
* token.</p>
*/
inline StartDeviceAuthorizationResult& WithDeviceCode(Aws::String&& value) { SetDeviceCode(std::move(value)); return *this;}
/**
* <p>The short-lived code that is used by the device when polling for a session
* token.</p>
*/
inline StartDeviceAuthorizationResult& WithDeviceCode(const char* value) { SetDeviceCode(value); return *this;}
/**
* <p>A one-time user verification code. This is needed to authorize an in-use
* device.</p>
*/
inline const Aws::String& GetUserCode() const{ return m_userCode; }
/**
* <p>A one-time user verification code. This is needed to authorize an in-use
* device.</p>
*/
inline void SetUserCode(const Aws::String& value) { m_userCode = value; }
/**
* <p>A one-time user verification code. This is needed to authorize an in-use
* device.</p>
*/
inline void SetUserCode(Aws::String&& value) { m_userCode = std::move(value); }
/**
* <p>A one-time user verification code. This is needed to authorize an in-use
* device.</p>
*/
inline void SetUserCode(const char* value) { m_userCode.assign(value); }
/**
* <p>A one-time user verification code. This is needed to authorize an in-use
* device.</p>
*/
inline StartDeviceAuthorizationResult& WithUserCode(const Aws::String& value) { SetUserCode(value); return *this;}
/**
* <p>A one-time user verification code. This is needed to authorize an in-use
* device.</p>
*/
inline StartDeviceAuthorizationResult& WithUserCode(Aws::String&& value) { SetUserCode(std::move(value)); return *this;}
/**
* <p>A one-time user verification code. This is needed to authorize an in-use
* device.</p>
*/
inline StartDeviceAuthorizationResult& WithUserCode(const char* value) { SetUserCode(value); return *this;}
/**
* <p>The URI of the verification page that takes the <code>userCode</code> to
* authorize the device.</p>
*/
inline const Aws::String& GetVerificationUri() const{ return m_verificationUri; }
/**
* <p>The URI of the verification page that takes the <code>userCode</code> to
* authorize the device.</p>
*/
inline void SetVerificationUri(const Aws::String& value) { m_verificationUri = value; }
/**
* <p>The URI of the verification page that takes the <code>userCode</code> to
* authorize the device.</p>
*/
inline void SetVerificationUri(Aws::String&& value) { m_verificationUri = std::move(value); }
/**
* <p>The URI of the verification page that takes the <code>userCode</code> to
* authorize the device.</p>
*/
inline void SetVerificationUri(const char* value) { m_verificationUri.assign(value); }
/**
* <p>The URI of the verification page that takes the <code>userCode</code> to
* authorize the device.</p>
*/
inline StartDeviceAuthorizationResult& WithVerificationUri(const Aws::String& value) { SetVerificationUri(value); return *this;}
/**
* <p>The URI of the verification page that takes the <code>userCode</code> to
* authorize the device.</p>
*/
inline StartDeviceAuthorizationResult& WithVerificationUri(Aws::String&& value) { SetVerificationUri(std::move(value)); return *this;}
/**
* <p>The URI of the verification page that takes the <code>userCode</code> to
* authorize the device.</p>
*/
inline StartDeviceAuthorizationResult& WithVerificationUri(const char* value) { SetVerificationUri(value); return *this;}
/**
* <p>An alternate URL that the client can use to automatically launch a browser.
* This process skips the manual step in which the user visits the verification
* page and enters their code.</p>
*/
inline const Aws::String& GetVerificationUriComplete() const{ return m_verificationUriComplete; }
/**
* <p>An alternate URL that the client can use to automatically launch a browser.
* This process skips the manual step in which the user visits the verification
* page and enters their code.</p>
*/
inline void SetVerificationUriComplete(const Aws::String& value) { m_verificationUriComplete = value; }
/**
* <p>An alternate URL that the client can use to automatically launch a browser.
* This process skips the manual step in which the user visits the verification
* page and enters their code.</p>
*/
inline void SetVerificationUriComplete(Aws::String&& value) { m_verificationUriComplete = std::move(value); }
/**
* <p>An alternate URL that the client can use to automatically launch a browser.
* This process skips the manual step in which the user visits the verification
* page and enters their code.</p>
*/
inline void SetVerificationUriComplete(const char* value) { m_verificationUriComplete.assign(value); }
/**
* <p>An alternate URL that the client can use to automatically launch a browser.
* This process skips the manual step in which the user visits the verification
* page and enters their code.</p>
*/
inline StartDeviceAuthorizationResult& WithVerificationUriComplete(const Aws::String& value) { SetVerificationUriComplete(value); return *this;}
/**
* <p>An alternate URL that the client can use to automatically launch a browser.
* This process skips the manual step in which the user visits the verification
* page and enters their code.</p>
*/
inline StartDeviceAuthorizationResult& WithVerificationUriComplete(Aws::String&& value) { SetVerificationUriComplete(std::move(value)); return *this;}
/**
* <p>An alternate URL that the client can use to automatically launch a browser.
* This process skips the manual step in which the user visits the verification
* page and enters their code.</p>
*/
inline StartDeviceAuthorizationResult& WithVerificationUriComplete(const char* value) { SetVerificationUriComplete(value); return *this;}
/**
* <p>Indicates the number of seconds in which the verification code will become
* invalid.</p>
*/
inline int GetExpiresIn() const{ return m_expiresIn; }
/**
* <p>Indicates the number of seconds in which the verification code will become
* invalid.</p>
*/
inline void SetExpiresIn(int value) { m_expiresIn = value; }
/**
* <p>Indicates the number of seconds in which the verification code will become
* invalid.</p>
*/
inline StartDeviceAuthorizationResult& WithExpiresIn(int value) { SetExpiresIn(value); return *this;}
/**
* <p>Indicates the number of seconds the client must wait between attempts when
* polling for a session.</p>
*/
inline int GetInterval() const{ return m_interval; }
/**
* <p>Indicates the number of seconds the client must wait between attempts when
* polling for a session.</p>
*/
inline void SetInterval(int value) { m_interval = value; }
/**
* <p>Indicates the number of seconds the client must wait between attempts when
* polling for a session.</p>
*/
inline StartDeviceAuthorizationResult& WithInterval(int value) { SetInterval(value); return *this;}
private:
Aws::String m_deviceCode;
Aws::String m_userCode;
Aws::String m_verificationUri;
Aws::String m_verificationUriComplete;
int m_expiresIn;
int m_interval;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,102 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SSOOIDC
{
namespace Model
{
/**
* <p>Indicates that the client is not currently authorized to make the request.
* This can happen when a <code>clientId</code> is not issued for a public
* client.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/UnauthorizedClientException">AWS
* API Reference</a></p>
*/
class AWS_SSOOIDC_API UnauthorizedClientException
{
public:
UnauthorizedClientException();
UnauthorizedClientException(Aws::Utils::Json::JsonView jsonValue);
UnauthorizedClientException& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
inline const Aws::String& GetError() const{ return m_error; }
inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
inline void SetError(const Aws::String& value) { m_errorHasBeenSet = true; m_error = value; }
inline void SetError(Aws::String&& value) { m_errorHasBeenSet = true; m_error = std::move(value); }
inline void SetError(const char* value) { m_errorHasBeenSet = true; m_error.assign(value); }
inline UnauthorizedClientException& WithError(const Aws::String& value) { SetError(value); return *this;}
inline UnauthorizedClientException& WithError(Aws::String&& value) { SetError(std::move(value)); return *this;}
inline UnauthorizedClientException& WithError(const char* value) { SetError(value); return *this;}
inline const Aws::String& GetError_description() const{ return m_error_description; }
inline bool Error_descriptionHasBeenSet() const { return m_error_descriptionHasBeenSet; }
inline void SetError_description(const Aws::String& value) { m_error_descriptionHasBeenSet = true; m_error_description = value; }
inline void SetError_description(Aws::String&& value) { m_error_descriptionHasBeenSet = true; m_error_description = std::move(value); }
inline void SetError_description(const char* value) { m_error_descriptionHasBeenSet = true; m_error_description.assign(value); }
inline UnauthorizedClientException& WithError_description(const Aws::String& value) { SetError_description(value); return *this;}
inline UnauthorizedClientException& WithError_description(Aws::String&& value) { SetError_description(std::move(value)); return *this;}
inline UnauthorizedClientException& WithError_description(const char* value) { SetError_description(value); return *this;}
private:
Aws::String m_error;
bool m_errorHasBeenSet;
Aws::String m_error_description;
bool m_error_descriptionHasBeenSet;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws

View File

@@ -0,0 +1,101 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso-oidc/SSOOIDC_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SSOOIDC
{
namespace Model
{
/**
* <p>Indicates that the grant type in the request is not supported by the
* service.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/UnsupportedGrantTypeException">AWS
* API Reference</a></p>
*/
class AWS_SSOOIDC_API UnsupportedGrantTypeException
{
public:
UnsupportedGrantTypeException();
UnsupportedGrantTypeException(Aws::Utils::Json::JsonView jsonValue);
UnsupportedGrantTypeException& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
inline const Aws::String& GetError() const{ return m_error; }
inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
inline void SetError(const Aws::String& value) { m_errorHasBeenSet = true; m_error = value; }
inline void SetError(Aws::String&& value) { m_errorHasBeenSet = true; m_error = std::move(value); }
inline void SetError(const char* value) { m_errorHasBeenSet = true; m_error.assign(value); }
inline UnsupportedGrantTypeException& WithError(const Aws::String& value) { SetError(value); return *this;}
inline UnsupportedGrantTypeException& WithError(Aws::String&& value) { SetError(std::move(value)); return *this;}
inline UnsupportedGrantTypeException& WithError(const char* value) { SetError(value); return *this;}
inline const Aws::String& GetError_description() const{ return m_error_description; }
inline bool Error_descriptionHasBeenSet() const { return m_error_descriptionHasBeenSet; }
inline void SetError_description(const Aws::String& value) { m_error_descriptionHasBeenSet = true; m_error_description = value; }
inline void SetError_description(Aws::String&& value) { m_error_descriptionHasBeenSet = true; m_error_description = std::move(value); }
inline void SetError_description(const char* value) { m_error_descriptionHasBeenSet = true; m_error_description.assign(value); }
inline UnsupportedGrantTypeException& WithError_description(const Aws::String& value) { SetError_description(value); return *this;}
inline UnsupportedGrantTypeException& WithError_description(Aws::String&& value) { SetError_description(std::move(value)); return *this;}
inline UnsupportedGrantTypeException& WithError_description(const char* value) { SetError_description(value); return *this;}
private:
Aws::String m_error;
bool m_errorHasBeenSet;
Aws::String m_error_description;
bool m_error_descriptionHasBeenSet;
};
} // namespace Model
} // namespace SSOOIDC
} // namespace Aws