# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class RoleAssignment(Model):
    """Represents a role assignment Metadata.

    :param principal_id: Gets the Id of the principal.
    :type principal_id: str
    :param principal_type: Possible values include: 'user', 'group', 'app'
    :type principal_type: str or ~dynamics.customerinsights.api.models.enum
    :param roles: Gets the roles the principal belongs to.
    :type roles: list[str]
    :param instance_id: Customer Insights instance id associated with this
     object.
    :type instance_id: str
    """

    _attribute_map = {
        'principal_id': {'key': 'principalId', 'type': 'str'},
        'principal_type': {'key': 'principalType', 'type': 'str'},
        'roles': {'key': 'roles', 'type': '[str]'},
        'instance_id': {'key': 'instanceId', 'type': 'str'},
    }

    def __init__(self, **kwargs):
        super(RoleAssignment, self).__init__(**kwargs)
        self.principal_id = kwargs.get('principal_id', None)
        self.principal_type = kwargs.get('principal_type', None)
        self.roles = kwargs.get('roles', None)
        self.instance_id = kwargs.get('instance_id', None)
