"""Raw representations of every data type in the AWS IAM service.

See Also:
    `AWS developer guide for IAM
    <https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html>`_

This file is automatically generated, and should not be directly edited.
"""

from attr import attrib
from attr import attrs

from ..core import ATTRSCONFIG
from ..core import Resource
from ..core import ResourceProperties
from ..core import create_object_converter

__all__ = [
    "AccessKey",
    "AccessKeyProperties",
    "Group",
    "GroupProperties",
    "InstanceProfile",
    "InstanceProfileProperties",
    "ManagedPolicy",
    "ManagedPolicyProperties",
    "Policy",
    "PolicyProperties",
    "Role",
    "RoleProperties",
    "ServiceLinkedRole",
    "ServiceLinkedRoleProperties",
    "User",
    "UserProperties",
    "UserToGroupAddition",
    "UserToGroupAdditionProperties",
]


@attrs(**ATTRSCONFIG)
class AccessKeyProperties(ResourceProperties):
    Serial = attrib(default=None)
    Status = attrib(default=None)
    UserName = attrib(default=None)


@attrs(**ATTRSCONFIG)
class AccessKey(Resource):
    """A Access Key for IAM.

    See Also:
        `AWS Cloud Formation documentation for AccessKey
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html>`_
    """

    RESOURCE_TYPE = "AWS::IAM::AccessKey"

    Properties: AccessKeyProperties = attrib(
        factory=AccessKeyProperties,
        converter=create_object_converter(AccessKeyProperties),
    )


@attrs(**ATTRSCONFIG)
class GroupProperties(ResourceProperties):
    GroupName = attrib(default=None)
    ManagedPolicyArns = attrib(default=None)
    Path = attrib(default=None)
    Policies = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Group(Resource):
    """A Group for IAM.

    See Also:
        `AWS Cloud Formation documentation for Group
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html>`_
    """

    RESOURCE_TYPE = "AWS::IAM::Group"

    Properties: GroupProperties = attrib(
        factory=GroupProperties,
        converter=create_object_converter(GroupProperties),
    )


@attrs(**ATTRSCONFIG)
class InstanceProfileProperties(ResourceProperties):
    InstanceProfileName = attrib(default=None)
    Path = attrib(default=None)
    Roles = attrib(default=None)


@attrs(**ATTRSCONFIG)
class InstanceProfile(Resource):
    """A Instance Profile for IAM.

    See Also:
        `AWS Cloud Formation documentation for InstanceProfile
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html>`_
    """

    RESOURCE_TYPE = "AWS::IAM::InstanceProfile"

    Properties: InstanceProfileProperties = attrib(
        factory=InstanceProfileProperties,
        converter=create_object_converter(InstanceProfileProperties),
    )


@attrs(**ATTRSCONFIG)
class ManagedPolicyProperties(ResourceProperties):
    Description = attrib(default=None)
    Groups = attrib(default=None)
    ManagedPolicyName = attrib(default=None)
    Path = attrib(default=None)
    PolicyDocument = attrib(default=None)
    Roles = attrib(default=None)
    Users = attrib(default=None)


@attrs(**ATTRSCONFIG)
class ManagedPolicy(Resource):
    """A Managed Policy for IAM.

    See Also:
        `AWS Cloud Formation documentation for ManagedPolicy
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-managedpolicy.html>`_
    """

    RESOURCE_TYPE = "AWS::IAM::ManagedPolicy"

    Properties: ManagedPolicyProperties = attrib(
        factory=ManagedPolicyProperties,
        converter=create_object_converter(ManagedPolicyProperties),
    )


@attrs(**ATTRSCONFIG)
class PolicyProperties(ResourceProperties):
    Groups = attrib(default=None)
    PolicyDocument = attrib(default=None)
    PolicyName = attrib(default=None)
    Roles = attrib(default=None)
    Users = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Policy(Resource):
    """A Policy for IAM.

    See Also:
        `AWS Cloud Formation documentation for Policy
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html>`_
    """

    RESOURCE_TYPE = "AWS::IAM::Policy"

    Properties: PolicyProperties = attrib(
        factory=PolicyProperties,
        converter=create_object_converter(PolicyProperties),
    )


@attrs(**ATTRSCONFIG)
class RoleProperties(ResourceProperties):
    AssumeRolePolicyDocument = attrib(default=None)
    ManagedPolicyArns = attrib(default=None)
    MaxSessionDuration = attrib(default=None)
    Path = attrib(default=None)
    PermissionsBoundary = attrib(default=None)
    Policies = attrib(default=None)
    RoleName = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Role(Resource):
    """A Role for IAM.

    See Also:
        `AWS Cloud Formation documentation for Role
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html>`_
    """

    RESOURCE_TYPE = "AWS::IAM::Role"

    Properties: RoleProperties = attrib(
        factory=RoleProperties,
        converter=create_object_converter(RoleProperties),
    )


@attrs(**ATTRSCONFIG)
class ServiceLinkedRoleProperties(ResourceProperties):
    AWSServiceName = attrib(default=None)
    CustomSuffix = attrib(default=None)
    Description = attrib(default=None)


@attrs(**ATTRSCONFIG)
class ServiceLinkedRole(Resource):
    """A Service Linked Role for IAM.

    See Also:
        `AWS Cloud Formation documentation for ServiceLinkedRole
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-servicelinkedrole.html>`_
    """

    RESOURCE_TYPE = "AWS::IAM::ServiceLinkedRole"

    Properties: ServiceLinkedRoleProperties = attrib(
        factory=ServiceLinkedRoleProperties,
        converter=create_object_converter(ServiceLinkedRoleProperties),
    )


@attrs(**ATTRSCONFIG)
class UserProperties(ResourceProperties):
    Groups = attrib(default=None)
    LoginProfile = attrib(default=None)
    ManagedPolicyArns = attrib(default=None)
    Path = attrib(default=None)
    PermissionsBoundary = attrib(default=None)
    Policies = attrib(default=None)
    UserName = attrib(default=None)


@attrs(**ATTRSCONFIG)
class User(Resource):
    """A User for IAM.

    See Also:
        `AWS Cloud Formation documentation for User
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html>`_
    """

    RESOURCE_TYPE = "AWS::IAM::User"

    Properties: UserProperties = attrib(
        factory=UserProperties,
        converter=create_object_converter(UserProperties),
    )


@attrs(**ATTRSCONFIG)
class UserToGroupAdditionProperties(ResourceProperties):
    GroupName = attrib(default=None)
    Users = attrib(default=None)


@attrs(**ATTRSCONFIG)
class UserToGroupAddition(Resource):
    """A User To Group Addition for IAM.

    See Also:
        `AWS Cloud Formation documentation for UserToGroupAddition
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html>`_
    """

    RESOURCE_TYPE = "AWS::IAM::UserToGroupAddition"

    Properties: UserToGroupAdditionProperties = attrib(
        factory=UserToGroupAdditionProperties,
        converter=create_object_converter(UserToGroupAdditionProperties),
    )
