/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace APIGateway { namespace Model { /** *

Represents the response of the test invoke request for a custom * Authorizer

See Also:

AWS * API Reference

*/ class TestInvokeAuthorizerResult { public: AWS_APIGATEWAY_API TestInvokeAuthorizerResult(); AWS_APIGATEWAY_API TestInvokeAuthorizerResult(const Aws::AmazonWebServiceResult& result); AWS_APIGATEWAY_API TestInvokeAuthorizerResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

The HTTP status code that the client would have received. Value is 0 if the * authorizer succeeded.

*/ inline int GetClientStatus() const{ return m_clientStatus; } /** *

The HTTP status code that the client would have received. Value is 0 if the * authorizer succeeded.

*/ inline void SetClientStatus(int value) { m_clientStatus = value; } /** *

The HTTP status code that the client would have received. Value is 0 if the * authorizer succeeded.

*/ inline TestInvokeAuthorizerResult& WithClientStatus(int value) { SetClientStatus(value); return *this;} /** *

The API Gateway execution log for the test authorizer request.

*/ inline const Aws::String& GetLog() const{ return m_log; } /** *

The API Gateway execution log for the test authorizer request.

*/ inline void SetLog(const Aws::String& value) { m_log = value; } /** *

The API Gateway execution log for the test authorizer request.

*/ inline void SetLog(Aws::String&& value) { m_log = std::move(value); } /** *

The API Gateway execution log for the test authorizer request.

*/ inline void SetLog(const char* value) { m_log.assign(value); } /** *

The API Gateway execution log for the test authorizer request.

*/ inline TestInvokeAuthorizerResult& WithLog(const Aws::String& value) { SetLog(value); return *this;} /** *

The API Gateway execution log for the test authorizer request.

*/ inline TestInvokeAuthorizerResult& WithLog(Aws::String&& value) { SetLog(std::move(value)); return *this;} /** *

The API Gateway execution log for the test authorizer request.

*/ inline TestInvokeAuthorizerResult& WithLog(const char* value) { SetLog(value); return *this;} /** *

The execution latency of the test authorizer request.

*/ inline long long GetLatency() const{ return m_latency; } /** *

The execution latency of the test authorizer request.

*/ inline void SetLatency(long long value) { m_latency = value; } /** *

The execution latency of the test authorizer request.

*/ inline TestInvokeAuthorizerResult& WithLatency(long long value) { SetLatency(value); return *this;} /** *

The principal identity returned by the Authorizer

*/ inline const Aws::String& GetPrincipalId() const{ return m_principalId; } /** *

The principal identity returned by the Authorizer

*/ inline void SetPrincipalId(const Aws::String& value) { m_principalId = value; } /** *

The principal identity returned by the Authorizer

*/ inline void SetPrincipalId(Aws::String&& value) { m_principalId = std::move(value); } /** *

The principal identity returned by the Authorizer

*/ inline void SetPrincipalId(const char* value) { m_principalId.assign(value); } /** *

The principal identity returned by the Authorizer

*/ inline TestInvokeAuthorizerResult& WithPrincipalId(const Aws::String& value) { SetPrincipalId(value); return *this;} /** *

The principal identity returned by the Authorizer

*/ inline TestInvokeAuthorizerResult& WithPrincipalId(Aws::String&& value) { SetPrincipalId(std::move(value)); return *this;} /** *

The principal identity returned by the Authorizer

*/ inline TestInvokeAuthorizerResult& WithPrincipalId(const char* value) { SetPrincipalId(value); return *this;} /** *

The JSON policy document returned by the Authorizer

*/ inline const Aws::String& GetPolicy() const{ return m_policy; } /** *

The JSON policy document returned by the Authorizer

*/ inline void SetPolicy(const Aws::String& value) { m_policy = value; } /** *

The JSON policy document returned by the Authorizer

*/ inline void SetPolicy(Aws::String&& value) { m_policy = std::move(value); } /** *

The JSON policy document returned by the Authorizer

*/ inline void SetPolicy(const char* value) { m_policy.assign(value); } /** *

The JSON policy document returned by the Authorizer

*/ inline TestInvokeAuthorizerResult& WithPolicy(const Aws::String& value) { SetPolicy(value); return *this;} /** *

The JSON policy document returned by the Authorizer

*/ inline TestInvokeAuthorizerResult& WithPolicy(Aws::String&& value) { SetPolicy(std::move(value)); return *this;} /** *

The JSON policy document returned by the Authorizer

*/ inline TestInvokeAuthorizerResult& WithPolicy(const char* value) { SetPolicy(value); return *this;} /** *

The authorization response.

*/ inline const Aws::Map>& GetAuthorization() const{ return m_authorization; } /** *

The authorization response.

*/ inline void SetAuthorization(const Aws::Map>& value) { m_authorization = value; } /** *

The authorization response.

*/ inline void SetAuthorization(Aws::Map>&& value) { m_authorization = std::move(value); } /** *

The authorization response.

*/ inline TestInvokeAuthorizerResult& WithAuthorization(const Aws::Map>& value) { SetAuthorization(value); return *this;} /** *

The authorization response.

*/ inline TestInvokeAuthorizerResult& WithAuthorization(Aws::Map>&& value) { SetAuthorization(std::move(value)); return *this;} /** *

The authorization response.

*/ inline TestInvokeAuthorizerResult& AddAuthorization(const Aws::String& key, const Aws::Vector& value) { m_authorization.emplace(key, value); return *this; } /** *

The authorization response.

*/ inline TestInvokeAuthorizerResult& AddAuthorization(Aws::String&& key, const Aws::Vector& value) { m_authorization.emplace(std::move(key), value); return *this; } /** *

The authorization response.

*/ inline TestInvokeAuthorizerResult& AddAuthorization(const Aws::String& key, Aws::Vector&& value) { m_authorization.emplace(key, std::move(value)); return *this; } /** *

The authorization response.

*/ inline TestInvokeAuthorizerResult& AddAuthorization(Aws::String&& key, Aws::Vector&& value) { m_authorization.emplace(std::move(key), std::move(value)); return *this; } /** *

The authorization response.

*/ inline TestInvokeAuthorizerResult& AddAuthorization(const char* key, Aws::Vector&& value) { m_authorization.emplace(key, std::move(value)); return *this; } /** *

The authorization response.

*/ inline TestInvokeAuthorizerResult& AddAuthorization(const char* key, const Aws::Vector& value) { m_authorization.emplace(key, value); return *this; } /** *

The open identity claims, with any supported custom attributes, returned from * the Cognito Your User Pool configured for the API.

*/ inline const Aws::Map& GetClaims() const{ return m_claims; } /** *

The open identity claims, with any supported custom attributes, returned from * the Cognito Your User Pool configured for the API.

*/ inline void SetClaims(const Aws::Map& value) { m_claims = value; } /** *

The open identity claims, with any supported custom attributes, returned from * the Cognito Your User Pool configured for the API.

*/ inline void SetClaims(Aws::Map&& value) { m_claims = std::move(value); } /** *

The open identity claims, with any supported custom attributes, returned from * the Cognito Your User Pool configured for the API.

*/ inline TestInvokeAuthorizerResult& WithClaims(const Aws::Map& value) { SetClaims(value); return *this;} /** *

The open identity claims, with any supported custom attributes, returned from * the Cognito Your User Pool configured for the API.

*/ inline TestInvokeAuthorizerResult& WithClaims(Aws::Map&& value) { SetClaims(std::move(value)); return *this;} /** *

The open identity claims, with any supported custom attributes, returned from * the Cognito Your User Pool configured for the API.

*/ inline TestInvokeAuthorizerResult& AddClaims(const Aws::String& key, const Aws::String& value) { m_claims.emplace(key, value); return *this; } /** *

The open identity claims, with any supported custom attributes, returned from * the Cognito Your User Pool configured for the API.

*/ inline TestInvokeAuthorizerResult& AddClaims(Aws::String&& key, const Aws::String& value) { m_claims.emplace(std::move(key), value); return *this; } /** *

The open identity claims, with any supported custom attributes, returned from * the Cognito Your User Pool configured for the API.

*/ inline TestInvokeAuthorizerResult& AddClaims(const Aws::String& key, Aws::String&& value) { m_claims.emplace(key, std::move(value)); return *this; } /** *

The open identity claims, with any supported custom attributes, returned from * the Cognito Your User Pool configured for the API.

*/ inline TestInvokeAuthorizerResult& AddClaims(Aws::String&& key, Aws::String&& value) { m_claims.emplace(std::move(key), std::move(value)); return *this; } /** *

The open identity claims, with any supported custom attributes, returned from * the Cognito Your User Pool configured for the API.

*/ inline TestInvokeAuthorizerResult& AddClaims(const char* key, Aws::String&& value) { m_claims.emplace(key, std::move(value)); return *this; } /** *

The open identity claims, with any supported custom attributes, returned from * the Cognito Your User Pool configured for the API.

*/ inline TestInvokeAuthorizerResult& AddClaims(Aws::String&& key, const char* value) { m_claims.emplace(std::move(key), value); return *this; } /** *

The open identity claims, with any supported custom attributes, returned from * the Cognito Your User Pool configured for the API.

*/ inline TestInvokeAuthorizerResult& AddClaims(const char* key, const char* value) { m_claims.emplace(key, value); return *this; } inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline TestInvokeAuthorizerResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline TestInvokeAuthorizerResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline TestInvokeAuthorizerResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: int m_clientStatus; Aws::String m_log; long long m_latency; Aws::String m_principalId; Aws::String m_policy; Aws::Map> m_authorization; Aws::Map m_claims; Aws::String m_requestId; }; } // namespace Model } // namespace APIGateway } // namespace Aws