/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace VerifiedPermissions { namespace Model { /** */ class IsAuthorizedWithTokenRequest : public VerifiedPermissionsRequest { public: AWS_VERIFIEDPERMISSIONS_API IsAuthorizedWithTokenRequest(); // 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 "IsAuthorizedWithToken"; } AWS_VERIFIEDPERMISSIONS_API Aws::String SerializePayload() const override; AWS_VERIFIEDPERMISSIONS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

Specifies the ID of the policy store. Policies in this policy store will be * used to make an authorization decision for the input.

*/ inline const Aws::String& GetPolicyStoreId() const{ return m_policyStoreId; } /** *

Specifies the ID of the policy store. Policies in this policy store will be * used to make an authorization decision for the input.

*/ inline bool PolicyStoreIdHasBeenSet() const { return m_policyStoreIdHasBeenSet; } /** *

Specifies the ID of the policy store. Policies in this policy store will be * used to make an authorization decision for the input.

*/ inline void SetPolicyStoreId(const Aws::String& value) { m_policyStoreIdHasBeenSet = true; m_policyStoreId = value; } /** *

Specifies the ID of the policy store. Policies in this policy store will be * used to make an authorization decision for the input.

*/ inline void SetPolicyStoreId(Aws::String&& value) { m_policyStoreIdHasBeenSet = true; m_policyStoreId = std::move(value); } /** *

Specifies the ID of the policy store. Policies in this policy store will be * used to make an authorization decision for the input.

*/ inline void SetPolicyStoreId(const char* value) { m_policyStoreIdHasBeenSet = true; m_policyStoreId.assign(value); } /** *

Specifies the ID of the policy store. Policies in this policy store will be * used to make an authorization decision for the input.

*/ inline IsAuthorizedWithTokenRequest& WithPolicyStoreId(const Aws::String& value) { SetPolicyStoreId(value); return *this;} /** *

Specifies the ID of the policy store. Policies in this policy store will be * used to make an authorization decision for the input.

*/ inline IsAuthorizedWithTokenRequest& WithPolicyStoreId(Aws::String&& value) { SetPolicyStoreId(std::move(value)); return *this;} /** *

Specifies the ID of the policy store. Policies in this policy store will be * used to make an authorization decision for the input.

*/ inline IsAuthorizedWithTokenRequest& WithPolicyStoreId(const char* value) { SetPolicyStoreId(value); return *this;} /** *

Specifies an identity token for the principal to be authorized. This token is * provided to you by the identity provider (IdP) associated with the specified * identity source. You must specify either an AccessToken or an * IdentityToken, but not both.

*/ inline const Aws::String& GetIdentityToken() const{ return m_identityToken; } /** *

Specifies an identity token for the principal to be authorized. This token is * provided to you by the identity provider (IdP) associated with the specified * identity source. You must specify either an AccessToken or an * IdentityToken, but not both.

*/ inline bool IdentityTokenHasBeenSet() const { return m_identityTokenHasBeenSet; } /** *

Specifies an identity token for the principal to be authorized. This token is * provided to you by the identity provider (IdP) associated with the specified * identity source. You must specify either an AccessToken or an * IdentityToken, but not both.

*/ inline void SetIdentityToken(const Aws::String& value) { m_identityTokenHasBeenSet = true; m_identityToken = value; } /** *

Specifies an identity token for the principal to be authorized. This token is * provided to you by the identity provider (IdP) associated with the specified * identity source. You must specify either an AccessToken or an * IdentityToken, but not both.

*/ inline void SetIdentityToken(Aws::String&& value) { m_identityTokenHasBeenSet = true; m_identityToken = std::move(value); } /** *

Specifies an identity token for the principal to be authorized. This token is * provided to you by the identity provider (IdP) associated with the specified * identity source. You must specify either an AccessToken or an * IdentityToken, but not both.

*/ inline void SetIdentityToken(const char* value) { m_identityTokenHasBeenSet = true; m_identityToken.assign(value); } /** *

Specifies an identity token for the principal to be authorized. This token is * provided to you by the identity provider (IdP) associated with the specified * identity source. You must specify either an AccessToken or an * IdentityToken, but not both.

*/ inline IsAuthorizedWithTokenRequest& WithIdentityToken(const Aws::String& value) { SetIdentityToken(value); return *this;} /** *

Specifies an identity token for the principal to be authorized. This token is * provided to you by the identity provider (IdP) associated with the specified * identity source. You must specify either an AccessToken or an * IdentityToken, but not both.

*/ inline IsAuthorizedWithTokenRequest& WithIdentityToken(Aws::String&& value) { SetIdentityToken(std::move(value)); return *this;} /** *

Specifies an identity token for the principal to be authorized. This token is * provided to you by the identity provider (IdP) associated with the specified * identity source. You must specify either an AccessToken or an * IdentityToken, but not both.

*/ inline IsAuthorizedWithTokenRequest& WithIdentityToken(const char* value) { SetIdentityToken(value); return *this;} /** *

Specifies an access token for the principal to be authorized. This token is * provided to you by the identity provider (IdP) associated with the specified * identity source. You must specify either an AccessToken or an * IdentityToken, but not both.

*/ inline const Aws::String& GetAccessToken() const{ return m_accessToken; } /** *

Specifies an access token for the principal to be authorized. This token is * provided to you by the identity provider (IdP) associated with the specified * identity source. You must specify either an AccessToken or an * IdentityToken, but not both.

*/ inline bool AccessTokenHasBeenSet() const { return m_accessTokenHasBeenSet; } /** *

Specifies an access token for the principal to be authorized. This token is * provided to you by the identity provider (IdP) associated with the specified * identity source. You must specify either an AccessToken or an * IdentityToken, but not both.

*/ inline void SetAccessToken(const Aws::String& value) { m_accessTokenHasBeenSet = true; m_accessToken = value; } /** *

Specifies an access token for the principal to be authorized. This token is * provided to you by the identity provider (IdP) associated with the specified * identity source. You must specify either an AccessToken or an * IdentityToken, but not both.

*/ inline void SetAccessToken(Aws::String&& value) { m_accessTokenHasBeenSet = true; m_accessToken = std::move(value); } /** *

Specifies an access token for the principal to be authorized. This token is * provided to you by the identity provider (IdP) associated with the specified * identity source. You must specify either an AccessToken or an * IdentityToken, but not both.

*/ inline void SetAccessToken(const char* value) { m_accessTokenHasBeenSet = true; m_accessToken.assign(value); } /** *

Specifies an access token for the principal to be authorized. This token is * provided to you by the identity provider (IdP) associated with the specified * identity source. You must specify either an AccessToken or an * IdentityToken, but not both.

*/ inline IsAuthorizedWithTokenRequest& WithAccessToken(const Aws::String& value) { SetAccessToken(value); return *this;} /** *

Specifies an access token for the principal to be authorized. This token is * provided to you by the identity provider (IdP) associated with the specified * identity source. You must specify either an AccessToken or an * IdentityToken, but not both.

*/ inline IsAuthorizedWithTokenRequest& WithAccessToken(Aws::String&& value) { SetAccessToken(std::move(value)); return *this;} /** *

Specifies an access token for the principal to be authorized. This token is * provided to you by the identity provider (IdP) associated with the specified * identity source. You must specify either an AccessToken or an * IdentityToken, but not both.

*/ inline IsAuthorizedWithTokenRequest& WithAccessToken(const char* value) { SetAccessToken(value); return *this;} /** *

Specifies the requested action to be authorized. Is the specified principal * authorized to perform this action on the specified resource.

*/ inline const ActionIdentifier& GetAction() const{ return m_action; } /** *

Specifies the requested action to be authorized. Is the specified principal * authorized to perform this action on the specified resource.

*/ inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; } /** *

Specifies the requested action to be authorized. Is the specified principal * authorized to perform this action on the specified resource.

*/ inline void SetAction(const ActionIdentifier& value) { m_actionHasBeenSet = true; m_action = value; } /** *

Specifies the requested action to be authorized. Is the specified principal * authorized to perform this action on the specified resource.

*/ inline void SetAction(ActionIdentifier&& value) { m_actionHasBeenSet = true; m_action = std::move(value); } /** *

Specifies the requested action to be authorized. Is the specified principal * authorized to perform this action on the specified resource.

*/ inline IsAuthorizedWithTokenRequest& WithAction(const ActionIdentifier& value) { SetAction(value); return *this;} /** *

Specifies the requested action to be authorized. Is the specified principal * authorized to perform this action on the specified resource.

*/ inline IsAuthorizedWithTokenRequest& WithAction(ActionIdentifier&& value) { SetAction(std::move(value)); return *this;} /** *

Specifies the resource for which the authorization decision is made. For * example, is the principal allowed to perform the action on the resource?

*/ inline const EntityIdentifier& GetResource() const{ return m_resource; } /** *

Specifies the resource for which the authorization decision is made. For * example, is the principal allowed to perform the action on the resource?

*/ inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; } /** *

Specifies the resource for which the authorization decision is made. For * example, is the principal allowed to perform the action on the resource?

*/ inline void SetResource(const EntityIdentifier& value) { m_resourceHasBeenSet = true; m_resource = value; } /** *

Specifies the resource for which the authorization decision is made. For * example, is the principal allowed to perform the action on the resource?

*/ inline void SetResource(EntityIdentifier&& value) { m_resourceHasBeenSet = true; m_resource = std::move(value); } /** *

Specifies the resource for which the authorization decision is made. For * example, is the principal allowed to perform the action on the resource?

*/ inline IsAuthorizedWithTokenRequest& WithResource(const EntityIdentifier& value) { SetResource(value); return *this;} /** *

Specifies the resource for which the authorization decision is made. For * example, is the principal allowed to perform the action on the resource?

*/ inline IsAuthorizedWithTokenRequest& WithResource(EntityIdentifier&& value) { SetResource(std::move(value)); return *this;} /** *

Specifies additional context that can be used to make more granular * authorization decisions.

*/ inline const ContextDefinition& GetContext() const{ return m_context; } /** *

Specifies additional context that can be used to make more granular * authorization decisions.

*/ inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; } /** *

Specifies additional context that can be used to make more granular * authorization decisions.

*/ inline void SetContext(const ContextDefinition& value) { m_contextHasBeenSet = true; m_context = value; } /** *

Specifies additional context that can be used to make more granular * authorization decisions.

*/ inline void SetContext(ContextDefinition&& value) { m_contextHasBeenSet = true; m_context = std::move(value); } /** *

Specifies additional context that can be used to make more granular * authorization decisions.

*/ inline IsAuthorizedWithTokenRequest& WithContext(const ContextDefinition& value) { SetContext(value); return *this;} /** *

Specifies additional context that can be used to make more granular * authorization decisions.

*/ inline IsAuthorizedWithTokenRequest& WithContext(ContextDefinition&& value) { SetContext(std::move(value)); return *this;} /** *

Specifies the list of resources and principals and their associated * attributes that Verified Permissions can examine when evaluating the policies. *

You can include only principal and resource entities in this * parameter; you can't include actions. You must specify actions in the * schema.

*/ inline const EntitiesDefinition& GetEntities() const{ return m_entities; } /** *

Specifies the list of resources and principals and their associated * attributes that Verified Permissions can examine when evaluating the policies. *

You can include only principal and resource entities in this * parameter; you can't include actions. You must specify actions in the * schema.

*/ inline bool EntitiesHasBeenSet() const { return m_entitiesHasBeenSet; } /** *

Specifies the list of resources and principals and their associated * attributes that Verified Permissions can examine when evaluating the policies. *

You can include only principal and resource entities in this * parameter; you can't include actions. You must specify actions in the * schema.

*/ inline void SetEntities(const EntitiesDefinition& value) { m_entitiesHasBeenSet = true; m_entities = value; } /** *

Specifies the list of resources and principals and their associated * attributes that Verified Permissions can examine when evaluating the policies. *

You can include only principal and resource entities in this * parameter; you can't include actions. You must specify actions in the * schema.

*/ inline void SetEntities(EntitiesDefinition&& value) { m_entitiesHasBeenSet = true; m_entities = std::move(value); } /** *

Specifies the list of resources and principals and their associated * attributes that Verified Permissions can examine when evaluating the policies. *

You can include only principal and resource entities in this * parameter; you can't include actions. You must specify actions in the * schema.

*/ inline IsAuthorizedWithTokenRequest& WithEntities(const EntitiesDefinition& value) { SetEntities(value); return *this;} /** *

Specifies the list of resources and principals and their associated * attributes that Verified Permissions can examine when evaluating the policies. *

You can include only principal and resource entities in this * parameter; you can't include actions. You must specify actions in the * schema.

*/ inline IsAuthorizedWithTokenRequest& WithEntities(EntitiesDefinition&& value) { SetEntities(std::move(value)); return *this;} private: Aws::String m_policyStoreId; bool m_policyStoreIdHasBeenSet = false; Aws::String m_identityToken; bool m_identityTokenHasBeenSet = false; Aws::String m_accessToken; bool m_accessTokenHasBeenSet = false; ActionIdentifier m_action; bool m_actionHasBeenSet = false; EntityIdentifier m_resource; bool m_resourceHasBeenSet = false; ContextDefinition m_context; bool m_contextHasBeenSet = false; EntitiesDefinition m_entities; bool m_entitiesHasBeenSet = false; }; } // namespace Model } // namespace VerifiedPermissions } // namespace Aws