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

The name of the group. Must be unique.

*/ inline const Aws::String& GetGroupName() const{ return m_groupName; } /** *

The name of the group. Must be unique.

*/ inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; } /** *

The name of the group. Must be unique.

*/ inline void SetGroupName(const Aws::String& value) { m_groupNameHasBeenSet = true; m_groupName = value; } /** *

The name of the group. Must be unique.

*/ inline void SetGroupName(Aws::String&& value) { m_groupNameHasBeenSet = true; m_groupName = std::move(value); } /** *

The name of the group. Must be unique.

*/ inline void SetGroupName(const char* value) { m_groupNameHasBeenSet = true; m_groupName.assign(value); } /** *

The name of the group. Must be unique.

*/ inline CreateGroupRequest& WithGroupName(const Aws::String& value) { SetGroupName(value); return *this;} /** *

The name of the group. Must be unique.

*/ inline CreateGroupRequest& WithGroupName(Aws::String&& value) { SetGroupName(std::move(value)); return *this;} /** *

The name of the group. Must be unique.

*/ inline CreateGroupRequest& WithGroupName(const char* value) { SetGroupName(value); return *this;} /** *

The user pool ID for the user pool.

*/ inline const Aws::String& GetUserPoolId() const{ return m_userPoolId; } /** *

The user pool ID for the user pool.

*/ inline bool UserPoolIdHasBeenSet() const { return m_userPoolIdHasBeenSet; } /** *

The user pool ID for the user pool.

*/ inline void SetUserPoolId(const Aws::String& value) { m_userPoolIdHasBeenSet = true; m_userPoolId = value; } /** *

The user pool ID for the user pool.

*/ inline void SetUserPoolId(Aws::String&& value) { m_userPoolIdHasBeenSet = true; m_userPoolId = std::move(value); } /** *

The user pool ID for the user pool.

*/ inline void SetUserPoolId(const char* value) { m_userPoolIdHasBeenSet = true; m_userPoolId.assign(value); } /** *

The user pool ID for the user pool.

*/ inline CreateGroupRequest& WithUserPoolId(const Aws::String& value) { SetUserPoolId(value); return *this;} /** *

The user pool ID for the user pool.

*/ inline CreateGroupRequest& WithUserPoolId(Aws::String&& value) { SetUserPoolId(std::move(value)); return *this;} /** *

The user pool ID for the user pool.

*/ inline CreateGroupRequest& WithUserPoolId(const char* value) { SetUserPoolId(value); return *this;} /** *

A string containing the description of the group.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

A string containing the description of the group.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

A string containing the description of the group.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

A string containing the description of the group.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

A string containing the description of the group.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

A string containing the description of the group.

*/ inline CreateGroupRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

A string containing the description of the group.

*/ inline CreateGroupRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

A string containing the description of the group.

*/ inline CreateGroupRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The role Amazon Resource Name (ARN) for the group.

*/ inline const Aws::String& GetRoleArn() const{ return m_roleArn; } /** *

The role Amazon Resource Name (ARN) for the group.

*/ inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; } /** *

The role Amazon Resource Name (ARN) for the group.

*/ inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; } /** *

The role Amazon Resource Name (ARN) for the group.

*/ inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::move(value); } /** *

The role Amazon Resource Name (ARN) for the group.

*/ inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); } /** *

The role Amazon Resource Name (ARN) for the group.

*/ inline CreateGroupRequest& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;} /** *

The role Amazon Resource Name (ARN) for the group.

*/ inline CreateGroupRequest& WithRoleArn(Aws::String&& value) { SetRoleArn(std::move(value)); return *this;} /** *

The role Amazon Resource Name (ARN) for the group.

*/ inline CreateGroupRequest& WithRoleArn(const char* value) { SetRoleArn(value); return *this;} /** *

A non-negative integer value that specifies the precedence of this group * relative to the other groups that a user can belong to in the user pool. Zero is * the highest precedence value. Groups with lower Precedence values * take precedence over groups with higher or null Precedence values. * If a user belongs to two or more groups, it is the group with the lowest * precedence value whose role ARN is given in the user's tokens for the * cognito:roles and cognito:preferred_role claims.

*

Two groups can have the same Precedence value. If this happens, * neither group takes precedence over the other. If two groups with the same * Precedence have the same role ARN, that role is used in the * cognito:preferred_role claim in tokens for users in each group. If * the two groups have different role ARNs, the cognito:preferred_role * claim isn't set in users' tokens.

The default Precedence * value is null. The maximum Precedence value is * 2^31-1.

*/ inline int GetPrecedence() const{ return m_precedence; } /** *

A non-negative integer value that specifies the precedence of this group * relative to the other groups that a user can belong to in the user pool. Zero is * the highest precedence value. Groups with lower Precedence values * take precedence over groups with higher or null Precedence values. * If a user belongs to two or more groups, it is the group with the lowest * precedence value whose role ARN is given in the user's tokens for the * cognito:roles and cognito:preferred_role claims.

*

Two groups can have the same Precedence value. If this happens, * neither group takes precedence over the other. If two groups with the same * Precedence have the same role ARN, that role is used in the * cognito:preferred_role claim in tokens for users in each group. If * the two groups have different role ARNs, the cognito:preferred_role * claim isn't set in users' tokens.

The default Precedence * value is null. The maximum Precedence value is * 2^31-1.

*/ inline bool PrecedenceHasBeenSet() const { return m_precedenceHasBeenSet; } /** *

A non-negative integer value that specifies the precedence of this group * relative to the other groups that a user can belong to in the user pool. Zero is * the highest precedence value. Groups with lower Precedence values * take precedence over groups with higher or null Precedence values. * If a user belongs to two or more groups, it is the group with the lowest * precedence value whose role ARN is given in the user's tokens for the * cognito:roles and cognito:preferred_role claims.

*

Two groups can have the same Precedence value. If this happens, * neither group takes precedence over the other. If two groups with the same * Precedence have the same role ARN, that role is used in the * cognito:preferred_role claim in tokens for users in each group. If * the two groups have different role ARNs, the cognito:preferred_role * claim isn't set in users' tokens.

The default Precedence * value is null. The maximum Precedence value is * 2^31-1.

*/ inline void SetPrecedence(int value) { m_precedenceHasBeenSet = true; m_precedence = value; } /** *

A non-negative integer value that specifies the precedence of this group * relative to the other groups that a user can belong to in the user pool. Zero is * the highest precedence value. Groups with lower Precedence values * take precedence over groups with higher or null Precedence values. * If a user belongs to two or more groups, it is the group with the lowest * precedence value whose role ARN is given in the user's tokens for the * cognito:roles and cognito:preferred_role claims.

*

Two groups can have the same Precedence value. If this happens, * neither group takes precedence over the other. If two groups with the same * Precedence have the same role ARN, that role is used in the * cognito:preferred_role claim in tokens for users in each group. If * the two groups have different role ARNs, the cognito:preferred_role * claim isn't set in users' tokens.

The default Precedence * value is null. The maximum Precedence value is * 2^31-1.

*/ inline CreateGroupRequest& WithPrecedence(int value) { SetPrecedence(value); return *this;} private: Aws::String m_groupName; bool m_groupNameHasBeenSet = false; Aws::String m_userPoolId; bool m_userPoolIdHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::String m_roleArn; bool m_roleArnHasBeenSet = false; int m_precedence; bool m_precedenceHasBeenSet = false; }; } // namespace Model } // namespace CognitoIdentityProvider } // namespace Aws